From ec69c16df81f90fd4f4e5656d9353fe60fe357cf Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 25 Apr 2024 22:45:02 +0000 Subject: [PATCH] CodeGen from PR 3329 in test-repo-billy/azure-rest-api-specs Merge 818e4345dffd53322d3b3590f234ee05fca38fbd into 26ae65b7cff0082d7acce6e28ac8d6739bc19745 --- common/config/rush/pnpm-lock.yaml | 191 +- sdk/agrifood/arm-agrifood/CHANGELOG.md | 131 +- sdk/agrifood/arm-agrifood/LICENSE | 2 +- sdk/agrifood/arm-agrifood/README.md | 2 +- sdk/agrifood/arm-agrifood/_meta.json | 10 +- sdk/agrifood/arm-agrifood/package.json | 38 +- .../arm-agrifood/review/arm-agrifood.api.md | 571 ++++-- .../arm-agrifood/src/agriFoodMgmtClient.ts | 99 +- sdk/agrifood/arm-agrifood/src/lroImpl.ts | 54 +- sdk/agrifood/arm-agrifood/src/models/index.ts | 894 ++++++--- .../arm-agrifood/src/models/mappers.ts | 1712 ++++++++++++----- .../arm-agrifood/src/models/parameters.ts | 501 +++-- ...{locations.ts => checkNameAvailability.ts} | 39 +- .../src/operations/dataConnectors.ts | 363 ++++ ...=> dataManagerForAgricultureExtensions.ts} | 114 +- ... => dataManagerForAgricultureResources.ts} | 426 ++-- .../arm-agrifood/src/operations/extensions.ts | 319 ++- .../arm-agrifood/src/operations/index.ts | 10 +- .../src/operations/operationResults.ts | 71 + .../arm-agrifood/src/operations/operations.ts | 33 +- .../operations/privateEndpointConnections.ts | 252 +-- .../src/operations/privateLinkResources.ts | 126 +- .../arm-agrifood/src/operations/solutions.ts | 366 ++++ .../operations/solutionsDiscoverability.ts | 190 ++ .../checkNameAvailability.ts | 26 + .../operationsInterfaces/dataConnectors.ts | 75 + .../dataManagerForAgricultureExtensions.ts | 36 + .../dataManagerForAgricultureResources.ts | 110 ++ .../src/operationsInterfaces/extensions.ts | 57 +- .../farmBeatsExtensions.ts | 36 - .../operationsInterfaces/farmBeatsModels.ts | 125 -- .../src/operationsInterfaces/index.ts | 10 +- .../src/operationsInterfaces/locations.ts | 26 - .../operationsInterfaces/operationResults.ts | 27 + .../src/operationsInterfaces/operations.ts | 2 +- .../privateEndpointConnections.ts | 61 +- .../privateLinkResources.ts | 20 +- .../src/operationsInterfaces/solutions.ts | 73 + .../solutionsDiscoverability.ts | 36 + sdk/agrifood/arm-agrifood/src/pagingHelper.ts | 10 +- sdk/agrifood/arm-agrifood/test/sampleTest.ts | 12 +- sdk/agrifood/arm-agrifood/tsconfig.json | 10 +- 42 files changed, 5015 insertions(+), 2251 deletions(-) rename sdk/agrifood/arm-agrifood/src/operations/{locations.ts => checkNameAvailability.ts} (54%) create mode 100644 sdk/agrifood/arm-agrifood/src/operations/dataConnectors.ts rename sdk/agrifood/arm-agrifood/src/operations/{farmBeatsExtensions.ts => dataManagerForAgricultureExtensions.ts} (57%) rename sdk/agrifood/arm-agrifood/src/operations/{farmBeatsModels.ts => dataManagerForAgricultureResources.ts} (51%) create mode 100644 sdk/agrifood/arm-agrifood/src/operations/operationResults.ts create mode 100644 sdk/agrifood/arm-agrifood/src/operations/solutions.ts create mode 100644 sdk/agrifood/arm-agrifood/src/operations/solutionsDiscoverability.ts create mode 100644 sdk/agrifood/arm-agrifood/src/operationsInterfaces/checkNameAvailability.ts create mode 100644 sdk/agrifood/arm-agrifood/src/operationsInterfaces/dataConnectors.ts create mode 100644 sdk/agrifood/arm-agrifood/src/operationsInterfaces/dataManagerForAgricultureExtensions.ts create mode 100644 sdk/agrifood/arm-agrifood/src/operationsInterfaces/dataManagerForAgricultureResources.ts delete mode 100644 sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsExtensions.ts delete mode 100644 sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsModels.ts delete mode 100644 sdk/agrifood/arm-agrifood/src/operationsInterfaces/locations.ts create mode 100644 sdk/agrifood/arm-agrifood/src/operationsInterfaces/operationResults.ts create mode 100644 sdk/agrifood/arm-agrifood/src/operationsInterfaces/solutions.ts create mode 100644 sdk/agrifood/arm-agrifood/src/operationsInterfaces/solutionsDiscoverability.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 99321d0907bc..2ac643671507 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1,7 +1,7 @@ lockfileVersion: '6.0' settings: - autoInstallPeers: true + autoInstallPeers: false excludeLinksFromLockfile: false dependencies: @@ -1135,6 +1135,13 @@ packages: tslib: 2.6.2 dev: false + /@azure/abort-controller@2.1.2: + resolution: {integrity: sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==} + engines: {node: '>=18.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + /@azure/app-configuration@1.5.0-beta.2: resolution: {integrity: sha512-FhKvFKmMhu0P57lYO4i3JN8oGyvHs+YTsdz18cmKaqYHwlHD9ITHGKX59f3hT3rWZoK02sd0OajhCGrsKOmkmQ==} engines: {node: '>=16.0.0'} @@ -1176,6 +1183,15 @@ packages: tslib: 2.6.2 dev: false + /@azure/core-auth@1.7.2: + resolution: {integrity: sha512-Igm/S3fDYmnMq1uKS38Ae1/m37B3zigdlZw+kocwEhh5GjyKjPrXKO2J6rzpC1wAxrNil/jX9BJRqBshyjnF3g==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-util': 1.6.1 + tslib: 2.6.2 + dev: false + /@azure/core-client@1.7.3: resolution: {integrity: sha512-kleJ1iUTxcO32Y06dH9Pfi9K4U+Tlb111WXEnbt7R/ne+NLRwppZiTGJuTD5VVoxTMK5NTbEtm5t2vcdNCFe2g==} engines: {node: '>=14.0.0'} @@ -1292,6 +1308,22 @@ packages: - supports-color dev: false + /@azure/core-rest-pipeline@1.15.2: + resolution: {integrity: sha512-BmWfpjc/QXc2ipHOh6LbUzp3ONCaa6xzIssTU0DwH9bbYNXJlGUL6tujx5TrbVd/QQknmS+vlQJGrCq2oL1gZA==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-auth': 1.7.2 + '@azure/core-tracing': 1.0.1 + '@azure/core-util': 1.6.1 + '@azure/logger': 1.0.4 + http-proxy-agent: 7.0.0 + https-proxy-agent: 7.0.2 + tslib: 2.6.2 + transitivePeerDependencies: + - supports-color + dev: false + /@azure/core-tracing@1.0.0-preview.13: resolution: {integrity: sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==} engines: {node: '>=12.0.0'} @@ -1371,6 +1403,28 @@ packages: - supports-color dev: false + /@azure/identity@4.1.0: + resolution: {integrity: sha512-BhYkF8Xr2gXjyDxocm0pc9RI5J5a1jw8iW0dw6Bx95OGdYbuMyFZrrwNw4eYSqQ2BB6FZOqpJP3vjsAqRcvDhw==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/core-auth': 1.7.2 + '@azure/core-client': 1.7.3 + '@azure/core-rest-pipeline': 1.15.2 + '@azure/core-tracing': 1.0.1 + '@azure/core-util': 1.6.1 + '@azure/logger': 1.0.4 + '@azure/msal-browser': 3.13.0 + '@azure/msal-node': 2.7.0 + events: 3.3.0 + jws: 4.0.0 + open: 8.4.2 + stoppable: 1.1.0 + tslib: 2.6.2 + transitivePeerDependencies: + - supports-color + dev: false + /@azure/keyvault-certificates@4.7.0: resolution: {integrity: sha512-W3v9Fj48ik2gaRiY7ra4F92hjnWM3H4oT25xy4pGl/z3zHeUB0YZTXitFiSnj4fxMTbPEx3gdmjfIjf3FIq/Yw==} engines: {node: '>=14.0.0'} @@ -1476,6 +1530,13 @@ packages: '@azure/msal-common': 13.3.1 dev: false + /@azure/msal-browser@3.13.0: + resolution: {integrity: sha512-fD906nmJei3yE7la6DZTdUtXKvpwzJURkfsiz9747Icv4pit77cegSm6prJTKLQ1fw4iiZzrrWwxnhMLrTf5gQ==} + engines: {node: '>=0.8.0'} + dependencies: + '@azure/msal-common': 14.9.0 + dev: false + /@azure/msal-browser@3.3.0: resolution: {integrity: sha512-2E9h/rvSpjLQ3kRv+4bVmsnDjMaAcw1GMc7qzEvMOlNluXCEvZHeaawnAkYaIbtkbp35gzn/0ULs3RYJXvQdQA==} engines: {node: '>=0.8.0'} @@ -1493,6 +1554,11 @@ packages: engines: {node: '>=0.8.0'} dev: false + /@azure/msal-common@14.9.0: + resolution: {integrity: sha512-yzBPRlWPnTBeixxLNI3BBIgF5/bHpbhoRVuuDBnYjCyWRavaPUsKAHUDYLqpGkBLDciA6TCc6GOxN4/S3WiSxg==} + engines: {node: '>=0.8.0'} + dev: false + /@azure/msal-common@7.6.0: resolution: {integrity: sha512-XqfbglUTVLdkHQ8F9UQJtKseRr3sSnr9ysboxtoswvaMVaEfvyLtMoHv9XdKUfOc0qKGzNgRFd9yRjIWVepl6Q==} engines: {node: '>=0.8.0'} @@ -1525,6 +1591,7 @@ packages: /@azure/msal-node@1.18.4: resolution: {integrity: sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==} engines: {node: 10 || 12 || 14 || 16 || 18} + deprecated: A newer major version of this library is available. Please upgrade to the latest available version. dependencies: '@azure/msal-common': 13.3.1 jsonwebtoken: 9.0.2 @@ -1540,6 +1607,15 @@ packages: uuid: 8.3.2 dev: false + /@azure/msal-node@2.7.0: + resolution: {integrity: sha512-wXD8LkUvHICeSWZydqg6o8Yvv+grlBEcmLGu+QEI4FcwFendbTEZrlSygnAXXSOCVaGAirWLchca35qrgpO6Jw==} + engines: {node: '>=16'} + dependencies: + '@azure/msal-common': 14.9.0 + jsonwebtoken: 9.0.2 + uuid: 8.3.2 + dev: false + /@azure/schema-registry@1.2.0: resolution: {integrity: sha512-c0941sREjSPE6/KMVd3vrLYKwwjrKZabOP/i1YOoBS4RquFIi3aA4wUPBvsVhOs4JzN79Ztcn7/ZvO4HyzrSVQ==} engines: {node: '>=12.0.0'} @@ -3554,6 +3630,13 @@ packages: requiresBuild: true dev: false + /autorest@3.7.1: + resolution: {integrity: sha512-6q17NtosQZPqBkIOUnaOPedf3PDIBF7Ha1iEGRhTqZF6TG2Q/1E3ID/D+ePIIzZDKvW01p/2pENq/oiBWH9IGQ==} + engines: {node: '>=12.0.0'} + hasBin: true + requiresBuild: true + dev: false + /available-typed-arrays@1.0.5: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} @@ -4495,7 +4578,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20231030 + typescript: 5.5.0-dev.20240425 dev: false /eastasianwidth@0.2.0: @@ -9119,6 +9202,37 @@ packages: yn: 3.1.1 dev: false + /ts-node@10.9.1(@types/node@18.18.7)(typescript@5.4.5): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 18.18.7 + acorn: 8.11.2 + acorn-walk: 8.3.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.4.5 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: false + /tsconfig-paths@3.14.2: resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} dependencies: @@ -9261,8 +9375,14 @@ packages: hasBin: true dev: false - /typescript@5.3.0-dev.20231030: - resolution: {integrity: sha512-azWrF0lAiu8cBHNr6yq3RDkU/DtQScvT48ea3Ngq6oXJ/GPO0n96wCFSRQA5UbZlVVf3fAAqsUfvOdohRbrPVg==} + /typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + engines: {node: '>=14.17'} + hasBin: true + dev: false + + /typescript@5.5.0-dev.20240425: + resolution: {integrity: sha512-7Ori11gLEXAm1+iEaoATNgb/VOA5AAL3Q+kUaSColBS12aMGZRMjBcN1K/dJlmOjeViCkvAf+nlyG5ChaCWt5Q==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -9894,7 +10014,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -9940,7 +10060,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -10170,7 +10290,7 @@ packages: dependencies: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 dotenv: 8.6.0 eslint: 8.52.0 @@ -10242,7 +10362,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -10334,7 +10454,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -10538,22 +10658,27 @@ packages: dev: false file:projects/arm-agrifood.tgz: - resolution: {integrity: sha512-dNqkb9gBfFflz+qZp5bYIXtISH5yvRGPJBNKt8z3YCR2KtjcLyeXNwWp/GRjOJDldww1xkRnarGa0vukNmXCiQ==, tarball: file:projects/arm-agrifood.tgz} + resolution: {integrity: sha512-xnxXtJG89Ew4fyYjhBAu5aIVlkctzD4uCU1Sc+kwzCrA4GM2MC7XPamQFnyyaFOg7kfEFfRgcao+DtznWAT0IA==, tarball: file:projects/arm-agrifood.tgz} name: '@rush-temp/arm-agrifood' version: 0.0.0 dependencies: - '@azure/identity': 3.3.2 + '@azure/core-auth': 1.7.2 + '@azure/core-rest-pipeline': 1.15.2 + '@azure/identity': 4.1.0 '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 '@types/node': 18.18.7 chai: 4.3.10 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.3.1 + esm: 3.2.25 + mkdirp: 3.0.1 mocha: 10.2.0 - rimraf: 3.0.2 - ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2) + rimraf: 5.0.5 + ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.4.5) tslib: 2.6.2 - typescript: 5.2.2 + typescript: 5.4.5 uglify-js: 3.17.4 transitivePeerDependencies: - '@swc/core' @@ -10814,7 +10939,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -11474,7 +11599,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -11694,7 +11819,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -13963,7 +14088,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -15245,7 +15370,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -16440,7 +16565,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 @@ -17603,7 +17728,7 @@ packages: name: '@rush-temp/dev-tool' version: 0.0.0 dependencies: - '@_ts/max': /typescript@5.2.2 + '@_ts/max': /typescript@5.4.5 '@_ts/min': /typescript@4.2.4 '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@rollup/plugin-commonjs': 25.0.7(rollup@3.29.4) @@ -17669,7 +17794,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18075,7 +18200,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18120,7 +18245,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18623,7 +18748,7 @@ packages: '@types/mocha': 10.0.3 '@types/node': 18.18.7 '@types/uuid': 8.3.4 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18732,7 +18857,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18778,7 +18903,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18824,7 +18949,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18870,7 +18995,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -19998,7 +20123,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -20043,7 +20168,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -20375,7 +20500,7 @@ packages: dev: false file:projects/storage-blob-changefeed.tgz: - resolution: {integrity: sha512-2LtIcl6t12irIaBaBSP/ytxkJA5VSRJ2RUg08UJEi/NVLHhjpx+NQQn/a/ebeAwpa2DefdSkfHRhgh7zn8Qzzg==, tarball: file:projects/storage-blob-changefeed.tgz} + resolution: {integrity: sha512-nBVNUHVbjsSyKfoA2uJNvG+jlJEW9Oq12K9Oha1C6GVY1rZhEpcWrkob0RJe/sCDdrMo0MBUnvL7+PkUsvhR8w==, tarball: file:projects/storage-blob-changefeed.tgz} name: '@rush-temp/storage-blob-changefeed' version: 0.0.0 dependencies: diff --git a/sdk/agrifood/arm-agrifood/CHANGELOG.md b/sdk/agrifood/arm-agrifood/CHANGELOG.md index 87eed1b83966..a358f16edfd6 100644 --- a/sdk/agrifood/arm-agrifood/CHANGELOG.md +++ b/sdk/agrifood/arm-agrifood/CHANGELOG.md @@ -1,14 +1,131 @@ # Release History + +## 1.0.0-beta.6 (2024-04-25) + +**Features** -## 1.0.0-beta.5 (Unreleased) - -### Features Added - -### Breaking Changes - + - Added operation group CheckNameAvailability + - Added operation group DataConnectors + - Added operation group DataManagerForAgricultureExtensions + - Added operation group DataManagerForAgricultureResources + - Added operation group OperationResults + - Added operation group Solutions + - Added operation group SolutionsDiscoverability + - Added operation Extensions.createOrUpdate + - Added operation Extensions.listByDataManagerForAgriculture + - Added Interface ApiKeyAuthCredentials + - Added Interface ApiProperties + - Added Interface ArmAsyncOperationError + - Added Interface AuthCredentials + - Added Interface CheckNameAvailabilityCheckNameAvailabilityOptionalParams + - Added Interface DataConnector + - Added Interface DataConnectorListResponse + - Added Interface DataConnectorProperties + - Added Interface DataConnectorsCreateOrUpdateOptionalParams + - Added Interface DataConnectorsDeleteOptionalParams + - Added Interface DataConnectorsGetOptionalParams + - Added Interface DataConnectorsListNextOptionalParams + - Added Interface DataConnectorsListOptionalParams + - Added Interface DataManagerForAgriculture + - Added Interface DataManagerForAgricultureExtension + - Added Interface DataManagerForAgricultureExtensionListResponse + - Added Interface DataManagerForAgricultureExtensionProperties + - Added Interface DataManagerForAgricultureExtensionsGetOptionalParams + - Added Interface DataManagerForAgricultureExtensionsListNextOptionalParams + - Added Interface DataManagerForAgricultureExtensionsListOptionalParams + - Added Interface DataManagerForAgricultureListResponse + - Added Interface DataManagerForAgricultureResourcesCreateOrUpdateOptionalParams + - Added Interface DataManagerForAgricultureResourcesDeleteOptionalParams + - Added Interface DataManagerForAgricultureResourcesGetOptionalParams + - Added Interface DataManagerForAgricultureResourcesListByResourceGroupNextOptionalParams + - Added Interface DataManagerForAgricultureResourcesListByResourceGroupOptionalParams + - Added Interface DataManagerForAgricultureResourcesListBySubscriptionNextOptionalParams + - Added Interface DataManagerForAgricultureResourcesListBySubscriptionOptionalParams + - Added Interface DataManagerForAgricultureResourcesUpdateHeaders + - Added Interface DataManagerForAgricultureResourcesUpdateOptionalParams + - Added Interface DataManagerForAgricultureSolution + - Added Interface DataManagerForAgricultureSolutionListResponse + - Added Interface DataManagerForAgricultureSolutionProperties + - Added Interface DataManagerForAgricultureUpdateProperties + - Added Interface DataManagerForAgricultureUpdateRequestModel + - Added Interface ExtensionInstallationRequest + - Added Interface ExtensionsCreateOrUpdateOptionalParams + - Added Interface ExtensionsListByDataManagerForAgricultureNextOptionalParams + - Added Interface ExtensionsListByDataManagerForAgricultureOptionalParams + - Added Interface KeyVaultProperties + - Added Interface MarketplaceOfferDetails + - Added Interface OAuthClientCredentials + - Added Interface OperationResultsGetOptionalParams + - Added Interface Solution + - Added Interface SolutionListResponse + - Added Interface SolutionProperties + - Added Interface SolutionsCreateOrUpdateOptionalParams + - Added Interface SolutionsDeleteOptionalParams + - Added Interface SolutionsDiscoverabilityGetOptionalParams + - Added Interface SolutionsDiscoverabilityListNextOptionalParams + - Added Interface SolutionsDiscoverabilityListOptionalParams + - Added Interface SolutionsGetOptionalParams + - Added Interface SolutionsListNextOptionalParams + - Added Interface SolutionsListOptionalParams + - Added Type Alias AuthCredentialsKind + - Added Type Alias AuthCredentialsUnion + - Added Type Alias CheckNameAvailabilityCheckNameAvailabilityResponse + - Added Type Alias DataConnectorsCreateOrUpdateResponse + - Added Type Alias DataConnectorsGetResponse + - Added Type Alias DataConnectorsListNextResponse + - Added Type Alias DataConnectorsListResponse + - Added Type Alias DataManagerForAgricultureExtensionsGetResponse + - Added Type Alias DataManagerForAgricultureExtensionsListNextResponse + - Added Type Alias DataManagerForAgricultureExtensionsListResponse + - Added Type Alias DataManagerForAgricultureResourcesCreateOrUpdateResponse + - Added Type Alias DataManagerForAgricultureResourcesGetResponse + - Added Type Alias DataManagerForAgricultureResourcesListByResourceGroupNextResponse + - Added Type Alias DataManagerForAgricultureResourcesListByResourceGroupResponse + - Added Type Alias DataManagerForAgricultureResourcesListBySubscriptionNextResponse + - Added Type Alias DataManagerForAgricultureResourcesListBySubscriptionResponse + - Added Type Alias DataManagerForAgricultureResourcesUpdateResponse + - Added Type Alias ExtensionsCreateOrUpdateResponse + - Added Type Alias ExtensionsListByDataManagerForAgricultureNextResponse + - Added Type Alias ExtensionsListByDataManagerForAgricultureResponse + - Added Type Alias OperationResultsGetResponse + - Added Type Alias SolutionsCreateOrUpdateResponse + - Added Type Alias SolutionsDiscoverabilityGetResponse + - Added Type Alias SolutionsDiscoverabilityListNextResponse + - Added Type Alias SolutionsDiscoverabilityListResponse + - Added Type Alias SolutionsGetResponse + - Added Type Alias SolutionsListNextResponse + - Added Type Alias SolutionsListResponse + - Interface ArmAsyncOperation has a new optional parameter error + - Interface DetailedInformation has a new optional parameter apiDefaultInputParameters + - Interface DetailedInformation has a new optional parameter apiDocsLink + - Interface DetailedInformation has a new optional parameter apiType + - Interface Extension has a new optional parameter additionalApiProperties + - Interface ExtensionListResponse has a new optional parameter skipToken + - Interface PrivateEndpointConnection has a new optional parameter groupIds + - Added Enum KnownAuthCredentialsKind + - Enum KnownProvisioningState has a new value Running + - Enum KnownPublicNetworkAccess has a new value Disabled + +**Breaking Changes** + + - Removed operation group FarmBeatsExtensions + - Removed operation group FarmBeatsModels + - Removed operation group Locations + - Removed operation Extensions.create + - Removed operation Extensions.listByFarmBeats + - Removed operation Extensions.update + - Class AgriFoodMgmtClient has a new signature + - Parameter value of interface ExtensionListResponse is now required + - Class AgriFoodMgmtClient no longer has parameter farmBeatsExtensions + - Class AgriFoodMgmtClient no longer has parameter farmBeatsModels + - Class AgriFoodMgmtClient no longer has parameter locations + - Enum KnownPublicNetworkAccess no longer has value Hybrid + +## 1.0.0-beta.5 (2024-04-08) + ### Bugs Fixed -### Other Changes +- Release a beta version to fix latest tag issue ## 1.0.0-beta.4 (2022-11-14) diff --git a/sdk/agrifood/arm-agrifood/LICENSE b/sdk/agrifood/arm-agrifood/LICENSE index 5d1d36e0af80..7d5934740965 100644 --- a/sdk/agrifood/arm-agrifood/LICENSE +++ b/sdk/agrifood/arm-agrifood/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2024 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/agrifood/arm-agrifood/README.md b/sdk/agrifood/arm-agrifood/README.md index c298ccf9ae90..3d11aa368956 100644 --- a/sdk/agrifood/arm-agrifood/README.md +++ b/sdk/agrifood/arm-agrifood/README.md @@ -2,7 +2,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure AgriFoodMgmt client. -APIs documentation for Azure AgFoodPlatform Resource Provider Service. +APIs documentation for Microsoft Azure Data Manager for Agriculture Service. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/agrifood/arm-agrifood) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-agrifood) | diff --git a/sdk/agrifood/arm-agrifood/_meta.json b/sdk/agrifood/arm-agrifood/_meta.json index 354ce2bff77c..96fb255e608e 100644 --- a/sdk/agrifood/arm-agrifood/_meta.json +++ b/sdk/agrifood/arm-agrifood/_meta.json @@ -1,8 +1,8 @@ { - "commit": "3eb2a407e29fa9c79cf537722384b12b9753d59e", + "commit": "c3e0e0e6687944c36aa8061bf0e1da45ec68fae9", "readme": "specification/agrifood/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\agrifood\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/agrifood/resource-manager/readme.md --use=@autorest/typescript@^6.0.11", + "repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.5", + "use": "@autorest/typescript@^6.0.11" } \ No newline at end of file diff --git a/sdk/agrifood/arm-agrifood/package.json b/sdk/agrifood/arm-agrifood/package.json index 000c0feaeda0..6ae17bf0d999 100644 --- a/sdk/agrifood/arm-agrifood/package.json +++ b/sdk/agrifood/arm-agrifood/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AgriFoodMgmtClient.", - "version": "1.0.0-beta.5", + "version": "1.0.0-beta.6", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.6.0", + "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, "keywords": [ @@ -29,22 +29,24 @@ "types": "./types/arm-agrifood.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "mkdirp": "^1.0.4", - "typescript": "~5.2.0", + "mkdirp": "^3.0.1", + "typescript": "~5.4.5", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", - "@azure/identity": "^3.3.0", + "rimraf": "^5.0.0", + "dotenv": "^16.0.0", + "@azure/dev-tool": "^1.0.0", + "@azure/identity": "^4.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^10.0.0", + "@types/mocha": "^10.0.0", + "esm": "^3.2.18", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^18.0.0", - "@azure/dev-tool": "^1.0.0", "ts-node": "^10.0.0" }, - "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" @@ -76,8 +78,7 @@ "pack": "npm pack 2>&1", "extract-api": "api-extractor run --local", "lint": "echo skipped", - "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -105,12 +106,5 @@ ] }, "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-agrifood?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/agrifood/arm-agrifood" +} \ No newline at end of file diff --git a/sdk/agrifood/arm-agrifood/review/arm-agrifood.api.md b/sdk/agrifood/arm-agrifood/review/arm-agrifood.api.md index c02cbffb804a..0a5323ed3b56 100644 --- a/sdk/agrifood/arm-agrifood/review/arm-agrifood.api.md +++ b/sdk/agrifood/arm-agrifood/review/arm-agrifood.api.md @@ -6,9 +6,9 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export type ActionType = string; @@ -18,16 +18,21 @@ export class AgriFoodMgmtClient extends coreClient.ServiceClient { // (undocumented) $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AgriFoodMgmtClientOptionalParams); + constructor(credentials: coreAuth.TokenCredential, options?: AgriFoodMgmtClientOptionalParams); // (undocumented) apiVersion: string; // (undocumented) - extensions: Extensions; + checkNameAvailability: CheckNameAvailability; + // (undocumented) + dataConnectors: DataConnectors; // (undocumented) - farmBeatsExtensions: FarmBeatsExtensions; + dataManagerForAgricultureExtensions: DataManagerForAgricultureExtensions; // (undocumented) - farmBeatsModels: FarmBeatsModels; + dataManagerForAgricultureResources: DataManagerForAgricultureResources; // (undocumented) - locations: Locations; + extensions: Extensions; + // (undocumented) + operationResults: OperationResults; // (undocumented) operations: Operations; // (undocumented) @@ -35,7 +40,11 @@ export class AgriFoodMgmtClient extends coreClient.ServiceClient { // (undocumented) privateLinkResources: PrivateLinkResources; // (undocumented) - subscriptionId: string; + solutions: Solutions; + // (undocumented) + solutionsDiscoverability: SolutionsDiscoverability; + // (undocumented) + subscriptionId?: string; } // @public @@ -45,11 +54,52 @@ export interface AgriFoodMgmtClientOptionalParams extends coreClient.ServiceClie endpoint?: string; } +// @public +export interface ApiKeyAuthCredentials extends AuthCredentials { + apiKey: KeyVaultProperties; + kind: "ApiKeyAuthCredentials"; +} + +// @public +export interface ApiProperties { + apiFreshnessTimeInMinutes?: number; +} + // @public export interface ArmAsyncOperation { + error?: ArmAsyncOperationError; status?: string; } +// @public +export interface ArmAsyncOperationError { + code?: string; + message?: string; +} + +// @public +export interface AuthCredentials { + kind: "ApiKeyAuthCredentials" | "OAuthClientCredentials"; +} + +// @public +export type AuthCredentialsKind = string; + +// @public (undocumented) +export type AuthCredentialsUnion = AuthCredentials | ApiKeyAuthCredentials | OAuthClientCredentials; + +// @public +export interface CheckNameAvailability { + checkNameAvailability(nameAvailabilityRequest: CheckNameAvailabilityRequest, options?: CheckNameAvailabilityCheckNameAvailabilityOptionalParams): Promise; +} + +// @public +export interface CheckNameAvailabilityCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CheckNameAvailabilityCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; + // @public export type CheckNameAvailabilityReason = string; @@ -70,118 +120,88 @@ export interface CheckNameAvailabilityResponse { export type CreatedByType = string; // @public -export interface DetailedInformation { - apiInputParameters?: string[]; - apiName?: string; - customParameters?: string[]; - platformParameters?: string[]; - unitsSupported?: UnitSystemsInfo; +export interface DataConnector extends ProxyResource { + readonly eTag?: string; + properties: DataConnectorProperties; } // @public -export interface ErrorAdditionalInfo { - readonly info?: Record; - readonly type?: string; +export interface DataConnectorListResponse { + nextLink?: string; + value: DataConnector[]; } // @public -export interface ErrorDetail { - readonly additionalInfo?: ErrorAdditionalInfo[]; - readonly code?: string; - readonly details?: ErrorDetail[]; - readonly message?: string; - readonly target?: string; +export interface DataConnectorProperties { + credentials: AuthCredentialsUnion; } // @public -export interface ErrorResponse { - error?: ErrorDetail; +export interface DataConnectors { + createOrUpdate(resourceGroupName: string, dataManagerForAgricultureResourceName: string, dataConnectorName: string, body: DataConnector, options?: DataConnectorsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, dataManagerForAgricultureResourceName: string, dataConnectorName: string, options?: DataConnectorsDeleteOptionalParams): Promise; + get(resourceGroupName: string, dataManagerForAgricultureResourceName: string, dataConnectorName: string, options?: DataConnectorsGetOptionalParams): Promise; + list(resourceGroupName: string, dataManagerForAgricultureResourceName: string, options?: DataConnectorsListOptionalParams): PagedAsyncIterableIterator; } // @public -export interface Extension extends ProxyResource { - readonly eTag?: string; - readonly extensionApiDocsLink?: string; - readonly extensionAuthLink?: string; - readonly extensionCategory?: string; - readonly extensionId?: string; - readonly installedExtensionVersion?: string; +export interface DataConnectorsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { } // @public -export interface ExtensionListResponse { - readonly nextLink?: string; - value?: Extension[]; -} +export type DataConnectorsCreateOrUpdateResponse = DataConnector; // @public -export interface Extensions { - create(resourceGroupName: string, farmBeatsResourceName: string, extensionId: string, options?: ExtensionsCreateOptionalParams): Promise; - delete(resourceGroupName: string, farmBeatsResourceName: string, extensionId: string, options?: ExtensionsDeleteOptionalParams): Promise; - get(resourceGroupName: string, farmBeatsResourceName: string, extensionId: string, options?: ExtensionsGetOptionalParams): Promise; - listByFarmBeats(resourceGroupName: string, farmBeatsResourceName: string, options?: ExtensionsListByFarmBeatsOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, farmBeatsResourceName: string, extensionId: string, options?: ExtensionsUpdateOptionalParams): Promise; +export interface DataConnectorsDeleteOptionalParams extends coreClient.OperationOptions { } // @public -export interface ExtensionsCreateOptionalParams extends coreClient.OperationOptions { +export interface DataConnectorsGetOptionalParams extends coreClient.OperationOptions { } // @public -export type ExtensionsCreateResponse = Extension; +export type DataConnectorsGetResponse = DataConnector; // @public -export interface ExtensionsDeleteOptionalParams extends coreClient.OperationOptions { +export interface DataConnectorsListNextOptionalParams extends coreClient.OperationOptions { } // @public -export interface ExtensionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ExtensionsGetResponse = Extension; +export type DataConnectorsListNextResponse = DataConnectorListResponse; // @public -export interface ExtensionsListByFarmBeatsNextOptionalParams extends coreClient.OperationOptions { - extensionCategories?: string[]; - extensionIds?: string[]; +export interface DataConnectorsListOptionalParams extends coreClient.OperationOptions { maxPageSize?: number; skipToken?: string; } // @public -export type ExtensionsListByFarmBeatsNextResponse = ExtensionListResponse; +export type DataConnectorsListResponse = DataConnectorListResponse; // @public -export interface ExtensionsListByFarmBeatsOptionalParams extends coreClient.OperationOptions { - extensionCategories?: string[]; - extensionIds?: string[]; - maxPageSize?: number; - skipToken?: string; +export interface DataManagerForAgriculture extends TrackedResource { + identity?: Identity; + readonly instanceUri?: string; + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + readonly provisioningState?: ProvisioningState; + publicNetworkAccess?: PublicNetworkAccess; + sensorIntegration?: SensorIntegration; } // @public -export type ExtensionsListByFarmBeatsResponse = ExtensionListResponse; - -// @public -export interface ExtensionsUpdateOptionalParams extends coreClient.OperationOptions { +export interface DataManagerForAgricultureExtension extends ProxyResource { + properties?: DataManagerForAgricultureExtensionProperties; } // @public -export type ExtensionsUpdateResponse = Extension; - -// @public -export interface FarmBeats extends TrackedResource { - identity?: Identity; - readonly instanceUri?: string; - readonly privateEndpointConnections?: PrivateEndpointConnection; - readonly provisioningState?: ProvisioningState; - publicNetworkAccess?: PublicNetworkAccess; - sensorIntegration?: SensorIntegration; +export interface DataManagerForAgricultureExtensionListResponse { + nextLink?: string; + skipToken?: string; + value: DataManagerForAgricultureExtension[]; } // @public -export interface FarmBeatsExtension extends ProxyResource { +export interface DataManagerForAgricultureExtensionProperties { readonly description?: string; readonly detailedInformation?: DetailedInformation[]; readonly extensionApiDocsLink?: string; @@ -195,38 +215,27 @@ export interface FarmBeatsExtension extends ProxyResource { } // @public -export interface FarmBeatsExtensionListResponse { - readonly nextLink?: string; - value?: FarmBeatsExtension[]; +export interface DataManagerForAgricultureExtensions { + get(dataManagerForAgricultureExtensionId: string, options?: DataManagerForAgricultureExtensionsGetOptionalParams): Promise; + list(options?: DataManagerForAgricultureExtensionsListOptionalParams): PagedAsyncIterableIterator; } // @public -export interface FarmBeatsExtensions { - get(farmBeatsExtensionId: string, options?: FarmBeatsExtensionsGetOptionalParams): Promise; - list(options?: FarmBeatsExtensionsListOptionalParams): PagedAsyncIterableIterator; +export interface DataManagerForAgricultureExtensionsGetOptionalParams extends coreClient.OperationOptions { } // @public -export interface FarmBeatsExtensionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type FarmBeatsExtensionsGetResponse = FarmBeatsExtension; +export type DataManagerForAgricultureExtensionsGetResponse = DataManagerForAgricultureExtension; // @public -export interface FarmBeatsExtensionsListNextOptionalParams extends coreClient.OperationOptions { - extensionCategories?: string[]; - farmBeatsExtensionIds?: string[]; - farmBeatsExtensionNames?: string[]; - maxPageSize?: number; - publisherIds?: string[]; +export interface DataManagerForAgricultureExtensionsListNextOptionalParams extends coreClient.OperationOptions { } // @public -export type FarmBeatsExtensionsListNextResponse = FarmBeatsExtensionListResponse; +export type DataManagerForAgricultureExtensionsListNextResponse = DataManagerForAgricultureExtensionListResponse; // @public -export interface FarmBeatsExtensionsListOptionalParams extends coreClient.OperationOptions { +export interface DataManagerForAgricultureExtensionsListOptionalParams extends coreClient.OperationOptions { extensionCategories?: string[]; farmBeatsExtensionIds?: string[]; farmBeatsExtensionNames?: string[]; @@ -235,118 +244,242 @@ export interface FarmBeatsExtensionsListOptionalParams extends coreClient.Operat } // @public -export type FarmBeatsExtensionsListResponse = FarmBeatsExtensionListResponse; +export type DataManagerForAgricultureExtensionsListResponse = DataManagerForAgricultureExtensionListResponse; // @public -export interface FarmBeatsListResponse { - readonly nextLink?: string; - value?: FarmBeats[]; +export interface DataManagerForAgricultureListResponse { + nextLink?: string; + skipToken?: string; + value: DataManagerForAgriculture[]; } // @public -export interface FarmBeatsModels { - beginUpdate(resourceGroupName: string, farmBeatsResourceName: string, body: FarmBeatsUpdateRequestModel, options?: FarmBeatsModelsUpdateOptionalParams): Promise, FarmBeatsModelsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, farmBeatsResourceName: string, body: FarmBeatsUpdateRequestModel, options?: FarmBeatsModelsUpdateOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, farmBeatsResourceName: string, body: FarmBeats, options?: FarmBeatsModelsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, farmBeatsResourceName: string, options?: FarmBeatsModelsDeleteOptionalParams): Promise; - get(resourceGroupName: string, farmBeatsResourceName: string, options?: FarmBeatsModelsGetOptionalParams): Promise; - getOperationResult(resourceGroupName: string, farmBeatsResourceName: string, operationResultsId: string, options?: FarmBeatsModelsGetOperationResultOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: FarmBeatsModelsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: FarmBeatsModelsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +export interface DataManagerForAgricultureResources { + beginUpdate(resourceGroupName: string, dataManagerForAgricultureResourceName: string, request: DataManagerForAgricultureUpdateRequestModel, options?: DataManagerForAgricultureResourcesUpdateOptionalParams): Promise, DataManagerForAgricultureResourcesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, dataManagerForAgricultureResourceName: string, request: DataManagerForAgricultureUpdateRequestModel, options?: DataManagerForAgricultureResourcesUpdateOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, dataManagerForAgricultureResourceName: string, request: DataManagerForAgriculture, options?: DataManagerForAgricultureResourcesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, dataManagerForAgricultureResourceName: string, options?: DataManagerForAgricultureResourcesDeleteOptionalParams): Promise; + get(resourceGroupName: string, dataManagerForAgricultureResourceName: string, options?: DataManagerForAgricultureResourcesGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: DataManagerForAgricultureResourcesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: DataManagerForAgricultureResourcesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; } // @public -export interface FarmBeatsModelsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface DataManagerForAgricultureResourcesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { } // @public -export type FarmBeatsModelsCreateOrUpdateResponse = FarmBeats; +export type DataManagerForAgricultureResourcesCreateOrUpdateResponse = DataManagerForAgriculture; // @public -export interface FarmBeatsModelsDeleteOptionalParams extends coreClient.OperationOptions { +export interface DataManagerForAgricultureResourcesDeleteOptionalParams extends coreClient.OperationOptions { } // @public -export interface FarmBeatsModelsGetOperationResultOptionalParams extends coreClient.OperationOptions { +export interface DataManagerForAgricultureResourcesGetOptionalParams extends coreClient.OperationOptions { } // @public -export type FarmBeatsModelsGetOperationResultResponse = ArmAsyncOperation; +export type DataManagerForAgricultureResourcesGetResponse = DataManagerForAgriculture; // @public -export interface FarmBeatsModelsGetOptionalParams extends coreClient.OperationOptions { +export interface DataManagerForAgricultureResourcesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { } // @public -export type FarmBeatsModelsGetResponse = FarmBeats; +export type DataManagerForAgricultureResourcesListByResourceGroupNextResponse = DataManagerForAgricultureListResponse; // @public -export interface FarmBeatsModelsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface DataManagerForAgricultureResourcesListByResourceGroupOptionalParams extends coreClient.OperationOptions { maxPageSize?: number; skipToken?: string; } // @public -export type FarmBeatsModelsListByResourceGroupNextResponse = FarmBeatsListResponse; +export type DataManagerForAgricultureResourcesListByResourceGroupResponse = DataManagerForAgricultureListResponse; // @public -export interface FarmBeatsModelsListByResourceGroupOptionalParams extends coreClient.OperationOptions { - maxPageSize?: number; - skipToken?: string; +export interface DataManagerForAgricultureResourcesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { } // @public -export type FarmBeatsModelsListByResourceGroupResponse = FarmBeatsListResponse; +export type DataManagerForAgricultureResourcesListBySubscriptionNextResponse = DataManagerForAgricultureListResponse; // @public -export interface FarmBeatsModelsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +export interface DataManagerForAgricultureResourcesListBySubscriptionOptionalParams extends coreClient.OperationOptions { maxPageSize?: number; skipToken?: string; } // @public -export type FarmBeatsModelsListBySubscriptionNextResponse = FarmBeatsListResponse; +export type DataManagerForAgricultureResourcesListBySubscriptionResponse = DataManagerForAgricultureListResponse; // @public -export interface FarmBeatsModelsListBySubscriptionOptionalParams extends coreClient.OperationOptions { - maxPageSize?: number; - skipToken?: string; +export interface DataManagerForAgricultureResourcesUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface DataManagerForAgricultureResourcesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type FarmBeatsModelsListBySubscriptionResponse = FarmBeatsListResponse; +export type DataManagerForAgricultureResourcesUpdateResponse = DataManagerForAgriculture; // @public -export interface FarmBeatsModelsUpdateHeaders { - // (undocumented) - location?: string; +export interface DataManagerForAgricultureSolution extends ProxyResource { + properties?: DataManagerForAgricultureSolutionProperties; } // @public -export interface FarmBeatsModelsUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface DataManagerForAgricultureSolutionListResponse { + nextLink?: string; + skipToken?: string; + value: DataManagerForAgricultureSolution[]; } // @public -export type FarmBeatsModelsUpdateResponse = FarmBeats; +export interface DataManagerForAgricultureSolutionProperties { + readonly accessFBApplicationId?: string; + readonly accessFBApplicationName?: string; + readonly actionIds?: string[]; + readonly dataAccessScopes?: string[]; + // (undocumented) + marketplaceOfferDetails?: MarketplaceOfferDetails; + readonly openApiSpecsDictionary?: { + [propertyName: string]: any; + }; + readonly partnerId?: string; + readonly partnerTenantId?: string; + readonly roleId?: string; + readonly roleName?: string; + readonly saaSApplicationId?: string; +} // @public -export interface FarmBeatsUpdateProperties { +export interface DataManagerForAgricultureUpdateProperties { publicNetworkAccess?: PublicNetworkAccess; sensorIntegration?: SensorIntegration; } // @public -export interface FarmBeatsUpdateRequestModel { +export interface DataManagerForAgricultureUpdateRequestModel { identity?: Identity; location?: string; - properties?: FarmBeatsUpdateProperties; + properties?: DataManagerForAgricultureUpdateProperties; tags?: { [propertyName: string]: string; }; } +// @public +export interface DetailedInformation { + apiDefaultInputParameters?: string[]; + apiDocsLink?: string; + apiInputParameters?: string[]; + apiName?: string; + apiType?: string; + customParameters?: string[]; + platformParameters?: string[]; + unitsSupported?: UnitSystemsInfo; +} + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + +// @public +export interface Extension extends ProxyResource { + readonly additionalApiProperties?: { + [propertyName: string]: ApiProperties; + }; + readonly eTag?: string; + readonly extensionApiDocsLink?: string; + readonly extensionAuthLink?: string; + readonly extensionCategory?: string; + readonly extensionId?: string; + readonly installedExtensionVersion?: string; +} + +// @public +export interface ExtensionInstallationRequest { + additionalApiProperties?: { + [propertyName: string]: ApiProperties; + }; + extensionVersion?: string; +} + +// @public +export interface ExtensionListResponse { + readonly nextLink?: string; + skipToken?: string; + value: Extension[]; +} + +// @public +export interface Extensions { + createOrUpdate(resourceGroupName: string, dataManagerForAgricultureResourceName: string, extensionId: string, options?: ExtensionsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, dataManagerForAgricultureResourceName: string, extensionId: string, options?: ExtensionsDeleteOptionalParams): Promise; + get(resourceGroupName: string, dataManagerForAgricultureResourceName: string, extensionId: string, options?: ExtensionsGetOptionalParams): Promise; + listByDataManagerForAgriculture(resourceGroupName: string, dataManagerForAgricultureResourceName: string, options?: ExtensionsListByDataManagerForAgricultureOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ExtensionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + requestBody?: ExtensionInstallationRequest; +} + +// @public +export type ExtensionsCreateOrUpdateResponse = Extension; + +// @public +export interface ExtensionsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ExtensionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExtensionsGetResponse = Extension; + +// @public +export interface ExtensionsListByDataManagerForAgricultureNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExtensionsListByDataManagerForAgricultureNextResponse = ExtensionListResponse; + +// @public +export interface ExtensionsListByDataManagerForAgricultureOptionalParams extends coreClient.OperationOptions { + extensionCategories?: string[]; + extensionIds?: string[]; + maxPageSize?: number; + skipToken?: string; +} + +// @public +export type ExtensionsListByDataManagerForAgricultureResponse = ExtensionListResponse; + // @public export function getContinuationToken(page: unknown): string | undefined; @@ -357,11 +490,24 @@ export interface Identity { type?: "SystemAssigned"; } +// @public +export interface KeyVaultProperties { + keyName: string; + keyVaultUri: string; + keyVersion: string; +} + // @public export enum KnownActionType { Internal = "Internal" } +// @public +export enum KnownAuthCredentialsKind { + ApiKeyAuthCredentials = "ApiKeyAuthCredentials", + OAuthClientCredentials = "OAuthClientCredentials" +} + // @public export enum KnownCheckNameAvailabilityReason { AlreadyExists = "AlreadyExists", @@ -403,28 +549,32 @@ export enum KnownProvisioningState { Creating = "Creating", Deleting = "Deleting", Failed = "Failed", + Running = "Running", Succeeded = "Succeeded", Updating = "Updating" } // @public export enum KnownPublicNetworkAccess { - Enabled = "Enabled", - Hybrid = "Hybrid" + Disabled = "Disabled", + Enabled = "Enabled" } -// @public -export interface Locations { - checkNameAvailability(body: CheckNameAvailabilityRequest, options?: LocationsCheckNameAvailabilityOptionalParams): Promise; +// @public (undocumented) +export interface MarketplaceOfferDetails { + // (undocumented) + publisherId?: string; + // (undocumented) + saasOfferId?: string; } // @public -export interface LocationsCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions { +export interface OAuthClientCredentials extends AuthCredentials { + clientId: string; + clientSecret: KeyVaultProperties; + kind: "OAuthClientCredentials"; } -// @public -export type LocationsCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; - // @public export interface Operation { readonly actionType?: ActionType; @@ -448,6 +598,18 @@ export interface OperationListResult { readonly value?: Operation[]; } +// @public +export interface OperationResults { + get(locations: string, operationResultsId: string, options?: OperationResultsGetOptionalParams): Promise; +} + +// @public +export interface OperationResultsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationResultsGetResponse = ArmAsyncOperation; + // @public export interface Operations { list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; @@ -477,6 +639,7 @@ export interface PrivateEndpoint { // @public export interface PrivateEndpointConnection extends Resource { + readonly groupIds?: string[]; privateEndpoint?: PrivateEndpoint; privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; readonly provisioningState?: PrivateEndpointConnectionProvisioningState; @@ -492,11 +655,11 @@ export type PrivateEndpointConnectionProvisioningState = string; // @public export interface PrivateEndpointConnections { - beginDelete(resourceGroupName: string, farmBeatsResourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, farmBeatsResourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, farmBeatsResourceName: string, privateEndpointConnectionName: string, body: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, farmBeatsResourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise; - listByResource(resourceGroupName: string, farmBeatsResourceName: string, options?: PrivateEndpointConnectionsListByResourceOptionalParams): PagedAsyncIterableIterator; + beginDelete(resourceGroupName: string, dataManagerForAgricultureResourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, dataManagerForAgricultureResourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, dataManagerForAgricultureResourceName: string, privateEndpointConnectionName: string, request: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, dataManagerForAgricultureResourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise; + listByResource(resourceGroupName: string, dataManagerForAgricultureResourceName: string, options?: PrivateEndpointConnectionsListByResourceOptionalParams): Promise; } // @public @@ -549,8 +712,8 @@ export interface PrivateLinkResourceListResult { // @public export interface PrivateLinkResources { - get(resourceGroupName: string, farmBeatsResourceName: string, subResourceName: string, options?: PrivateLinkResourcesGetOptionalParams): Promise; - listByResource(resourceGroupName: string, farmBeatsResourceName: string, options?: PrivateLinkResourcesListByResourceOptionalParams): PagedAsyncIterableIterator; + get(resourceGroupName: string, dataManagerForAgricultureResourceName: string, subResourceName: string, options?: PrivateLinkResourcesGetOptionalParams): Promise; + listByResource(resourceGroupName: string, dataManagerForAgricultureResourceName: string, options?: PrivateLinkResourcesListByResourceOptionalParams): Promise; } // @public @@ -599,6 +762,114 @@ export interface SensorIntegration { readonly provisioningState?: ProvisioningState; } +// @public +export interface Solution extends ProxyResource { + readonly eTag?: string; + properties?: SolutionProperties; +} + +// @public +export interface SolutionListResponse { + nextLink?: string; + skipToken?: string; + value: Solution[]; +} + +// @public +export interface SolutionProperties { + [property: string]: any; + marketplacePublisherId: string; + offerId: string; + readonly partnerId?: string; + planId: string; + roleAssignmentId?: string; + saasSubscriptionId: string; + saasSubscriptionName: string; + termId: string; +} + +// @public +export interface Solutions { + createOrUpdate(resourceGroupName: string, dataManagerForAgricultureResourceName: string, solutionId: string, options?: SolutionsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, dataManagerForAgricultureResourceName: string, solutionId: string, options?: SolutionsDeleteOptionalParams): Promise; + get(resourceGroupName: string, dataManagerForAgricultureResourceName: string, solutionId: string, options?: SolutionsGetOptionalParams): Promise; + list(resourceGroupName: string, dataManagerForAgricultureResourceName: string, options?: SolutionsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SolutionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + requestBody?: Solution; +} + +// @public +export type SolutionsCreateOrUpdateResponse = Solution; + +// @public +export interface SolutionsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface SolutionsDiscoverability { + get(dataManagerForAgricultureSolutionId: string, options?: SolutionsDiscoverabilityGetOptionalParams): Promise; + list(options?: SolutionsDiscoverabilityListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SolutionsDiscoverabilityGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SolutionsDiscoverabilityGetResponse = DataManagerForAgricultureSolution; + +// @public +export interface SolutionsDiscoverabilityListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SolutionsDiscoverabilityListNextResponse = DataManagerForAgricultureSolutionListResponse; + +// @public +export interface SolutionsDiscoverabilityListOptionalParams extends coreClient.OperationOptions { + farmBeatsSolutionIds?: string[]; + farmBeatsSolutionNames?: string[]; + maxPageSize?: number; +} + +// @public +export type SolutionsDiscoverabilityListResponse = DataManagerForAgricultureSolutionListResponse; + +// @public +export interface SolutionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SolutionsGetResponse = Solution; + +// @public +export interface SolutionsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SolutionsListNextResponse = SolutionListResponse; + +// @public +export interface SolutionsListOptionalParams extends coreClient.OperationOptions { + ids?: string[]; + maxCreatedDateTime?: Date; + maxLastModifiedDateTime?: Date; + maxPageSize?: number; + minCreatedDateTime?: Date; + minLastModifiedDateTime?: Date; + names?: string[]; + propertyFilters?: string[]; + skipToken?: string; + solutionIds?: string[]; + statuses?: string[]; +} + +// @public +export type SolutionsListResponse = SolutionListResponse; + // @public export interface SystemData { createdAt?: Date; diff --git a/sdk/agrifood/arm-agrifood/src/agriFoodMgmtClient.ts b/sdk/agrifood/arm-agrifood/src/agriFoodMgmtClient.ts index 21009e82c3a8..335ed619c58c 100644 --- a/sdk/agrifood/arm-agrifood/src/agriFoodMgmtClient.ts +++ b/sdk/agrifood/arm-agrifood/src/agriFoodMgmtClient.ts @@ -11,50 +11,72 @@ import * as coreRestPipeline from "@azure/core-rest-pipeline"; import { PipelineRequest, PipelineResponse, - SendRequest + SendRequest, } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { + CheckNameAvailabilityImpl, + DataConnectorsImpl, + DataManagerForAgricultureExtensionsImpl, + DataManagerForAgricultureResourcesImpl, + OperationResultsImpl, ExtensionsImpl, - FarmBeatsExtensionsImpl, - FarmBeatsModelsImpl, - LocationsImpl, OperationsImpl, PrivateEndpointConnectionsImpl, - PrivateLinkResourcesImpl + PrivateLinkResourcesImpl, + SolutionsImpl, + SolutionsDiscoverabilityImpl, } from "./operations"; import { + CheckNameAvailability, + DataConnectors, + DataManagerForAgricultureExtensions, + DataManagerForAgricultureResources, + OperationResults, Extensions, - FarmBeatsExtensions, - FarmBeatsModels, - Locations, Operations, PrivateEndpointConnections, - PrivateLinkResources + PrivateLinkResources, + Solutions, + SolutionsDiscoverability, } from "./operationsInterfaces"; import { AgriFoodMgmtClientOptionalParams } from "./models"; export class AgriFoodMgmtClient extends coreClient.ServiceClient { $host: string; - subscriptionId: string; + subscriptionId?: string; apiVersion: string; /** * Initializes a new instance of the AgriFoodMgmtClient class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param options The parameter options */ constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, - options?: AgriFoodMgmtClientOptionalParams + options?: AgriFoodMgmtClientOptionalParams, + ); + constructor( + credentials: coreAuth.TokenCredential, + options?: AgriFoodMgmtClientOptionalParams, + ); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: AgriFoodMgmtClientOptionalParams | string, + options?: AgriFoodMgmtClientOptionalParams, ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); + + let subscriptionId: string | undefined; + + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; } // Initializing default values for options @@ -63,10 +85,10 @@ export class AgriFoodMgmtClient extends coreClient.ServiceClient { } const defaults: AgriFoodMgmtClientOptionalParams = { requestContentType: "application/json; charset=utf-8", - credential: credentials + credential: credentials, }; - const packageDetails = `azsdk-js-arm-agrifood/1.0.0-beta.5`; + const packageDetails = `azsdk-js-arm-agrifood/1.0.0-beta.6`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -76,20 +98,21 @@ export class AgriFoodMgmtClient extends coreClient.ServiceClient { ...defaults, ...options, userAgentOptions: { - userAgentPrefix + userAgentPrefix, }, endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + 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 + coreRestPipeline.bearerTokenAuthenticationPolicyName, ); } if ( @@ -99,7 +122,7 @@ export class AgriFoodMgmtClient extends coreClient.ServiceClient { !bearerTokenAuthenticationPolicyFound ) { this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName + name: coreRestPipeline.bearerTokenAuthenticationPolicyName, }); this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ @@ -109,9 +132,9 @@ export class AgriFoodMgmtClient extends coreClient.ServiceClient { `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) + coreClient.authorizeRequestOnClaimChallenge, + }, + }), ); } // Parameter assignments @@ -119,14 +142,20 @@ export class AgriFoodMgmtClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-09-01-preview"; + this.apiVersion = options.apiVersion || "2023-06-01-preview"; + this.checkNameAvailability = new CheckNameAvailabilityImpl(this); + this.dataConnectors = new DataConnectorsImpl(this); + this.dataManagerForAgricultureExtensions = + new DataManagerForAgricultureExtensionsImpl(this); + this.dataManagerForAgricultureResources = + new DataManagerForAgricultureResourcesImpl(this); + this.operationResults = new OperationResultsImpl(this); this.extensions = new ExtensionsImpl(this); - this.farmBeatsExtensions = new FarmBeatsExtensionsImpl(this); - this.farmBeatsModels = new FarmBeatsModelsImpl(this); - this.locations = new LocationsImpl(this); this.operations = new OperationsImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); + this.solutions = new SolutionsImpl(this); + this.solutionsDiscoverability = new SolutionsDiscoverabilityImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -139,7 +168,7 @@ export class AgriFoodMgmtClient extends coreClient.ServiceClient { name: "CustomApiVersionPolicy", async sendRequest( request: PipelineRequest, - next: SendRequest + next: SendRequest, ): Promise { const param = request.url.split("?"); if (param.length > 1) { @@ -153,16 +182,20 @@ export class AgriFoodMgmtClient extends coreClient.ServiceClient { request.url = param[0] + "?" + newParams.join("&"); } return next(request); - } + }, }; this.pipeline.addPolicy(apiVersionPolicy); } + checkNameAvailability: CheckNameAvailability; + dataConnectors: DataConnectors; + dataManagerForAgricultureExtensions: DataManagerForAgricultureExtensions; + dataManagerForAgricultureResources: DataManagerForAgricultureResources; + operationResults: OperationResults; extensions: Extensions; - farmBeatsExtensions: FarmBeatsExtensions; - farmBeatsModels: FarmBeatsModels; - locations: Locations; operations: Operations; privateEndpointConnections: PrivateEndpointConnections; privateLinkResources: PrivateLinkResources; + solutions: Solutions; + solutionsDiscoverability: SolutionsDiscoverability; } diff --git a/sdk/agrifood/arm-agrifood/src/lroImpl.ts b/sdk/agrifood/arm-agrifood/src/lroImpl.ts index 518d5f053b4e..b27f5ac7209b 100644 --- a/sdk/agrifood/arm-agrifood/src/lroImpl.ts +++ b/sdk/agrifood/arm-agrifood/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike }, + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal, + }); + }, + }; } diff --git a/sdk/agrifood/arm-agrifood/src/models/index.ts b/sdk/agrifood/arm-agrifood/src/models/index.ts index 8410b9cb9777..8c5c038ba4b1 100644 --- a/sdk/agrifood/arm-agrifood/src/models/index.ts +++ b/sdk/agrifood/arm-agrifood/src/models/index.ts @@ -8,10 +8,94 @@ import * as coreClient from "@azure/core-client"; +export type AuthCredentialsUnion = + | AuthCredentials + | ApiKeyAuthCredentials + | OAuthClientCredentials; + +/** The check availability request body. */ +export interface CheckNameAvailabilityRequest { + /** The name of the resource for which availability needs to be checked. */ + name?: string; + /** The resource type. */ + type?: string; +} + +/** The check availability result. */ +export interface CheckNameAvailabilityResponse { + /** Indicates if the resource name is available. */ + nameAvailable?: boolean; + /** The reason why the given name is not available. */ + reason?: CheckNameAvailabilityReason; + /** Detailed reason why the given name is available. */ + message?: string; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** DataConnector Properties. */ +export interface DataConnectorProperties { + /** AuthCredentials abstract base class for Auth Purpose. */ + credentials: AuthCredentialsUnion; +} + +/** AuthCredentials abstract base class for Auth Purpose. */ +export interface AuthCredentials { + /** Polymorphic discriminator, which specifies the different types this object can be */ + kind: "ApiKeyAuthCredentials" | "OAuthClientCredentials"; +} + /** 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} + * Fully qualified resource ID for the resource. E.g. "/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; @@ -48,85 +132,95 @@ export interface SystemData { lastModifiedAt?: Date; } -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface ErrorResponse { - /** The error object. */ - error?: ErrorDetail; +/** Paged response contains list of requested objects and a URL link to get the next set of results. */ +export interface DataConnectorListResponse { + /** List of requested objects. */ + value: DataConnector[]; + /** Continuation link (absolute URI) to the next page of results in the list. */ + nextLink?: string; } -/** The error detail. */ -export interface ErrorDetail { +/** Paged response contains list of requested objects and a URL link to get the next set of results. */ +export interface DataManagerForAgricultureExtensionListResponse { + /** List of requested objects. */ + value: DataManagerForAgricultureExtension[]; + /** Token used in retrieving the next page. If null, there are no additional pages. */ + skipToken?: string; + /** Continuation link (absolute URI) to the next page of results in the list. */ + nextLink?: string; +} + +/** DataManagerForAgricultureExtension properties. */ +export interface DataManagerForAgricultureExtensionProperties { /** - * The error code. + * Target ResourceType of the Data Manager For Agriculture Extension. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly code?: string; + readonly targetResourceType?: string; /** - * The error message. + * Data Manager For Agriculture Extension ID. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message?: string; + readonly farmBeatsExtensionId?: string; /** - * The error target. + * Data Manager For Agriculture Extension name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly target?: string; + readonly farmBeatsExtensionName?: string; /** - * The error details. + * Data Manager For Agriculture Extension version. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly details?: ErrorDetail[]; + readonly farmBeatsExtensionVersion?: string; /** - * The error additional info. + * Publisher ID. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface ErrorAdditionalInfo { + readonly publisherId?: string; /** - * The additional info type. + * Textual description. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly description?: string; /** - * The additional info. + * Category of the extension. e.g. weather/sensor/satellite. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly info?: Record; -} - -/** Paged response contains list of requested objects and a URL link to get the next set of results. */ -export interface ExtensionListResponse { - /** List of requested objects. */ - value?: Extension[]; + readonly extensionCategory?: string; /** - * Continuation link (absolute URI) to the next page of results in the list. + * Data Manager For Agriculture Extension auth link. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** Paged response contains list of requested objects and a URL link to get the next set of results. */ -export interface FarmBeatsExtensionListResponse { - /** List of requested objects. */ - value?: FarmBeatsExtension[]; + readonly extensionAuthLink?: string; /** - * Continuation link (absolute URI) to the next page of results in the list. + * Data Manager For Agriculture Extension api docs link. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly extensionApiDocsLink?: string; + /** + * Detailed information which shows summary of requested data. + * Used in descriptive get extension metadata call. + * Information for weather category per api included are apisSupported, + * customParameters, PlatformParameters and Units supported. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly detailedInformation?: DetailedInformation[]; } -/** Model to capture detailed information for farmBeatsExtensions. */ +/** Model to capture detailed information for Data Manager For AgricultureExtensions. */ export interface DetailedInformation { - /** ApiName available for the farmBeatsExtension. */ + /** ApiName available for the Data Manager For Agriculture Extension. */ apiName?: string; + /** Extension provider's API documentation link. */ + apiDocsLink?: string; + /** Type of Api in Extension. */ + apiType?: string; /** List of customParameters. */ customParameters?: string[]; /** List of platformParameters. */ platformParameters?: string[]; + /** List of defaultParameters. */ + apiDefaultInputParameters?: string[]; /** Unit systems info for the data provider. */ unitsSupported?: UnitSystemsInfo; /** List of apiInputParameters. */ @@ -144,12 +238,12 @@ export interface UnitSystemsInfo { /** Identity for the resource. */ export interface Identity { /** - * The principal ID of resource identity. + * The principal ID of resource identity. The value must be an UUID. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly principalId?: string; /** - * The tenant ID of resource. + * The tenant ID of resource. The value must be an UUID. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly tenantId?: string; @@ -159,7 +253,7 @@ export interface Identity { /** Sensor integration request model. */ export interface SensorIntegration { - /** Sensor integration enable state. Allowed values are True, None */ + /** Sensor integration enable state. */ enabled?: string; /** * Sensor integration instance provisioning state. @@ -170,10 +264,10 @@ export interface SensorIntegration { provisioningInfo?: ErrorResponse; } -/** The Private Endpoint resource. */ +/** The private endpoint resource. */ export interface PrivateEndpoint { /** - * The ARM identifier for Private Endpoint + * The ARM identifier for private endpoint. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; @@ -189,35 +283,34 @@ export interface PrivateLinkServiceConnectionState { actionsRequired?: string; } -/** FarmBeats update request. */ -export interface FarmBeatsUpdateRequestModel { +/** DataManagerForAgriculture update request. */ +export interface DataManagerForAgricultureUpdateRequestModel { /** Geo-location where the resource lives. */ location?: string; /** Identity for the resource. */ identity?: Identity; - /** FarmBeats ARM Resource properties. */ - properties?: FarmBeatsUpdateProperties; + /** Data Manager For Agriculture ARM Resource properties. */ + properties?: DataManagerForAgricultureUpdateProperties; /** Resource tags. */ tags?: { [propertyName: string]: string }; } -/** FarmBeats ARM Resource properties. */ -export interface FarmBeatsUpdateProperties { +/** Data Manager For Agriculture ARM Resource properties. */ +export interface DataManagerForAgricultureUpdateProperties { /** Sensor integration request model. */ sensorIntegration?: SensorIntegration; - /** Property to allow or block public traffic for an Azure FarmBeats resource. */ + /** Property to allow or block public traffic for an Azure Data Manager For Agriculture resource. */ publicNetworkAccess?: PublicNetworkAccess; } /** Paged response contains list of requested objects and a URL link to get the next set of results. */ -export interface FarmBeatsListResponse { +export interface DataManagerForAgricultureListResponse { /** List of requested objects. */ - value?: FarmBeats[]; - /** - * Continuation link (absolute URI) to the next page of results in the list. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + value: DataManagerForAgriculture[]; + /** Token used in retrieving the next page. If null, there are no additional pages. */ + skipToken?: string; + /** Continuation link (absolute URI) to the next page of results in the list. */ + nextLink?: string; } /** @@ -227,24 +320,49 @@ export interface FarmBeatsListResponse { export interface ArmAsyncOperation { /** Status of the async operation. */ status?: string; + /** + * Arm async operation error class. + * Ref: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#azure-asyncoperation-resource-format. + */ + error?: ArmAsyncOperationError; } -/** The check availability request body. */ -export interface CheckNameAvailabilityRequest { - /** The name of the resource for which availability needs to be checked. */ - name?: string; - /** The resource type. */ - type?: string; +/** + * Arm async operation error class. + * Ref: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#azure-asyncoperation-resource-format. + */ +export interface ArmAsyncOperationError { + /** Status of the async operation. */ + code?: string; + /** Status of the async operation. */ + message?: string; } -/** The check availability result. */ -export interface CheckNameAvailabilityResponse { - /** Indicates if the resource name is available. */ - nameAvailable?: boolean; - /** The reason why the given name is not available. */ - reason?: CheckNameAvailabilityReason; - /** Detailed reason why the given name is available. */ - message?: string; +/** Extension Installation Request Body. */ +export interface ExtensionInstallationRequest { + /** Extension Version. */ + extensionVersion?: string; + /** Additional Api Properties. */ + additionalApiProperties?: { [propertyName: string]: ApiProperties }; +} + +/** Api properties. */ +export interface ApiProperties { + /** Interval in minutes for which the weather data for the api needs to be refreshed. */ + apiFreshnessTimeInMinutes?: number; +} + +/** Paged response contains list of requested objects and a URL link to get the next set of results. */ +export interface ExtensionListResponse { + /** List of requested objects. */ + value: Extension[]; + /** Token used in retrieving the next page. If null, there are no additional pages. */ + skipToken?: string; + /** + * Continuation link (absolute URI) to the next page of results in the list. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ @@ -311,24 +429,163 @@ export interface OperationDisplay { readonly description?: string; } -/** List of private endpoint connection associated with the specified storage account */ +/** List of private endpoint connections associated with the specified resource. */ export interface PrivateEndpointConnectionListResult { - /** Array of private endpoint connections */ + /** Array of private endpoint connections. */ value?: PrivateEndpointConnection[]; } -/** A list of private link resources */ +/** A list of private link resources. */ export interface PrivateLinkResourceListResult { /** Array of private link resources */ value?: PrivateLinkResource[]; } +/** Solution resource properties. */ +export interface SolutionProperties { + /** Describes unknown properties. The value of an unknown property can be of "any" type. */ + [property: string]: any; + /** + * Partner Id of the Solution. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly partnerId?: string; + /** SaaS subscriptionId of the installed SaaS application. */ + saasSubscriptionId: string; + /** SaaS subscription name of the installed SaaS application. */ + saasSubscriptionName: string; + /** SaaS application Marketplace Publisher Id. */ + marketplacePublisherId: string; + /** SaaS application Plan Id. */ + planId: string; + /** Role Assignment Id. */ + roleAssignmentId?: string; + /** SaaS application Offer Id. */ + offerId: string; + /** SaaS application Term Id. */ + termId: string; +} + +/** Paged response contains list of requested objects and a URL link to get the next set of results. */ +export interface SolutionListResponse { + /** List of requested objects. */ + value: Solution[]; + /** Token used in retrieving the next page. If null, there are no additional pages. */ + skipToken?: string; + /** Continuation link (absolute URI) to the next page of results in the list. */ + nextLink?: string; +} + +/** Paged response contains list of requested objects and a URL link to get the next set of results. */ +export interface DataManagerForAgricultureSolutionListResponse { + /** List of requested objects. */ + value: DataManagerForAgricultureSolution[]; + /** Token used in retrieving the next page. If null, there are no additional pages. */ + skipToken?: string; + /** Continuation link (absolute URI) to the next page of results in the list. */ + nextLink?: string; +} + +/** DataManagerForAgricultureSolution properties. */ +export interface DataManagerForAgricultureSolutionProperties { + /** + * Solution Partner Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly partnerId?: string; + /** + * Solution Partner Tenant Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly partnerTenantId?: string; + /** + * Gets scope of the Data manager For Agriculture data access that's required for processing solution request to partner. + * Example: For gdd they might need weatherScope and satelliteScope. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dataAccessScopes?: string[]; + marketplaceOfferDetails?: MarketplaceOfferDetails; + /** + * Gets api-version Swagger Document Dictionary to capture all api-versions of swagger exposed by partner to Data Manager For Agriculture. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly openApiSpecsDictionary?: { [propertyName: string]: any }; + /** + * Application id of the multi tenant application to be used by partner to access Data Manager For Agriculture data. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly accessFBApplicationId?: string; + /** + * Application id of the SaaS multi tenant application. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly saaSApplicationId?: string; + /** + * List of ActionIds needed to make the SaaS multi tenant application access relevant fb data. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionIds?: string[]; + /** + * Role Id of the SaaS multi tenant application to access relevant fb data. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly roleId?: string; + /** + * Role Name of the SaaS multi tenant application to access relevant fb data. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly roleName?: string; + /** + * Application name of the multi tenant application to be used by partner to access Data Manager For Agriculture Data. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly accessFBApplicationName?: string; +} + +export interface MarketplaceOfferDetails { + saasOfferId?: string; + publisherId?: string; +} + +/** Properties of the key vault. */ +export interface KeyVaultProperties { + /** Uri of the key vault. */ + keyVaultUri: string; + /** Name of Key Vault key. */ + keyName: string; + /** Version of Key Vault key. */ + keyVersion: string; +} + +/** ApiKeyAuthCredentials class for ApiKey based Auth. */ +export interface ApiKeyAuthCredentials extends AuthCredentials { + /** Polymorphic discriminator, which specifies the different types this object can be */ + kind: "ApiKeyAuthCredentials"; + /** Properties of the key vault. */ + apiKey: KeyVaultProperties; +} + +/** OAuthClientCredentials for clientId clientSecret auth. */ +export interface OAuthClientCredentials extends AuthCredentials { + /** Polymorphic discriminator, which specifies the different types this object can be */ + kind: "OAuthClientCredentials"; + /** ClientId associated with the provider. */ + clientId: string; + /** Properties of the key vault. */ + clientSecret: KeyVaultProperties; +} + /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} -/** The Private Endpoint Connection resource. */ +/** The private endpoint connection resource. */ export interface PrivateEndpointConnection extends Resource { - /** The resource of private end point. */ + /** + * The group ids for the private endpoint resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groupIds?: string[]; + /** The private endpoint resource. */ privateEndpoint?: PrivateEndpoint; /** A collection of information about the state of the connection between service consumer and provider. */ privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; @@ -347,7 +604,7 @@ export interface TrackedResource extends Resource { location: string; } -/** A private link resource */ +/** A private link resource. */ export interface PrivateLinkResource extends Resource { /** * The private link resource group id. @@ -359,10 +616,27 @@ export interface PrivateLinkResource extends Resource { * 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. */ + /** The private link resource private link DNS zone name. */ requiredZoneNames?: string[]; } +/** DataConnector Model. */ +export interface DataConnector extends ProxyResource { + /** DataConnector Properties. */ + properties: DataConnectorProperties; + /** + * The ETag value to implement optimistic concurrency. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eTag?: string; +} + +/** DataManagerForAgriculture extension resource. */ +export interface DataManagerForAgricultureExtension extends ProxyResource { + /** DataManagerForAgricultureExtension properties. */ + properties?: DataManagerForAgricultureExtensionProperties; +} + /** Extension resource. */ export interface Extension extends ProxyResource { /** @@ -395,92 +669,57 @@ export interface Extension extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly extensionApiDocsLink?: string; -} - -/** FarmBeats extension resource. */ -export interface FarmBeatsExtension extends ProxyResource { - /** - * Target ResourceType of the farmBeatsExtension. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetResourceType?: string; - /** - * FarmBeatsExtension ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly farmBeatsExtensionId?: string; - /** - * FarmBeatsExtension name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly farmBeatsExtensionName?: string; - /** - * FarmBeatsExtension version. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly farmBeatsExtensionVersion?: string; - /** - * Publisher ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publisherId?: string; - /** - * Textual description. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; /** - * Category of the extension. e.g. weather/sensor/satellite. + * Additional Api Properties. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly extensionCategory?: string; - /** - * FarmBeatsExtension auth link. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly extensionAuthLink?: string; - /** - * FarmBeatsExtension api docs link. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly extensionApiDocsLink?: string; + readonly additionalApiProperties?: { [propertyName: string]: ApiProperties }; +} + +/** Solution resource. */ +export interface Solution extends ProxyResource { + /** Solution resource properties. */ + properties?: SolutionProperties; /** - * Detailed information which shows summary of requested data. - * Used in descriptive get extension metadata call. - * Information for weather category per api included are apisSupported, - * customParameters, PlatformParameters and Units supported. + * The ETag value to implement optimistic concurrency. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly detailedInformation?: DetailedInformation[]; + readonly eTag?: string; } -/** FarmBeats ARM Resource. */ -export interface FarmBeats extends TrackedResource { +/** DataManagerForAgriculture solution resource. */ +export interface DataManagerForAgricultureSolution extends ProxyResource { + /** DataManagerForAgricultureSolution properties. */ + properties?: DataManagerForAgricultureSolutionProperties; +} + +/** Data Manager For Agriculture ARM Resource. */ +export interface DataManagerForAgriculture extends TrackedResource { /** Identity for the resource. */ identity?: Identity; /** - * Uri of the FarmBeats instance. + * Uri of the Data Manager For Agriculture instance. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly instanceUri?: string; /** - * FarmBeats instance provisioning state. + * Data Manager For Agriculture instance provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; /** Sensor integration request model. */ sensorIntegration?: SensorIntegration; - /** Property to allow or block public traffic for an Azure FarmBeats resource. */ + /** Property to allow or block public traffic for an Azure Data Manager For Agriculture resource. */ publicNetworkAccess?: PublicNetworkAccess; /** - * The Private Endpoint Connection resource. + * Private endpoints. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly privateEndpointConnections?: PrivateEndpointConnection; + readonly privateEndpointConnections?: PrivateEndpointConnection[]; } -/** Defines headers for FarmBeatsModels_update operation. */ -export interface FarmBeatsModelsUpdateHeaders { +/** Defines headers for DataManagerForAgricultureResources_update operation. */ +export interface DataManagerForAgricultureResourcesUpdateHeaders { location?: string; } @@ -489,6 +728,42 @@ export interface PrivateEndpointConnectionsDeleteHeaders { location?: string; } +/** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */ +export enum KnownCheckNameAvailabilityReason { + /** Invalid */ + Invalid = "Invalid", + /** AlreadyExists */ + AlreadyExists = "AlreadyExists", +} + +/** + * Defines values for CheckNameAvailabilityReason. \ + * {@link KnownCheckNameAvailabilityReason} can be used interchangeably with CheckNameAvailabilityReason, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **AlreadyExists** + */ +export type CheckNameAvailabilityReason = string; + +/** Known values of {@link AuthCredentialsKind} that the service accepts. */ +export enum KnownAuthCredentialsKind { + /** OAuthClientCredentials */ + OAuthClientCredentials = "OAuthClientCredentials", + /** ApiKeyAuthCredentials */ + ApiKeyAuthCredentials = "ApiKeyAuthCredentials", +} + +/** + * Defines values for AuthCredentialsKind. \ + * {@link KnownAuthCredentialsKind} can be used interchangeably with AuthCredentialsKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **OAuthClientCredentials** \ + * **ApiKeyAuthCredentials** + */ +export type AuthCredentialsKind = string; + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -498,7 +773,7 @@ export enum KnownCreatedByType { /** ManagedIdentity */ ManagedIdentity = "ManagedIdentity", /** Key */ - Key = "Key" + Key = "Key", } /** @@ -524,7 +799,9 @@ export enum KnownProvisioningState { /** Succeeded */ Succeeded = "Succeeded", /** Failed */ - Failed = "Failed" + Failed = "Failed", + /** Running */ + Running = "Running", } /** @@ -536,7 +813,8 @@ export enum KnownProvisioningState { * **Updating** \ * **Deleting** \ * **Succeeded** \ - * **Failed** + * **Failed** \ + * **Running** */ export type ProvisioningState = string; @@ -544,8 +822,8 @@ export type ProvisioningState = string; export enum KnownPublicNetworkAccess { /** Enabled */ Enabled = "Enabled", - /** Hybrid */ - Hybrid = "Hybrid" + /** Disabled */ + Disabled = "Disabled", } /** @@ -554,7 +832,7 @@ export enum KnownPublicNetworkAccess { * this enum contains the known values that the service supports. * ### Known values supported by the service * **Enabled** \ - * **Hybrid** + * **Disabled** */ export type PublicNetworkAccess = string; @@ -565,7 +843,7 @@ export enum KnownPrivateEndpointServiceConnectionStatus { /** Approved */ Approved = "Approved", /** Rejected */ - Rejected = "Rejected" + Rejected = "Rejected", } /** @@ -588,7 +866,7 @@ export enum KnownPrivateEndpointConnectionProvisioningState { /** Deleting */ Deleting = "Deleting", /** Failed */ - Failed = "Failed" + Failed = "Failed", } /** @@ -603,24 +881,6 @@ export enum KnownPrivateEndpointConnectionProvisioningState { */ export type PrivateEndpointConnectionProvisioningState = string; -/** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */ -export enum KnownCheckNameAvailabilityReason { - /** Invalid */ - Invalid = "Invalid", - /** AlreadyExists */ - AlreadyExists = "AlreadyExists" -} - -/** - * Defines values for CheckNameAvailabilityReason. \ - * {@link KnownCheckNameAvailabilityReason} can be used interchangeably with CheckNameAvailabilityReason, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Invalid** \ - * **AlreadyExists** - */ -export type CheckNameAvailabilityReason = string; - /** Known values of {@link Origin} that the service accepts. */ export enum KnownOrigin { /** User */ @@ -628,7 +888,7 @@ export enum KnownOrigin { /** System */ System = "system", /** UserSystem */ - UserSystem = "user,system" + UserSystem = "user,system", } /** @@ -645,7 +905,7 @@ export type Origin = string; /** Known values of {@link ActionType} that the service accepts. */ export enum KnownActionType { /** Internal */ - Internal = "Internal" + Internal = "Internal", } /** @@ -658,133 +918,109 @@ export enum KnownActionType { export type ActionType = string; /** Optional parameters. */ -export interface ExtensionsCreateOptionalParams +export interface CheckNameAvailabilityCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the create operation. */ -export type ExtensionsCreateResponse = Extension; +/** Contains response data for the checkNameAvailability operation. */ +export type CheckNameAvailabilityCheckNameAvailabilityResponse = + CheckNameAvailabilityResponse; /** Optional parameters. */ -export interface ExtensionsGetOptionalParams +export interface DataConnectorsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ExtensionsGetResponse = Extension; +export type DataConnectorsGetResponse = DataConnector; /** Optional parameters. */ -export interface ExtensionsUpdateOptionalParams +export interface DataConnectorsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the update operation. */ -export type ExtensionsUpdateResponse = Extension; +/** Contains response data for the createOrUpdate operation. */ +export type DataConnectorsCreateOrUpdateResponse = DataConnector; /** Optional parameters. */ -export interface ExtensionsDeleteOptionalParams +export interface DataConnectorsDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface ExtensionsListByFarmBeatsOptionalParams +export interface DataConnectorsListOptionalParams extends coreClient.OperationOptions { - /** Installed extension ids. */ - extensionIds?: string[]; - /** Installed extension categories. */ - extensionCategories?: string[]; /** * Maximum number of items needed (inclusive). * Minimum = 10, Maximum = 1000, Default value = 50. */ maxPageSize?: number; - /** Skip token for getting next set of results. */ + /** Continuation token for getting next set of results. */ skipToken?: string; } -/** Contains response data for the listByFarmBeats operation. */ -export type ExtensionsListByFarmBeatsResponse = ExtensionListResponse; +/** Contains response data for the list operation. */ +export type DataConnectorsListResponse = DataConnectorListResponse; /** Optional parameters. */ -export interface ExtensionsListByFarmBeatsNextOptionalParams - extends coreClient.OperationOptions { - /** Installed extension ids. */ - extensionIds?: string[]; - /** Installed extension categories. */ - extensionCategories?: string[]; - /** - * Maximum number of items needed (inclusive). - * Minimum = 10, Maximum = 1000, Default value = 50. - */ - maxPageSize?: number; - /** Skip token for getting next set of results. */ - skipToken?: string; -} +export interface DataConnectorsListNextOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the listByFarmBeatsNext operation. */ -export type ExtensionsListByFarmBeatsNextResponse = ExtensionListResponse; +/** Contains response data for the listNext operation. */ +export type DataConnectorsListNextResponse = DataConnectorListResponse; /** Optional parameters. */ -export interface FarmBeatsExtensionsListOptionalParams +export interface DataManagerForAgricultureExtensionsListOptionalParams extends coreClient.OperationOptions { - /** Extension categories. */ - extensionCategories?: string[]; /** * Maximum number of items needed (inclusive). * Minimum = 10, Maximum = 1000, Default value = 50. */ maxPageSize?: number; - /** FarmBeatsExtension ids. */ + /** DataManagerForAgricultureExtension ids. */ farmBeatsExtensionIds?: string[]; - /** FarmBeats extension names. */ + /** DataManagerForAgriculture extension names. */ farmBeatsExtensionNames?: string[]; + /** Extension categories. */ + extensionCategories?: string[]; /** Publisher ids. */ publisherIds?: string[]; } /** Contains response data for the list operation. */ -export type FarmBeatsExtensionsListResponse = FarmBeatsExtensionListResponse; +export type DataManagerForAgricultureExtensionsListResponse = + DataManagerForAgricultureExtensionListResponse; /** Optional parameters. */ -export interface FarmBeatsExtensionsGetOptionalParams +export interface DataManagerForAgricultureExtensionsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type FarmBeatsExtensionsGetResponse = FarmBeatsExtension; +export type DataManagerForAgricultureExtensionsGetResponse = + DataManagerForAgricultureExtension; /** Optional parameters. */ -export interface FarmBeatsExtensionsListNextOptionalParams - extends coreClient.OperationOptions { - /** Extension categories. */ - extensionCategories?: string[]; - /** - * Maximum number of items needed (inclusive). - * Minimum = 10, Maximum = 1000, Default value = 50. - */ - maxPageSize?: number; - /** FarmBeatsExtension ids. */ - farmBeatsExtensionIds?: string[]; - /** FarmBeats extension names. */ - farmBeatsExtensionNames?: string[]; - /** Publisher ids. */ - publisherIds?: string[]; -} +export interface DataManagerForAgricultureExtensionsListNextOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type FarmBeatsExtensionsListNextResponse = FarmBeatsExtensionListResponse; +export type DataManagerForAgricultureExtensionsListNextResponse = + DataManagerForAgricultureExtensionListResponse; /** Optional parameters. */ -export interface FarmBeatsModelsGetOptionalParams +export interface DataManagerForAgricultureResourcesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type FarmBeatsModelsGetResponse = FarmBeats; +export type DataManagerForAgricultureResourcesGetResponse = + DataManagerForAgriculture; /** Optional parameters. */ -export interface FarmBeatsModelsCreateOrUpdateOptionalParams +export interface DataManagerForAgricultureResourcesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type FarmBeatsModelsCreateOrUpdateResponse = FarmBeats; +export type DataManagerForAgricultureResourcesCreateOrUpdateResponse = + DataManagerForAgriculture; /** Optional parameters. */ -export interface FarmBeatsModelsUpdateOptionalParams +export interface DataManagerForAgricultureResourcesUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -793,14 +1029,15 @@ export interface FarmBeatsModelsUpdateOptionalParams } /** Contains response data for the update operation. */ -export type FarmBeatsModelsUpdateResponse = FarmBeats; +export type DataManagerForAgricultureResourcesUpdateResponse = + DataManagerForAgriculture; /** Optional parameters. */ -export interface FarmBeatsModelsDeleteOptionalParams +export interface DataManagerForAgricultureResourcesDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface FarmBeatsModelsListBySubscriptionOptionalParams +export interface DataManagerForAgricultureResourcesListBySubscriptionOptionalParams extends coreClient.OperationOptions { /** * Maximum number of items needed (inclusive). @@ -812,10 +1049,11 @@ export interface FarmBeatsModelsListBySubscriptionOptionalParams } /** Contains response data for the listBySubscription operation. */ -export type FarmBeatsModelsListBySubscriptionResponse = FarmBeatsListResponse; +export type DataManagerForAgricultureResourcesListBySubscriptionResponse = + DataManagerForAgricultureListResponse; /** Optional parameters. */ -export interface FarmBeatsModelsListByResourceGroupOptionalParams +export interface DataManagerForAgricultureResourcesListByResourceGroupOptionalParams extends coreClient.OperationOptions { /** * Maximum number of items needed (inclusive). @@ -827,51 +1065,80 @@ export interface FarmBeatsModelsListByResourceGroupOptionalParams } /** Contains response data for the listByResourceGroup operation. */ -export type FarmBeatsModelsListByResourceGroupResponse = FarmBeatsListResponse; +export type DataManagerForAgricultureResourcesListByResourceGroupResponse = + DataManagerForAgricultureListResponse; /** Optional parameters. */ -export interface FarmBeatsModelsGetOperationResultOptionalParams +export interface DataManagerForAgricultureResourcesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getOperationResult operation. */ -export type FarmBeatsModelsGetOperationResultResponse = ArmAsyncOperation; +/** Contains response data for the listBySubscriptionNext operation. */ +export type DataManagerForAgricultureResourcesListBySubscriptionNextResponse = + DataManagerForAgricultureListResponse; + +/** Optional parameters. */ +export interface DataManagerForAgricultureResourcesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type DataManagerForAgricultureResourcesListByResourceGroupNextResponse = + DataManagerForAgricultureListResponse; /** Optional parameters. */ -export interface FarmBeatsModelsListBySubscriptionNextOptionalParams +export interface OperationResultsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type OperationResultsGetResponse = ArmAsyncOperation; + +/** Optional parameters. */ +export interface ExtensionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** - * Maximum number of items needed (inclusive). - * Minimum = 10, Maximum = 1000, Default value = 50. - */ - maxPageSize?: number; - /** Skip token for getting next set of results. */ - skipToken?: string; + /** Extension resource request body. */ + requestBody?: ExtensionInstallationRequest; } -/** Contains response data for the listBySubscriptionNext operation. */ -export type FarmBeatsModelsListBySubscriptionNextResponse = FarmBeatsListResponse; +/** Contains response data for the createOrUpdate operation. */ +export type ExtensionsCreateOrUpdateResponse = Extension; /** Optional parameters. */ -export interface FarmBeatsModelsListByResourceGroupNextOptionalParams +export interface ExtensionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ExtensionsGetResponse = Extension; + +/** Optional parameters. */ +export interface ExtensionsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ExtensionsListByDataManagerForAgricultureOptionalParams extends coreClient.OperationOptions { /** * Maximum number of items needed (inclusive). * Minimum = 10, Maximum = 1000, Default value = 50. */ maxPageSize?: number; - /** Continuation token for getting next set of results. */ + /** Skip token for getting next set of results. */ skipToken?: string; + /** Installed extension categories. */ + extensionCategories?: string[]; + /** Installed extension ids. */ + extensionIds?: string[]; } -/** Contains response data for the listByResourceGroupNext operation. */ -export type FarmBeatsModelsListByResourceGroupNextResponse = FarmBeatsListResponse; +/** Contains response data for the listByDataManagerForAgriculture operation. */ +export type ExtensionsListByDataManagerForAgricultureResponse = + ExtensionListResponse; /** Optional parameters. */ -export interface LocationsCheckNameAvailabilityOptionalParams +export interface ExtensionsListByDataManagerForAgricultureNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the checkNameAvailability operation. */ -export type LocationsCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; +/** Contains response data for the listByDataManagerForAgricultureNext operation. */ +export type ExtensionsListByDataManagerForAgricultureNextResponse = + ExtensionListResponse; /** Optional parameters. */ export interface OperationsListOptionalParams @@ -892,7 +1159,8 @@ export interface PrivateEndpointConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection; +export type PrivateEndpointConnectionsCreateOrUpdateResponse = + PrivateEndpointConnection; /** Optional parameters. */ export interface PrivateEndpointConnectionsGetOptionalParams @@ -915,14 +1183,16 @@ export interface PrivateEndpointConnectionsListByResourceOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResource operation. */ -export type PrivateEndpointConnectionsListByResourceResponse = PrivateEndpointConnectionListResult; +export type PrivateEndpointConnectionsListByResourceResponse = + PrivateEndpointConnectionListResult; /** Optional parameters. */ export interface PrivateLinkResourcesListByResourceOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResource operation. */ -export type PrivateLinkResourcesListByResourceResponse = PrivateLinkResourceListResult; +export type PrivateLinkResourcesListByResourceResponse = + PrivateLinkResourceListResult; /** Optional parameters. */ export interface PrivateLinkResourcesGetOptionalParams @@ -931,6 +1201,104 @@ export interface PrivateLinkResourcesGetOptionalParams /** Contains response data for the get operation. */ export type PrivateLinkResourcesGetResponse = PrivateLinkResource; +/** Optional parameters. */ +export interface SolutionsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Solution resource request body. */ + requestBody?: Solution; +} + +/** Contains response data for the createOrUpdate operation. */ +export type SolutionsCreateOrUpdateResponse = Solution; + +/** Optional parameters. */ +export interface SolutionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SolutionsGetResponse = Solution; + +/** Optional parameters. */ +export interface SolutionsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface SolutionsListOptionalParams + extends coreClient.OperationOptions { + /** + * Maximum number of items needed (inclusive). + * Minimum = 10, Maximum = 1000, Default value = 50. + */ + maxPageSize?: number; + /** Skip token for getting next set of results. */ + skipToken?: string; + /** Installed Solution ids. */ + solutionIds?: string[]; + /** Ids of the resource. */ + ids?: string[]; + /** Names of the resource. */ + names?: string[]; + /** + * Filters on key-value pairs within the Properties object. + * eg. "{testKey} eq {testValue}". + */ + propertyFilters?: string[]; + /** Statuses of the resource. */ + statuses?: string[]; + /** Minimum creation date of resource (inclusive). */ + minCreatedDateTime?: Date; + /** Maximum creation date of resource (inclusive). */ + maxCreatedDateTime?: Date; + /** Minimum last modified date of resource (inclusive). */ + minLastModifiedDateTime?: Date; + /** Maximum last modified date of resource (inclusive). */ + maxLastModifiedDateTime?: Date; +} + +/** Contains response data for the list operation. */ +export type SolutionsListResponse = SolutionListResponse; + +/** Optional parameters. */ +export interface SolutionsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type SolutionsListNextResponse = SolutionListResponse; + +/** Optional parameters. */ +export interface SolutionsDiscoverabilityListOptionalParams + extends coreClient.OperationOptions { + /** + * Maximum number of items needed (inclusive). + * Minimum = 10, Maximum = 1000, Default value = 50. + */ + maxPageSize?: number; + /** Ids of Data Manager For Agriculture Solutions which the customer requests to fetch. */ + farmBeatsSolutionIds?: string[]; + /** Names of Data Manager For Agriculture Solutions which the customer requests to fetch. */ + farmBeatsSolutionNames?: string[]; +} + +/** Contains response data for the list operation. */ +export type SolutionsDiscoverabilityListResponse = + DataManagerForAgricultureSolutionListResponse; + +/** Optional parameters. */ +export interface SolutionsDiscoverabilityGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SolutionsDiscoverabilityGetResponse = + DataManagerForAgricultureSolution; + +/** Optional parameters. */ +export interface SolutionsDiscoverabilityListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type SolutionsDiscoverabilityListNextResponse = + DataManagerForAgricultureSolutionListResponse; + /** Optional parameters. */ export interface AgriFoodMgmtClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/agrifood/arm-agrifood/src/models/mappers.ts b/sdk/agrifood/arm-agrifood/src/models/mappers.ts index 4b7905afbeea..c7d9ff935a4c 100644 --- a/sdk/agrifood/arm-agrifood/src/models/mappers.ts +++ b/sdk/agrifood/arm-agrifood/src/models/mappers.ts @@ -8,86 +8,52 @@ import * as coreClient from "@azure/core-client"; -export const Resource: coreClient.CompositeMapper = { +export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "CheckNameAvailabilityRequest", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, name: { serializedName: "name", - readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", - readOnly: true, type: { - name: "String" - } + name: "String", + }, }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - } - } - } + }, + }, }; -export const SystemData: coreClient.CompositeMapper = { +export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SystemData", + className: "CheckNameAvailabilityResponse", modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String" - } - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String" - } - }, - createdAt: { - serializedName: "createdAt", + nameAvailable: { + serializedName: "nameAvailable", type: { - name: "DateTime" - } + name: "Boolean", + }, }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + reason: { + serializedName: "reason", type: { - name: "String" - } + name: "String", + }, }, - lastModifiedByType: { - serializedName: "lastModifiedByType", + message: { + serializedName: "message", type: { - name: "String" - } + name: "String", + }, }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime" - } - } - } - } + }, + }, }; export const ErrorResponse: coreClient.CompositeMapper = { @@ -99,11 +65,11 @@ export const ErrorResponse: coreClient.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "ErrorDetail" - } - } - } - } + className: "ErrorDetail", + }, + }, + }, + }, }; export const ErrorDetail: coreClient.CompositeMapper = { @@ -115,22 +81,22 @@ export const ErrorDetail: coreClient.CompositeMapper = { serializedName: "code", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, target: { serializedName: "target", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, details: { serializedName: "details", @@ -140,10 +106,10 @@ export const ErrorDetail: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorDetail" - } - } - } + className: "ErrorDetail", + }, + }, + }, }, additionalInfo: { serializedName: "additionalInfo", @@ -153,13 +119,13 @@ export const ErrorDetail: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorAdditionalInfo" - } - } - } - } - } - } + className: "ErrorAdditionalInfo", + }, + }, + }, + }, + }, + }, }; export const ErrorAdditionalInfo: coreClient.CompositeMapper = { @@ -171,77 +137,315 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, info: { serializedName: "info", readOnly: true, type: { name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } + value: { type: { name: "any" } }, + }, + }, + }, + }, }; -export const ExtensionListResponse: coreClient.CompositeMapper = { +export const DataConnectorProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtensionListResponse", + className: "DataConnectorProperties", modelProperties: { - value: { - serializedName: "value", + credentials: { + serializedName: "credentials", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Extension" - } - } - } + name: "Composite", + className: "AuthCredentials", + }, }, - nextLink: { - serializedName: "nextLink", + }, + }, +}; + +export const AuthCredentials: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthCredentials", + uberParent: "AuthCredentials", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind", + }, + modelProperties: { + kind: { + serializedName: "kind", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + }, + }, +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String", + }, + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String", + }, + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime", + }, + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String", + }, + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String", + }, + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime", + }, + }, + }, + }, }; -export const FarmBeatsExtensionListResponse: coreClient.CompositeMapper = { +export const DataConnectorListResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "FarmBeatsExtensionListResponse", + className: "DataConnectorListResponse", modelProperties: { value: { serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "FarmBeatsExtension" - } - } - } + className: "DataConnector", + }, + }, + }, }, nextLink: { serializedName: "nextLink", - readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; +export const DataManagerForAgricultureExtensionListResponse: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DataManagerForAgricultureExtensionListResponse", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataManagerForAgricultureExtension", + }, + }, + }, + }, + skipToken: { + serializedName: "$skipToken", + type: { + name: "String", + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const DataManagerForAgricultureExtensionProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DataManagerForAgricultureExtensionProperties", + modelProperties: { + targetResourceType: { + serializedName: "targetResourceType", + readOnly: true, + type: { + name: "String", + }, + }, + farmBeatsExtensionId: { + constraints: { + Pattern: new RegExp("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$"), + MaxLength: 100, + MinLength: 2, + }, + serializedName: "farmBeatsExtensionId", + readOnly: true, + type: { + name: "String", + }, + }, + farmBeatsExtensionName: { + constraints: { + MaxLength: 100, + MinLength: 2, + }, + serializedName: "farmBeatsExtensionName", + readOnly: true, + type: { + name: "String", + }, + }, + farmBeatsExtensionVersion: { + constraints: { + Pattern: new RegExp("^([1-9]|10).\\d$"), + MaxLength: 100, + MinLength: 2, + }, + serializedName: "farmBeatsExtensionVersion", + readOnly: true, + type: { + name: "String", + }, + }, + publisherId: { + constraints: { + MaxLength: 100, + MinLength: 2, + }, + serializedName: "publisherId", + readOnly: true, + type: { + name: "String", + }, + }, + description: { + constraints: { + MaxLength: 500, + MinLength: 2, + }, + serializedName: "description", + readOnly: true, + type: { + name: "String", + }, + }, + extensionCategory: { + constraints: { + MaxLength: 100, + MinLength: 2, + }, + serializedName: "extensionCategory", + readOnly: true, + type: { + name: "String", + }, + }, + extensionAuthLink: { + serializedName: "extensionAuthLink", + readOnly: true, + type: { + name: "String", + }, + }, + extensionApiDocsLink: { + serializedName: "extensionApiDocsLink", + readOnly: true, + type: { + name: "String", + }, + }, + detailedInformation: { + serializedName: "detailedInformation", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DetailedInformation", + }, + }, + }, + }, + }, + }, + }; + export const DetailedInformation: coreClient.CompositeMapper = { type: { name: "Composite", @@ -250,8 +454,20 @@ export const DetailedInformation: coreClient.CompositeMapper = { apiName: { serializedName: "apiName", type: { - name: "String" - } + name: "String", + }, + }, + apiDocsLink: { + serializedName: "apiDocsLink", + type: { + name: "String", + }, + }, + apiType: { + serializedName: "apiType", + type: { + name: "String", + }, }, customParameters: { serializedName: "customParameters", @@ -259,10 +475,10 @@ export const DetailedInformation: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, platformParameters: { serializedName: "platformParameters", @@ -270,17 +486,28 @@ export const DetailedInformation: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, + }, + apiDefaultInputParameters: { + serializedName: "apiDefaultInputParameters", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, }, unitsSupported: { serializedName: "unitsSupported", type: { name: "Composite", - className: "UnitSystemsInfo" - } + className: "UnitSystemsInfo", + }, }, apiInputParameters: { serializedName: "apiInputParameters", @@ -288,13 +515,13 @@ export const DetailedInformation: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } + name: "String", + }, + }, + }, + }, + }, + }, }; export const UnitSystemsInfo: coreClient.CompositeMapper = { @@ -305,13 +532,13 @@ export const UnitSystemsInfo: coreClient.CompositeMapper = { key: { constraints: { MaxLength: 100, - MinLength: 2 + MinLength: 1, }, serializedName: "key", required: true, type: { - name: "String" - } + name: "String", + }, }, values: { serializedName: "values", @@ -320,13 +547,13 @@ export const UnitSystemsInfo: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } + name: "String", + }, + }, + }, + }, + }, + }, }; export const Identity: coreClient.CompositeMapper = { @@ -338,26 +565,26 @@ export const Identity: coreClient.CompositeMapper = { serializedName: "principalId", readOnly: true, type: { - name: "String" - } + name: "Uuid", + }, }, tenantId: { serializedName: "tenantId", readOnly: true, type: { - name: "String" - } + name: "Uuid", + }, }, type: { defaultValue: "SystemAssigned", isConstant: true, serializedName: "type", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SensorIntegration: coreClient.CompositeMapper = { @@ -368,25 +595,25 @@ export const SensorIntegration: coreClient.CompositeMapper = { enabled: { serializedName: "enabled", type: { - name: "String" - } + name: "String", + }, }, provisioningState: { serializedName: "provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, provisioningInfo: { serializedName: "provisioningInfo", type: { name: "Composite", - className: "ErrorResponse" - } - } - } - } + className: "ErrorResponse", + }, + }, + }, + }, }; export const PrivateEndpoint: coreClient.CompositeMapper = { @@ -398,11 +625,11 @@ export const PrivateEndpoint: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { @@ -413,172 +640,241 @@ export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { status: { serializedName: "status", type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", type: { - name: "String" - } + name: "String", + }, }, actionsRequired: { serializedName: "actionsRequired", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const FarmBeatsUpdateRequestModel: coreClient.CompositeMapper = { +export const DataManagerForAgricultureUpdateRequestModel: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DataManagerForAgricultureUpdateRequestModel", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "Identity", + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "DataManagerForAgricultureUpdateProperties", + }, + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + }, + }, + }; + +export const DataManagerForAgricultureUpdateProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DataManagerForAgricultureUpdateProperties", + modelProperties: { + sensorIntegration: { + serializedName: "sensorIntegration", + type: { + name: "Composite", + className: "SensorIntegration", + }, + }, + publicNetworkAccess: { + serializedName: "publicNetworkAccess", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const DataManagerForAgricultureListResponse: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DataManagerForAgricultureListResponse", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataManagerForAgriculture", + }, + }, + }, + }, + skipToken: { + serializedName: "$skipToken", + type: { + name: "String", + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const ArmAsyncOperation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "FarmBeatsUpdateRequestModel", + className: "ArmAsyncOperation", modelProperties: { - location: { - serializedName: "location", + status: { + serializedName: "status", type: { - name: "String" - } + name: "String", + }, }, - identity: { - serializedName: "identity", + error: { + serializedName: "error", type: { name: "Composite", - className: "Identity" - } + className: "ArmAsyncOperationError", + }, }, - properties: { - serializedName: "properties", + }, + }, +}; + +export const ArmAsyncOperationError: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ArmAsyncOperationError", + modelProperties: { + code: { + serializedName: "code", type: { - name: "Composite", - className: "FarmBeatsUpdateProperties" - } + name: "String", + }, }, - tags: { - serializedName: "tags", + message: { + serializedName: "message", type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const FarmBeatsUpdateProperties: coreClient.CompositeMapper = { +export const ExtensionInstallationRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "FarmBeatsUpdateProperties", + className: "ExtensionInstallationRequest", modelProperties: { - sensorIntegration: { - serializedName: "sensorIntegration", + extensionVersion: { + constraints: { + MaxLength: 10, + MinLength: 3, + }, + serializedName: "extensionVersion", type: { - name: "Composite", - className: "SensorIntegration" - } + name: "String", + }, }, - publicNetworkAccess: { - serializedName: "publicNetworkAccess", + additionalApiProperties: { + serializedName: "additionalApiProperties", type: { - name: "String" - } - } - } - } + name: "Dictionary", + value: { type: { name: "Composite", className: "ApiProperties" } }, + }, + }, + }, + }, }; -export const FarmBeatsListResponse: coreClient.CompositeMapper = { +export const ApiProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "FarmBeatsListResponse", + className: "ApiProperties", modelProperties: { - value: { - serializedName: "value", + apiFreshnessTimeInMinutes: { + constraints: { + InclusiveMaximum: 10080, + InclusiveMinimum: 0, + }, + serializedName: "apiFreshnessTimeInMinutes", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FarmBeats" - } - } - } + name: "Number", + }, }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ArmAsyncOperation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ArmAsyncOperation", - modelProperties: { - status: { - serializedName: "status", - type: { - name: "String" - } - } - } - } + }, + }, }; -export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { +export const ExtensionListResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CheckNameAvailabilityRequest", + className: "ExtensionListResponse", modelProperties: { - name: { - serializedName: "name", + value: { + serializedName: "value", + required: true, type: { - name: "String" - } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Extension", + }, + }, + }, }, - type: { - serializedName: "type", - type: { - name: "String" - } - } - } - } -}; - -export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CheckNameAvailabilityResponse", - modelProperties: { - nameAvailable: { - serializedName: "nameAvailable", + skipToken: { + serializedName: "$skipToken", type: { - name: "Boolean" - } + name: "String", + }, }, - reason: { - serializedName: "reason", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "String" - } + name: "String", + }, }, - message: { - serializedName: "message", - type: { - name: "String" - } - } - } - } + }, + }, }; export const OperationListResult: coreClient.CompositeMapper = { @@ -594,20 +890,20 @@ export const OperationListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" - } - } - } + className: "Operation", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Operation: coreClient.CompositeMapper = { @@ -619,39 +915,39 @@ export const Operation: coreClient.CompositeMapper = { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, isDataAction: { serializedName: "isDataAction", readOnly: true, type: { - name: "Boolean" - } + name: "Boolean", + }, }, display: { serializedName: "display", type: { name: "Composite", - className: "OperationDisplay" - } + className: "OperationDisplay", + }, }, origin: { serializedName: "origin", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, actionType: { serializedName: "actionType", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationDisplay: coreClient.CompositeMapper = { @@ -663,32 +959,32 @@ export const OperationDisplay: coreClient.CompositeMapper = { serializedName: "provider", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resource: { serializedName: "resource", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, operation: { serializedName: "operation", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { @@ -703,13 +999,13 @@ export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateEndpointConnection" - } - } - } - } - } - } + className: "PrivateEndpointConnection", + }, + }, + }, + }, + }, + }, }; export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { @@ -724,13 +1020,373 @@ export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateLinkResource" - } - } - } - } - } - } + className: "PrivateLinkResource", + }, + }, + }, + }, + }, + }, +}; + +export const SolutionProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SolutionProperties", + additionalProperties: { type: { name: "Object" } }, + modelProperties: { + partnerId: { + serializedName: "partnerId", + readOnly: true, + type: { + name: "String", + }, + }, + saasSubscriptionId: { + constraints: { + MinLength: 1, + }, + serializedName: "saasSubscriptionId", + required: true, + type: { + name: "String", + }, + }, + saasSubscriptionName: { + constraints: { + MinLength: 1, + }, + serializedName: "saasSubscriptionName", + required: true, + type: { + name: "String", + }, + }, + marketplacePublisherId: { + constraints: { + MinLength: 1, + }, + serializedName: "marketplacePublisherId", + required: true, + type: { + name: "String", + }, + }, + planId: { + constraints: { + MinLength: 1, + }, + serializedName: "planId", + required: true, + type: { + name: "String", + }, + }, + roleAssignmentId: { + serializedName: "roleAssignmentId", + type: { + name: "String", + }, + }, + offerId: { + constraints: { + MinLength: 1, + }, + serializedName: "offerId", + required: true, + type: { + name: "String", + }, + }, + termId: { + constraints: { + MinLength: 1, + }, + serializedName: "termId", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const SolutionListResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SolutionListResponse", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Solution", + }, + }, + }, + }, + skipToken: { + serializedName: "$skipToken", + type: { + name: "String", + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DataManagerForAgricultureSolutionListResponse: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DataManagerForAgricultureSolutionListResponse", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataManagerForAgricultureSolution", + }, + }, + }, + }, + skipToken: { + serializedName: "$skipToken", + type: { + name: "String", + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const DataManagerForAgricultureSolutionProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DataManagerForAgricultureSolutionProperties", + modelProperties: { + partnerId: { + serializedName: "partnerId", + readOnly: true, + type: { + name: "String", + }, + }, + partnerTenantId: { + serializedName: "partnerTenantId", + readOnly: true, + type: { + name: "String", + }, + }, + dataAccessScopes: { + serializedName: "dataAccessScopes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + marketplaceOfferDetails: { + serializedName: "marketplaceOfferDetails", + type: { + name: "Composite", + className: "MarketplaceOfferDetails", + }, + }, + openApiSpecsDictionary: { + serializedName: "openApiSpecsDictionary", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + accessFBApplicationId: { + serializedName: "accessFBApplicationId", + readOnly: true, + type: { + name: "Uuid", + }, + }, + saaSApplicationId: { + serializedName: "saaSApplicationId", + readOnly: true, + type: { + name: "String", + }, + }, + actionIds: { + serializedName: "actionIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + roleId: { + serializedName: "roleId", + readOnly: true, + type: { + name: "String", + }, + }, + roleName: { + serializedName: "roleName", + readOnly: true, + type: { + name: "String", + }, + }, + accessFBApplicationName: { + serializedName: "accessFBApplicationName", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const MarketplaceOfferDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MarketplaceOfferDetails", + modelProperties: { + saasOfferId: { + serializedName: "saasOfferId", + type: { + name: "String", + }, + }, + publisherId: { + serializedName: "publisherId", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const KeyVaultProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KeyVaultProperties", + modelProperties: { + keyVaultUri: { + constraints: { + MinLength: 1, + }, + serializedName: "keyVaultUri", + required: true, + type: { + name: "String", + }, + }, + keyName: { + constraints: { + MinLength: 1, + }, + serializedName: "keyName", + required: true, + type: { + name: "String", + }, + }, + keyVersion: { + constraints: { + MinLength: 1, + }, + serializedName: "keyVersion", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ApiKeyAuthCredentials: coreClient.CompositeMapper = { + serializedName: "ApiKeyAuthCredentials", + type: { + name: "Composite", + className: "ApiKeyAuthCredentials", + uberParent: "AuthCredentials", + polymorphicDiscriminator: AuthCredentials.type.polymorphicDiscriminator, + modelProperties: { + ...AuthCredentials.type.modelProperties, + apiKey: { + serializedName: "apiKey", + type: { + name: "Composite", + className: "KeyVaultProperties", + }, + }, + }, + }, +}; + +export const OAuthClientCredentials: coreClient.CompositeMapper = { + serializedName: "OAuthClientCredentials", + type: { + name: "Composite", + className: "OAuthClientCredentials", + uberParent: "AuthCredentials", + polymorphicDiscriminator: AuthCredentials.type.polymorphicDiscriminator, + modelProperties: { + ...AuthCredentials.type.modelProperties, + clientId: { + constraints: { + MinLength: 1, + }, + serializedName: "clientId", + required: true, + type: { + name: "String", + }, + }, + clientSecret: { + serializedName: "clientSecret", + type: { + name: "Composite", + className: "KeyVaultProperties", + }, + }, + }, + }, }; export const ProxyResource: coreClient.CompositeMapper = { @@ -738,9 +1394,9 @@ export const ProxyResource: coreClient.CompositeMapper = { name: "Composite", className: "ProxyResource", modelProperties: { - ...Resource.type.modelProperties - } - } + ...Resource.type.modelProperties, + }, + }, }; export const PrivateEndpointConnection: coreClient.CompositeMapper = { @@ -749,29 +1405,41 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { className: "PrivateEndpointConnection", modelProperties: { ...Resource.type.modelProperties, + groupIds: { + serializedName: "properties.groupIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, privateEndpoint: { serializedName: "properties.privateEndpoint", type: { name: "Composite", - className: "PrivateEndpoint" - } + className: "PrivateEndpoint", + }, }, privateLinkServiceConnectionState: { serializedName: "properties.privateLinkServiceConnectionState", type: { name: "Composite", - className: "PrivateLinkServiceConnectionState" - } + className: "PrivateLinkServiceConnectionState", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const TrackedResource: coreClient.CompositeMapper = { @@ -784,18 +1452,18 @@ export const TrackedResource: coreClient.CompositeMapper = { serializedName: "tags", type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, location: { serializedName: "location", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PrivateLinkResource: coreClient.CompositeMapper = { @@ -808,8 +1476,8 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { serializedName: "properties.groupId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, requiredMembers: { serializedName: "properties.requiredMembers", @@ -818,10 +1486,10 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, requiredZoneNames: { serializedName: "properties.requiredZoneNames", @@ -829,13 +1497,54 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const DataConnector: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataConnector", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "DataConnectorProperties", + }, + }, + eTag: { + serializedName: "eTag", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DataManagerForAgricultureExtension: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataManagerForAgricultureExtension", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "DataManagerForAgricultureExtensionProperties", + }, + }, + }, + }, }; export const Extension: coreClient.CompositeMapper = { @@ -848,243 +1557,194 @@ export const Extension: coreClient.CompositeMapper = { serializedName: "eTag", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, extensionId: { constraints: { - Pattern: new RegExp("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$") + Pattern: new RegExp("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$"), }, serializedName: "properties.extensionId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, extensionCategory: { serializedName: "properties.extensionCategory", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, installedExtensionVersion: { constraints: { - Pattern: new RegExp("^([1-9]|10).\\d$") + Pattern: new RegExp("^([1-9]|10).\\d$"), }, serializedName: "properties.installedExtensionVersion", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, extensionAuthLink: { serializedName: "properties.extensionAuthLink", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, extensionApiDocsLink: { serializedName: "properties.extensionApiDocsLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + additionalApiProperties: { + serializedName: "properties.additionalApiProperties", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "ApiProperties" } }, + }, + }, + }, + }, }; -export const FarmBeatsExtension: coreClient.CompositeMapper = { +export const Solution: coreClient.CompositeMapper = { type: { name: "Composite", - className: "FarmBeatsExtension", + className: "Solution", modelProperties: { ...ProxyResource.type.modelProperties, - targetResourceType: { - serializedName: "properties.targetResourceType", - readOnly: true, - type: { - name: "String" - } - }, - farmBeatsExtensionId: { - constraints: { - Pattern: new RegExp("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$"), - MaxLength: 100, - MinLength: 2 - }, - serializedName: "properties.farmBeatsExtensionId", - readOnly: true, + properties: { + serializedName: "properties", type: { - name: "String" - } - }, - farmBeatsExtensionName: { - constraints: { - MaxLength: 100, - MinLength: 2 + name: "Composite", + className: "SolutionProperties", }, - serializedName: "properties.farmBeatsExtensionName", - readOnly: true, - type: { - name: "String" - } }, - farmBeatsExtensionVersion: { - constraints: { - Pattern: new RegExp("^([1-9]|10).\\d$"), - MaxLength: 100, - MinLength: 2 - }, - serializedName: "properties.farmBeatsExtensionVersion", + eTag: { + serializedName: "eTag", readOnly: true, type: { - name: "String" - } - }, - publisherId: { - constraints: { - MaxLength: 100, - MinLength: 2 + name: "String", }, - serializedName: "properties.publisherId", - readOnly: true, - type: { - name: "String" - } }, - description: { - constraints: { - MaxLength: 500, - MinLength: 2 - }, - serializedName: "properties.description", - readOnly: true, + }, + }, +}; + +export const DataManagerForAgricultureSolution: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataManagerForAgricultureSolution", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String" - } - }, - extensionCategory: { - constraints: { - MaxLength: 100, - MinLength: 2 + name: "Composite", + className: "DataManagerForAgricultureSolutionProperties", }, - serializedName: "properties.extensionCategory", - readOnly: true, - type: { - name: "String" - } }, - extensionAuthLink: { - serializedName: "properties.extensionAuthLink", - readOnly: true, - type: { - name: "String" - } - }, - extensionApiDocsLink: { - serializedName: "properties.extensionApiDocsLink", - readOnly: true, - type: { - name: "String" - } - }, - detailedInformation: { - serializedName: "properties.detailedInformation", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DetailedInformation" - } - } - } - } - } - } + }, + }, }; -export const FarmBeats: coreClient.CompositeMapper = { +export const DataManagerForAgriculture: coreClient.CompositeMapper = { type: { name: "Composite", - className: "FarmBeats", + className: "DataManagerForAgriculture", modelProperties: { ...TrackedResource.type.modelProperties, identity: { serializedName: "identity", type: { name: "Composite", - className: "Identity" - } + className: "Identity", + }, }, instanceUri: { serializedName: "properties.instanceUri", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, sensorIntegration: { serializedName: "properties.sensorIntegration", type: { name: "Composite", - className: "SensorIntegration" - } + className: "SensorIntegration", + }, }, publicNetworkAccess: { serializedName: "properties.publicNetworkAccess", type: { - name: "String" - } + name: "String", + }, }, privateEndpointConnections: { serializedName: "properties.privateEndpointConnections", + readOnly: true, type: { - name: "Composite", - className: "PrivateEndpointConnection" - } - } - } - } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection", + }, + }, + }, + }, + }, + }, }; -export const FarmBeatsModelsUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FarmBeatsModelsUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String" - } - } - } - } -}; +export const DataManagerForAgricultureResourcesUpdateHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DataManagerForAgricultureResourcesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; -export const PrivateEndpointConnectionsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnectionsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String" - } - } - } - } +export const PrivateEndpointConnectionsDeleteHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "PrivateEndpointConnectionsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export let discriminators = { + AuthCredentials: AuthCredentials, + "AuthCredentials.ApiKeyAuthCredentials": ApiKeyAuthCredentials, + "AuthCredentials.OAuthClientCredentials": OAuthClientCredentials, }; diff --git a/sdk/agrifood/arm-agrifood/src/models/parameters.ts b/sdk/agrifood/arm-agrifood/src/models/parameters.ts index 70661aac7c42..47e5aed25d19 100644 --- a/sdk/agrifood/arm-agrifood/src/models/parameters.ts +++ b/sdk/agrifood/arm-agrifood/src/models/parameters.ts @@ -9,15 +9,35 @@ import { OperationParameter, OperationURLParameter, - OperationQueryParameter + OperationQueryParameter, } from "@azure/core-client"; import { - FarmBeats as FarmBeatsMapper, - FarmBeatsUpdateRequestModel as FarmBeatsUpdateRequestModelMapper, CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, - PrivateEndpointConnection as PrivateEndpointConnectionMapper + DataConnector as DataConnectorMapper, + DataManagerForAgriculture as DataManagerForAgricultureMapper, + DataManagerForAgricultureUpdateRequestModel as DataManagerForAgricultureUpdateRequestModelMapper, + ExtensionInstallationRequest as ExtensionInstallationRequestMapper, + PrivateEndpointConnection as PrivateEndpointConnectionMapper, + Solution as SolutionMapper, } from "../models/mappers"; +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String", + }, + }, +}; + +export const nameAvailabilityRequest: OperationParameter = { + parameterPath: "nameAvailabilityRequest", + mapper: CheckNameAvailabilityRequestMapper, +}; + export const accept: OperationParameter = { parameterPath: "accept", mapper: { @@ -25,9 +45,9 @@ export const accept: OperationParameter = { isConstant: true, serializedName: "Accept", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const $host: OperationURLParameter = { @@ -36,24 +56,33 @@ export const $host: OperationURLParameter = { serializedName: "$host", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const subscriptionId: OperationURLParameter = { parameterPath: "subscriptionId", mapper: { - constraints: { - MinLength: 1 - }, serializedName: "subscriptionId", required: true, type: { - name: "String" - } - } + name: "Uuid", + }, + }, +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2023-06-01-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String", + }, + }, }; export const resourceGroupName: OperationURLParameter = { @@ -61,80 +90,50 @@ export const resourceGroupName: OperationURLParameter = { mapper: { constraints: { MaxLength: 90, - MinLength: 1 + MinLength: 1, }, serializedName: "resourceGroupName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; -export const farmBeatsResourceName: OperationURLParameter = { - parameterPath: "farmBeatsResourceName", +export const dataManagerForAgricultureResourceName: OperationURLParameter = { + parameterPath: "dataManagerForAgricultureResourceName", mapper: { - serializedName: "farmBeatsResourceName", + constraints: { + Pattern: new RegExp("^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$"), + MaxLength: 63, + MinLength: 1, + }, + serializedName: "dataManagerForAgricultureResourceName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; -export const extensionId: OperationURLParameter = { - parameterPath: "extensionId", +export const dataConnectorName: OperationURLParameter = { + parameterPath: "dataConnectorName", mapper: { - serializedName: "extensionId", + constraints: { + MaxLength: 63, + MinLength: 1, + }, + serializedName: "dataConnectorName", required: true, type: { - name: "String" - } - } -}; - -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2021-09-01-preview", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const extensionIds: OperationQueryParameter = { - parameterPath: ["options", "extensionIds"], - mapper: { - serializedName: "extensionIds", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } + name: "String", + }, }, - collectionFormat: "Multi" }; -export const extensionCategories: OperationQueryParameter = { - parameterPath: ["options", "extensionCategories"], - mapper: { - serializedName: "extensionCategories", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - collectionFormat: "Multi" +export const body: OperationParameter = { + parameterPath: "body", + mapper: DataConnectorMapper, }; export const maxPageSize: OperationQueryParameter = { @@ -143,13 +142,13 @@ export const maxPageSize: OperationQueryParameter = { defaultValue: 50, constraints: { InclusiveMaximum: 1000, - InclusiveMinimum: 10 + InclusiveMinimum: 10, }, serializedName: "$maxPageSize", type: { - name: "Number" - } - } + name: "Number", + }, + }, }; export const skipToken: OperationQueryParameter = { @@ -157,9 +156,9 @@ export const skipToken: OperationQueryParameter = { mapper: { serializedName: "$skipToken", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const nextLink: OperationURLParameter = { @@ -168,10 +167,10 @@ export const nextLink: OperationURLParameter = { serializedName: "nextLink", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const farmBeatsExtensionIds: OperationQueryParameter = { @@ -182,12 +181,12 @@ export const farmBeatsExtensionIds: OperationQueryParameter = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, - collectionFormat: "Multi" + collectionFormat: "Multi", }; export const farmBeatsExtensionNames: OperationQueryParameter = { @@ -198,12 +197,28 @@ export const farmBeatsExtensionNames: OperationQueryParameter = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, - collectionFormat: "Multi" + collectionFormat: "Multi", +}; + +export const extensionCategories: OperationQueryParameter = { + parameterPath: ["options", "extensionCategories"], + mapper: { + serializedName: "extensionCategories", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + collectionFormat: "Multi", }; export const publisherIds: OperationQueryParameter = { @@ -214,72 +229,95 @@ export const publisherIds: OperationQueryParameter = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, - collectionFormat: "Multi" + collectionFormat: "Multi", }; -export const farmBeatsExtensionId: OperationURLParameter = { - parameterPath: "farmBeatsExtensionId", +export const dataManagerForAgricultureExtensionId: OperationURLParameter = { + parameterPath: "dataManagerForAgricultureExtensionId", mapper: { constraints: { - Pattern: new RegExp("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$") + Pattern: new RegExp("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$"), }, - serializedName: "farmBeatsExtensionId", + serializedName: "dataManagerForAgricultureExtensionId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String" - } - } +export const request: OperationParameter = { + parameterPath: "request", + mapper: DataManagerForAgricultureMapper, }; -export const body: OperationParameter = { - parameterPath: "body", - mapper: FarmBeatsMapper +export const request1: OperationParameter = { + parameterPath: "request", + mapper: DataManagerForAgricultureUpdateRequestModelMapper, }; -export const body1: OperationParameter = { - parameterPath: "body", - mapper: FarmBeatsUpdateRequestModelMapper +export const locations: OperationURLParameter = { + parameterPath: "locations", + mapper: { + serializedName: "locations", + required: true, + type: { + name: "String", + }, + }, }; export const operationResultsId: OperationURLParameter = { parameterPath: "operationResultsId", mapper: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$") - }, serializedName: "operationResultsId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; -export const body2: OperationParameter = { - parameterPath: "body", - mapper: CheckNameAvailabilityRequestMapper +export const requestBody: OperationParameter = { + parameterPath: ["options", "requestBody"], + mapper: ExtensionInstallationRequestMapper, }; -export const body3: OperationParameter = { - parameterPath: "body", - mapper: PrivateEndpointConnectionMapper +export const extensionId: OperationURLParameter = { + parameterPath: "extensionId", + mapper: { + serializedName: "extensionId", + required: true, + type: { + name: "String", + }, + }, +}; + +export const extensionIds: OperationQueryParameter = { + parameterPath: ["options", "extensionIds"], + mapper: { + serializedName: "extensionIds", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + collectionFormat: "Multi", +}; + +export const request2: OperationParameter = { + parameterPath: "request", + mapper: PrivateEndpointConnectionMapper, }; export const privateEndpointConnectionName: OperationURLParameter = { @@ -288,9 +326,9 @@ export const privateEndpointConnectionName: OperationURLParameter = { serializedName: "privateEndpointConnectionName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const subResourceName: OperationURLParameter = { @@ -299,7 +337,192 @@ export const subResourceName: OperationURLParameter = { serializedName: "subResourceName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, +}; + +export const requestBody1: OperationParameter = { + parameterPath: ["options", "requestBody"], + mapper: SolutionMapper, +}; + +export const solutionId: OperationURLParameter = { + parameterPath: "solutionId", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$"), + }, + serializedName: "solutionId", + required: true, + type: { + name: "String", + }, + }, +}; + +export const solutionIds: OperationQueryParameter = { + parameterPath: ["options", "solutionIds"], + mapper: { + serializedName: "solutionIds", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + collectionFormat: "Multi", +}; + +export const ids: OperationQueryParameter = { + parameterPath: ["options", "ids"], + mapper: { + serializedName: "ids", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + collectionFormat: "Multi", +}; + +export const names: OperationQueryParameter = { + parameterPath: ["options", "names"], + mapper: { + serializedName: "names", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + collectionFormat: "Multi", +}; + +export const propertyFilters: OperationQueryParameter = { + parameterPath: ["options", "propertyFilters"], + mapper: { + serializedName: "propertyFilters", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + collectionFormat: "Multi", +}; + +export const statuses: OperationQueryParameter = { + parameterPath: ["options", "statuses"], + mapper: { + serializedName: "statuses", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + collectionFormat: "Multi", +}; + +export const minCreatedDateTime: OperationQueryParameter = { + parameterPath: ["options", "minCreatedDateTime"], + mapper: { + serializedName: "minCreatedDateTime", + type: { + name: "DateTime", + }, + }, +}; + +export const maxCreatedDateTime: OperationQueryParameter = { + parameterPath: ["options", "maxCreatedDateTime"], + mapper: { + serializedName: "maxCreatedDateTime", + type: { + name: "DateTime", + }, + }, +}; + +export const minLastModifiedDateTime: OperationQueryParameter = { + parameterPath: ["options", "minLastModifiedDateTime"], + mapper: { + serializedName: "minLastModifiedDateTime", + type: { + name: "DateTime", + }, + }, +}; + +export const maxLastModifiedDateTime: OperationQueryParameter = { + parameterPath: ["options", "maxLastModifiedDateTime"], + mapper: { + serializedName: "maxLastModifiedDateTime", + type: { + name: "DateTime", + }, + }, +}; + +export const farmBeatsSolutionIds: OperationQueryParameter = { + parameterPath: ["options", "farmBeatsSolutionIds"], + mapper: { + serializedName: "farmBeatsSolutionIds", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + collectionFormat: "Multi", +}; + +export const farmBeatsSolutionNames: OperationQueryParameter = { + parameterPath: ["options", "farmBeatsSolutionNames"], + mapper: { + serializedName: "farmBeatsSolutionNames", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + collectionFormat: "Multi", +}; + +export const dataManagerForAgricultureSolutionId: OperationURLParameter = { + parameterPath: "dataManagerForAgricultureSolutionId", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$"), + }, + serializedName: "dataManagerForAgricultureSolutionId", + required: true, + type: { + name: "String", + }, + }, }; diff --git a/sdk/agrifood/arm-agrifood/src/operations/locations.ts b/sdk/agrifood/arm-agrifood/src/operations/checkNameAvailability.ts similarity index 54% rename from sdk/agrifood/arm-agrifood/src/operations/locations.ts rename to sdk/agrifood/arm-agrifood/src/operations/checkNameAvailability.ts index 3d24e5b732b9..6a1e99d0df65 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/locations.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/checkNameAvailability.ts @@ -6,23 +6,23 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { Locations } from "../operationsInterfaces"; +import { CheckNameAvailability } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; import { CheckNameAvailabilityRequest, - LocationsCheckNameAvailabilityOptionalParams, - LocationsCheckNameAvailabilityResponse + CheckNameAvailabilityCheckNameAvailabilityOptionalParams, + CheckNameAvailabilityCheckNameAvailabilityResponse, } from "../models"; -/** Class containing Locations operations. */ -export class LocationsImpl implements Locations { +/** Class containing CheckNameAvailability operations. */ +export class CheckNameAvailabilityImpl implements CheckNameAvailability { private readonly client: AgriFoodMgmtClient; /** - * Initialize a new instance of the class Locations class. + * Initialize a new instance of the class CheckNameAvailability class. * @param client Reference to the service client */ constructor(client: AgriFoodMgmtClient) { @@ -31,16 +31,16 @@ export class LocationsImpl implements Locations { /** * Checks the name availability of the resource with requested resource name. - * @param body NameAvailabilityRequest object. + * @param nameAvailabilityRequest NameAvailabilityRequest object. * @param options The options parameters. */ checkNameAvailability( - body: CheckNameAvailabilityRequest, - options?: LocationsCheckNameAvailabilityOptionalParams - ): Promise { + nameAvailabilityRequest: CheckNameAvailabilityRequest, + options?: CheckNameAvailabilityCheckNameAvailabilityOptionalParams, + ): Promise { return this.client.sendOperationRequest( - { body, options }, - checkNameAvailabilityOperationSpec + { nameAvailabilityRequest, options }, + checkNameAvailabilityOperationSpec, ); } } @@ -48,21 +48,20 @@ export class LocationsImpl implements Locations { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/checkNameAvailability", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/checkNameAvailability", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.CheckNameAvailabilityResponse + bodyMapper: Mappers.CheckNameAvailabilityResponse, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - requestBody: Parameters.body2, + requestBody: Parameters.nameAvailabilityRequest, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; diff --git a/sdk/agrifood/arm-agrifood/src/operations/dataConnectors.ts b/sdk/agrifood/arm-agrifood/src/operations/dataConnectors.ts new file mode 100644 index 000000000000..5205ac365ef7 --- /dev/null +++ b/sdk/agrifood/arm-agrifood/src/operations/dataConnectors.ts @@ -0,0 +1,363 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { DataConnectors } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import { + DataConnector, + DataConnectorsListNextOptionalParams, + DataConnectorsListOptionalParams, + DataConnectorsListResponse, + DataConnectorsGetOptionalParams, + DataConnectorsGetResponse, + DataConnectorsCreateOrUpdateOptionalParams, + DataConnectorsCreateOrUpdateResponse, + DataConnectorsDeleteOptionalParams, + DataConnectorsListNextResponse, +} from "../models"; + +/// +/** Class containing DataConnectors operations. */ +export class DataConnectorsImpl implements DataConnectors { + private readonly client: AgriFoodMgmtClient; + + /** + * Initialize a new instance of the class DataConnectors class. + * @param client Reference to the service client + */ + constructor(client: AgriFoodMgmtClient) { + this.client = client; + } + + /** + * Lists the Data Connector Credentials for MADMA instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + options?: DataConnectorsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + dataManagerForAgricultureResourceName, + 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, + dataManagerForAgricultureResourceName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + options?: DataConnectorsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: DataConnectorsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + dataManagerForAgricultureResourceName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + dataManagerForAgricultureResourceName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + options?: DataConnectorsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + dataManagerForAgricultureResourceName, + options, + )) { + yield* page; + } + } + + /** + * Get specific Data Connector resource by DataConnectorName. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param dataConnectorName Connector name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + dataConnectorName: string, + options?: DataConnectorsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dataManagerForAgricultureResourceName, + dataConnectorName, + options, + }, + getOperationSpec, + ); + } + + /** + * Create or update Data Connector For MADMA resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param dataConnectorName Connector name. + * @param body Body must be valid DataConnector request. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + dataConnectorName: string, + body: DataConnector, + options?: DataConnectorsCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dataManagerForAgricultureResourceName, + dataConnectorName, + body, + options, + }, + createOrUpdateOperationSpec, + ); + } + + /** + * Delete a Data Connectors with given dataConnector name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param dataConnectorName Connector name. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + dataConnectorName: string, + options?: DataConnectorsDeleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dataManagerForAgricultureResourceName, + dataConnectorName, + options, + }, + deleteOperationSpec, + ); + } + + /** + * Lists the Data Connector Credentials for MADMA instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + options?: DataConnectorsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, dataManagerForAgricultureResourceName, options }, + listOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + nextLink: string, + options?: DataConnectorsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dataManagerForAgricultureResourceName, + nextLink, + options, + }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/dataConnectors/{dataConnectorName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataConnector, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dataManagerForAgricultureResourceName, + Parameters.dataConnectorName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/dataConnectors/{dataConnectorName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DataConnector, + }, + 201: { + bodyMapper: Mappers.DataConnector, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dataManagerForAgricultureResourceName, + Parameters.dataConnectorName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/dataConnectors/{dataConnectorName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + 400: { + isError: true, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dataManagerForAgricultureResourceName, + Parameters.dataConnectorName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/dataConnectors", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataConnectorListResponse, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.maxPageSize, + Parameters.skipToken, + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dataManagerForAgricultureResourceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataConnectorListResponse, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dataManagerForAgricultureResourceName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/agrifood/arm-agrifood/src/operations/farmBeatsExtensions.ts b/sdk/agrifood/arm-agrifood/src/operations/dataManagerForAgricultureExtensions.ts similarity index 57% rename from sdk/agrifood/arm-agrifood/src/operations/farmBeatsExtensions.ts rename to sdk/agrifood/arm-agrifood/src/operations/dataManagerForAgricultureExtensions.ts index 21fd45a22a6d..01d2cdef996f 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/farmBeatsExtensions.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/dataManagerForAgricultureExtensions.ts @@ -8,28 +8,30 @@ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; import { setContinuationToken } from "../pagingHelper"; -import { FarmBeatsExtensions } from "../operationsInterfaces"; +import { DataManagerForAgricultureExtensions } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; import { - FarmBeatsExtension, - FarmBeatsExtensionsListNextOptionalParams, - FarmBeatsExtensionsListOptionalParams, - FarmBeatsExtensionsListResponse, - FarmBeatsExtensionsGetOptionalParams, - FarmBeatsExtensionsGetResponse, - FarmBeatsExtensionsListNextResponse + DataManagerForAgricultureExtension, + DataManagerForAgricultureExtensionsListNextOptionalParams, + DataManagerForAgricultureExtensionsListOptionalParams, + DataManagerForAgricultureExtensionsListResponse, + DataManagerForAgricultureExtensionsGetOptionalParams, + DataManagerForAgricultureExtensionsGetResponse, + DataManagerForAgricultureExtensionsListNextResponse, } from "../models"; /// -/** Class containing FarmBeatsExtensions operations. */ -export class FarmBeatsExtensionsImpl implements FarmBeatsExtensions { +/** Class containing DataManagerForAgricultureExtensions operations. */ +export class DataManagerForAgricultureExtensionsImpl + implements DataManagerForAgricultureExtensions +{ private readonly client: AgriFoodMgmtClient; /** - * Initialize a new instance of the class FarmBeatsExtensions class. + * Initialize a new instance of the class DataManagerForAgricultureExtensions class. * @param client Reference to the service client */ constructor(client: AgriFoodMgmtClient) { @@ -37,12 +39,12 @@ export class FarmBeatsExtensionsImpl implements FarmBeatsExtensions { } /** - * Get list of farmBeats extension. + * Get list of Data Manager For Agriculture extension. * @param options The options parameters. */ public list( - options?: FarmBeatsExtensionsListOptionalParams - ): PagedAsyncIterableIterator { + options?: DataManagerForAgricultureExtensionsListOptionalParams, + ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { next() { @@ -56,15 +58,15 @@ export class FarmBeatsExtensionsImpl implements FarmBeatsExtensions { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( - options?: FarmBeatsExtensionsListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: FarmBeatsExtensionsListResponse; + options?: DataManagerForAgricultureExtensionsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: DataManagerForAgricultureExtensionsListResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { result = await this._list(options); @@ -83,35 +85,35 @@ export class FarmBeatsExtensionsImpl implements FarmBeatsExtensions { } private async *listPagingAll( - options?: FarmBeatsExtensionsListOptionalParams - ): AsyncIterableIterator { + options?: DataManagerForAgricultureExtensionsListOptionalParams, + ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; } } /** - * Get list of farmBeats extension. + * Get list of Data Manager For Agriculture extension. * @param options The options parameters. */ private _list( - options?: FarmBeatsExtensionsListOptionalParams - ): Promise { + options?: DataManagerForAgricultureExtensionsListOptionalParams, + ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } /** - * Get farmBeats extension. - * @param farmBeatsExtensionId farmBeatsExtensionId to be queried. + * Get Data Manager For Agriculture extension. + * @param dataManagerForAgricultureExtensionId dataManagerForAgricultureExtensionId to be queried. * @param options The options parameters. */ get( - farmBeatsExtensionId: string, - options?: FarmBeatsExtensionsGetOptionalParams - ): Promise { + dataManagerForAgricultureExtensionId: string, + options?: DataManagerForAgricultureExtensionsGetOptionalParams, + ): Promise { return this.client.sendOperationRequest( - { farmBeatsExtensionId, options }, - getOperationSpec + { dataManagerForAgricultureExtensionId, options }, + getOperationSpec, ); } @@ -122,11 +124,11 @@ export class FarmBeatsExtensionsImpl implements FarmBeatsExtensions { */ private _listNext( nextLink: string, - options?: FarmBeatsExtensionsListNextOptionalParams - ): Promise { + options?: DataManagerForAgricultureExtensionsListNextOptionalParams, + ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -138,61 +140,55 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.FarmBeatsExtensionListResponse + bodyMapper: Mappers.DataManagerForAgricultureExtensionListResponse, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [ Parameters.apiVersion, - Parameters.extensionCategories, Parameters.maxPageSize, Parameters.farmBeatsExtensionIds, Parameters.farmBeatsExtensionNames, - Parameters.publisherIds + Parameters.extensionCategories, + Parameters.publisherIds, ], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions/{farmBeatsExtensionId}", + path: "/providers/Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions/{dataManagerForAgricultureExtensionId}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.FarmBeatsExtension + bodyMapper: Mappers.DataManagerForAgricultureExtension, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.farmBeatsExtensionId], + urlParameters: [ + Parameters.$host, + Parameters.dataManagerForAgricultureExtensionId, + ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.FarmBeatsExtensionListResponse + bodyMapper: Mappers.DataManagerForAgricultureExtensionListResponse, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [ - Parameters.apiVersion, - Parameters.extensionCategories, - Parameters.maxPageSize, - Parameters.farmBeatsExtensionIds, - Parameters.farmBeatsExtensionNames, - Parameters.publisherIds - ], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/agrifood/arm-agrifood/src/operations/farmBeatsModels.ts b/sdk/agrifood/arm-agrifood/src/operations/dataManagerForAgricultureResources.ts similarity index 51% rename from sdk/agrifood/arm-agrifood/src/operations/farmBeatsModels.ts rename to sdk/agrifood/arm-agrifood/src/operations/dataManagerForAgricultureResources.ts index f0e4e6f98508..d8d3e7af090a 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/farmBeatsModels.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/dataManagerForAgricultureResources.ts @@ -8,42 +8,46 @@ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; import { setContinuationToken } from "../pagingHelper"; -import { FarmBeatsModels } from "../operationsInterfaces"; +import { DataManagerForAgricultureResources } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; import { - FarmBeats, - FarmBeatsModelsListBySubscriptionNextOptionalParams, - FarmBeatsModelsListBySubscriptionOptionalParams, - FarmBeatsModelsListBySubscriptionResponse, - FarmBeatsModelsListByResourceGroupNextOptionalParams, - FarmBeatsModelsListByResourceGroupOptionalParams, - FarmBeatsModelsListByResourceGroupResponse, - FarmBeatsModelsGetOptionalParams, - FarmBeatsModelsGetResponse, - FarmBeatsModelsCreateOrUpdateOptionalParams, - FarmBeatsModelsCreateOrUpdateResponse, - FarmBeatsUpdateRequestModel, - FarmBeatsModelsUpdateOptionalParams, - FarmBeatsModelsUpdateResponse, - FarmBeatsModelsDeleteOptionalParams, - FarmBeatsModelsGetOperationResultOptionalParams, - FarmBeatsModelsGetOperationResultResponse, - FarmBeatsModelsListBySubscriptionNextResponse, - FarmBeatsModelsListByResourceGroupNextResponse + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + DataManagerForAgriculture, + DataManagerForAgricultureResourcesListBySubscriptionNextOptionalParams, + DataManagerForAgricultureResourcesListBySubscriptionOptionalParams, + DataManagerForAgricultureResourcesListBySubscriptionResponse, + DataManagerForAgricultureResourcesListByResourceGroupNextOptionalParams, + DataManagerForAgricultureResourcesListByResourceGroupOptionalParams, + DataManagerForAgricultureResourcesListByResourceGroupResponse, + DataManagerForAgricultureResourcesGetOptionalParams, + DataManagerForAgricultureResourcesGetResponse, + DataManagerForAgricultureResourcesCreateOrUpdateOptionalParams, + DataManagerForAgricultureResourcesCreateOrUpdateResponse, + DataManagerForAgricultureUpdateRequestModel, + DataManagerForAgricultureResourcesUpdateOptionalParams, + DataManagerForAgricultureResourcesUpdateResponse, + DataManagerForAgricultureResourcesDeleteOptionalParams, + DataManagerForAgricultureResourcesListBySubscriptionNextResponse, + DataManagerForAgricultureResourcesListByResourceGroupNextResponse, } from "../models"; /// -/** Class containing FarmBeatsModels operations. */ -export class FarmBeatsModelsImpl implements FarmBeatsModels { +/** Class containing DataManagerForAgricultureResources operations. */ +export class DataManagerForAgricultureResourcesImpl + implements DataManagerForAgricultureResources +{ private readonly client: AgriFoodMgmtClient; /** - * Initialize a new instance of the class FarmBeatsModels class. + * Initialize a new instance of the class DataManagerForAgricultureResources class. * @param client Reference to the service client */ constructor(client: AgriFoodMgmtClient) { @@ -51,12 +55,12 @@ export class FarmBeatsModelsImpl implements FarmBeatsModels { } /** - * Lists the FarmBeats instances for a subscription. + * Lists the DataManagerForAgriculture instances for a subscription. * @param options The options parameters. */ public listBySubscription( - options?: FarmBeatsModelsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { + options?: DataManagerForAgricultureResourcesListBySubscriptionOptionalParams, + ): PagedAsyncIterableIterator { const iter = this.listBySubscriptionPagingAll(options); return { next() { @@ -70,15 +74,15 @@ export class FarmBeatsModelsImpl implements FarmBeatsModels { throw new Error("maxPageSize is not supported by this operation."); } return this.listBySubscriptionPagingPage(options, settings); - } + }, }; } private async *listBySubscriptionPagingPage( - options?: FarmBeatsModelsListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: FarmBeatsModelsListBySubscriptionResponse; + options?: DataManagerForAgricultureResourcesListBySubscriptionOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: DataManagerForAgricultureResourcesListBySubscriptionResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { result = await this._listBySubscription(options); @@ -97,22 +101,22 @@ export class FarmBeatsModelsImpl implements FarmBeatsModels { } private async *listBySubscriptionPagingAll( - options?: FarmBeatsModelsListBySubscriptionOptionalParams - ): AsyncIterableIterator { + options?: DataManagerForAgricultureResourcesListBySubscriptionOptionalParams, + ): AsyncIterableIterator { for await (const page of this.listBySubscriptionPagingPage(options)) { yield* page; } } /** - * Lists the FarmBeats instances for a resource group. + * Lists the DataManagerForAgriculture instances for 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?: FarmBeatsModelsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { + options?: DataManagerForAgricultureResourcesListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator { const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); return { next() { @@ -128,18 +132,18 @@ export class FarmBeatsModelsImpl implements FarmBeatsModels { return this.listByResourceGroupPagingPage( resourceGroupName, options, - settings + settings, ); - } + }, }; } private async *listByResourceGroupPagingPage( resourceGroupName: string, - options?: FarmBeatsModelsListByResourceGroupOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: FarmBeatsModelsListByResourceGroupResponse; + options?: DataManagerForAgricultureResourcesListByResourceGroupOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: DataManagerForAgricultureResourcesListByResourceGroupResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { result = await this._listByResourceGroup(resourceGroupName, options); @@ -152,7 +156,7 @@ export class FarmBeatsModelsImpl implements FarmBeatsModels { result = await this._listByResourceGroupNext( resourceGroupName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -163,87 +167,91 @@ export class FarmBeatsModelsImpl implements FarmBeatsModels { private async *listByResourceGroupPagingAll( resourceGroupName: string, - options?: FarmBeatsModelsListByResourceGroupOptionalParams - ): AsyncIterableIterator { + options?: DataManagerForAgricultureResourcesListByResourceGroupOptionalParams, + ): AsyncIterableIterator { for await (const page of this.listByResourceGroupPagingPage( resourceGroupName, - options + options, )) { yield* page; } } /** - * Get FarmBeats resource. + * Get DataManagerForAgriculture resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param options The options parameters. */ get( resourceGroupName: string, - farmBeatsResourceName: string, - options?: FarmBeatsModelsGetOptionalParams - ): Promise { + dataManagerForAgricultureResourceName: string, + options?: DataManagerForAgricultureResourcesGetOptionalParams, + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, farmBeatsResourceName, options }, - getOperationSpec + { resourceGroupName, dataManagerForAgricultureResourceName, options }, + getOperationSpec, ); } /** - * Create or update FarmBeats resource. + * Create or update Data Manager For Agriculture resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param body FarmBeats resource create or update request object. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param request Data Manager For Agriculture resource create or update request object. * @param options The options parameters. */ createOrUpdate( resourceGroupName: string, - farmBeatsResourceName: string, - body: FarmBeats, - options?: FarmBeatsModelsCreateOrUpdateOptionalParams - ): Promise { + dataManagerForAgricultureResourceName: string, + request: DataManagerForAgriculture, + options?: DataManagerForAgricultureResourcesCreateOrUpdateOptionalParams, + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, farmBeatsResourceName, body, options }, - createOrUpdateOperationSpec + { + resourceGroupName, + dataManagerForAgricultureResourceName, + request, + options, + }, + createOrUpdateOperationSpec, ); } /** - * Update a FarmBeats resource. + * Update a Data Manager For Agriculture resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param body Request object. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param request Request object. * @param options The options parameters. */ async beginUpdate( resourceGroupName: string, - farmBeatsResourceName: string, - body: FarmBeatsUpdateRequestModel, - options?: FarmBeatsModelsUpdateOptionalParams + dataManagerForAgricultureResourceName: string, + request: DataManagerForAgricultureUpdateRequestModel, + options?: DataManagerForAgricultureResourcesUpdateOptionalParams, ): Promise< - PollerLike< - PollOperationState, - FarmBeatsModelsUpdateResponse + SimplePollerLike< + OperationState, + DataManagerForAgricultureResourcesUpdateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { + spec: coreClient.OperationSpec, + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -252,8 +260,8 @@ export class FarmBeatsModelsImpl implements FarmBeatsModels { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -261,108 +269,97 @@ export class FarmBeatsModelsImpl implements FarmBeatsModels { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, farmBeatsResourceName, body, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + dataManagerForAgricultureResourceName, + request, + options, + }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + DataManagerForAgricultureResourcesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location", }); await poller.poll(); return poller; } /** - * Update a FarmBeats resource. + * Update a Data Manager For Agriculture resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param body Request object. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param request Request object. * @param options The options parameters. */ async beginUpdateAndWait( resourceGroupName: string, - farmBeatsResourceName: string, - body: FarmBeatsUpdateRequestModel, - options?: FarmBeatsModelsUpdateOptionalParams - ): Promise { + dataManagerForAgricultureResourceName: string, + request: DataManagerForAgricultureUpdateRequestModel, + options?: DataManagerForAgricultureResourcesUpdateOptionalParams, + ): Promise { const poller = await this.beginUpdate( resourceGroupName, - farmBeatsResourceName, - body, - options + dataManagerForAgricultureResourceName, + request, + options, ); return poller.pollUntilDone(); } /** - * Delete a FarmBeats resource. + * Delete a Data Manager For Agriculture resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param options The options parameters. */ delete( resourceGroupName: string, - farmBeatsResourceName: string, - options?: FarmBeatsModelsDeleteOptionalParams + dataManagerForAgricultureResourceName: string, + options?: DataManagerForAgricultureResourcesDeleteOptionalParams, ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, farmBeatsResourceName, options }, - deleteOperationSpec + { resourceGroupName, dataManagerForAgricultureResourceName, options }, + deleteOperationSpec, ); } /** - * Lists the FarmBeats instances for a subscription. + * Lists the DataManagerForAgriculture instances for a subscription. * @param options The options parameters. */ private _listBySubscription( - options?: FarmBeatsModelsListBySubscriptionOptionalParams - ): Promise { + options?: DataManagerForAgricultureResourcesListBySubscriptionOptionalParams, + ): Promise { return this.client.sendOperationRequest( { options }, - listBySubscriptionOperationSpec + listBySubscriptionOperationSpec, ); } /** - * Lists the FarmBeats instances for a resource group. + * Lists the DataManagerForAgriculture instances for 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?: FarmBeatsModelsListByResourceGroupOptionalParams - ): Promise { + options?: DataManagerForAgricultureResourcesListByResourceGroupOptionalParams, + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * Get operationResults for a FarmBeats resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param operationResultsId The operation results id. - * @param options The options parameters. - */ - getOperationResult( - resourceGroupName: string, - farmBeatsResourceName: string, - operationResultsId: string, - options?: FarmBeatsModelsGetOperationResultOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, farmBeatsResourceName, operationResultsId, options }, - getOperationResultOperationSpec + listByResourceGroupOperationSpec, ); } @@ -373,11 +370,11 @@ export class FarmBeatsModelsImpl implements FarmBeatsModels { */ private _listBySubscriptionNext( nextLink: string, - options?: FarmBeatsModelsListBySubscriptionNextOptionalParams - ): Promise { + options?: DataManagerForAgricultureResourcesListBySubscriptionNextOptionalParams, + ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listBySubscriptionNextOperationSpec + listBySubscriptionNextOperationSpec, ); } @@ -390,11 +387,11 @@ export class FarmBeatsModelsImpl implements FarmBeatsModels { private _listByResourceGroupNext( resourceGroupName: string, nextLink: string, - options?: FarmBeatsModelsListByResourceGroupNextOptionalParams - ): Promise { + options?: DataManagerForAgricultureResourcesListByResourceGroupNextOptionalParams, + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec + listByResourceGroupNextOperationSpec, ); } } @@ -402,223 +399,184 @@ export class FarmBeatsModelsImpl implements FarmBeatsModels { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.FarmBeats + bodyMapper: Mappers.DataManagerForAgriculture, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.farmBeatsResourceName + Parameters.dataManagerForAgricultureResourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.FarmBeats + bodyMapper: Mappers.DataManagerForAgriculture, }, 201: { - bodyMapper: Mappers.FarmBeats + bodyMapper: Mappers.DataManagerForAgriculture, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - requestBody: Parameters.body, + requestBody: Parameters.request, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.farmBeatsResourceName + Parameters.dataManagerForAgricultureResourceName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}", httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.FarmBeats + bodyMapper: Mappers.DataManagerForAgriculture, }, 201: { - bodyMapper: Mappers.FarmBeats + bodyMapper: Mappers.DataManagerForAgriculture, }, 202: { - bodyMapper: Mappers.FarmBeats + bodyMapper: Mappers.DataManagerForAgriculture, }, 204: { - bodyMapper: Mappers.FarmBeats + bodyMapper: Mappers.DataManagerForAgriculture, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - requestBody: Parameters.body1, + requestBody: Parameters.request1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.farmBeatsResourceName + Parameters.dataManagerForAgricultureResourceName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}", httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.farmBeatsResourceName + Parameters.dataManagerForAgricultureResourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/farmBeats", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/farmBeats", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.FarmBeatsListResponse + bodyMapper: Mappers.DataManagerForAgricultureListResponse, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [ Parameters.apiVersion, Parameters.maxPageSize, - Parameters.skipToken + Parameters.skipToken, ], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.FarmBeatsListResponse + bodyMapper: Mappers.DataManagerForAgricultureListResponse, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [ Parameters.apiVersion, Parameters.maxPageSize, - Parameters.skipToken + Parameters.skipToken, ], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationResultOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}/operationResults/{operationResultsId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ArmAsyncOperation - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.farmBeatsResourceName, - Parameters.operationResultsId ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.FarmBeatsListResponse + bodyMapper: Mappers.DataManagerForAgricultureListResponse, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [ - Parameters.apiVersion, - Parameters.maxPageSize, - Parameters.skipToken - ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.FarmBeatsListResponse + bodyMapper: Mappers.DataManagerForAgricultureListResponse, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [ - Parameters.apiVersion, - Parameters.maxPageSize, - Parameters.skipToken - ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/agrifood/arm-agrifood/src/operations/extensions.ts b/sdk/agrifood/arm-agrifood/src/operations/extensions.ts index fae4ddfd71b0..2f049dcfef40 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/extensions.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/extensions.ts @@ -15,17 +15,15 @@ import * as Parameters from "../models/parameters"; import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; import { Extension, - ExtensionsListByFarmBeatsNextOptionalParams, - ExtensionsListByFarmBeatsOptionalParams, - ExtensionsListByFarmBeatsResponse, - ExtensionsCreateOptionalParams, - ExtensionsCreateResponse, + ExtensionsListByDataManagerForAgricultureNextOptionalParams, + ExtensionsListByDataManagerForAgricultureOptionalParams, + ExtensionsListByDataManagerForAgricultureResponse, + ExtensionsCreateOrUpdateOptionalParams, + ExtensionsCreateOrUpdateResponse, ExtensionsGetOptionalParams, ExtensionsGetResponse, - ExtensionsUpdateOptionalParams, - ExtensionsUpdateResponse, ExtensionsDeleteOptionalParams, - ExtensionsListByFarmBeatsNextResponse + ExtensionsListByDataManagerForAgricultureNextResponse, } from "../models"; /// @@ -44,18 +42,18 @@ export class ExtensionsImpl implements Extensions { /** * Get installed extensions details. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param options The options parameters. */ - public listByFarmBeats( + public listByDataManagerForAgriculture( resourceGroupName: string, - farmBeatsResourceName: string, - options?: ExtensionsListByFarmBeatsOptionalParams + dataManagerForAgricultureResourceName: string, + options?: ExtensionsListByDataManagerForAgricultureOptionalParams, ): PagedAsyncIterableIterator { - const iter = this.listByFarmBeatsPagingAll( + const iter = this.listByDataManagerForAgriculturePagingAll( resourceGroupName, - farmBeatsResourceName, - options + dataManagerForAgricultureResourceName, + options, ); return { next() { @@ -68,29 +66,29 @@ export class ExtensionsImpl implements Extensions { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByFarmBeatsPagingPage( + return this.listByDataManagerForAgriculturePagingPage( resourceGroupName, - farmBeatsResourceName, + dataManagerForAgricultureResourceName, options, - settings + settings, ); - } + }, }; } - private async *listByFarmBeatsPagingPage( + private async *listByDataManagerForAgriculturePagingPage( resourceGroupName: string, - farmBeatsResourceName: string, - options?: ExtensionsListByFarmBeatsOptionalParams, - settings?: PageSettings + dataManagerForAgricultureResourceName: string, + options?: ExtensionsListByDataManagerForAgricultureOptionalParams, + settings?: PageSettings, ): AsyncIterableIterator { - let result: ExtensionsListByFarmBeatsResponse; + let result: ExtensionsListByDataManagerForAgricultureResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByFarmBeats( + result = await this._listByDataManagerForAgriculture( resourceGroupName, - farmBeatsResourceName, - options + dataManagerForAgricultureResourceName, + options, ); let page = result.value || []; continuationToken = result.nextLink; @@ -98,11 +96,11 @@ export class ExtensionsImpl implements Extensions { yield page; } while (continuationToken) { - result = await this._listByFarmBeatsNext( + result = await this._listByDataManagerForAgricultureNext( resourceGroupName, - farmBeatsResourceName, + dataManagerForAgricultureResourceName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -111,279 +109,252 @@ export class ExtensionsImpl implements Extensions { } } - private async *listByFarmBeatsPagingAll( + private async *listByDataManagerForAgriculturePagingAll( resourceGroupName: string, - farmBeatsResourceName: string, - options?: ExtensionsListByFarmBeatsOptionalParams + dataManagerForAgricultureResourceName: string, + options?: ExtensionsListByDataManagerForAgricultureOptionalParams, ): AsyncIterableIterator { - for await (const page of this.listByFarmBeatsPagingPage( + for await (const page of this.listByDataManagerForAgriculturePagingPage( resourceGroupName, - farmBeatsResourceName, - options + dataManagerForAgricultureResourceName, + options, )) { yield* page; } } /** - * Install extension. + * Install or Update extension. Additional Api Properties are merged patch and if the extension is + * updated to a new version then the obsolete entries will be auto deleted from Additional Api + * Properties. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param extensionId Id of extension resource. * @param options The options parameters. */ - create( + createOrUpdate( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, extensionId: string, - options?: ExtensionsCreateOptionalParams - ): Promise { + options?: ExtensionsCreateOrUpdateOptionalParams, + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, farmBeatsResourceName, extensionId, options }, - createOperationSpec + { + resourceGroupName, + dataManagerForAgricultureResourceName, + extensionId, + options, + }, + createOrUpdateOperationSpec, ); } /** * Get installed extension details by extension id. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param extensionId Id of extension resource. * @param options The options parameters. */ get( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, extensionId: string, - options?: ExtensionsGetOptionalParams + options?: ExtensionsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, farmBeatsResourceName, extensionId, options }, - getOperationSpec - ); - } - - /** - * Upgrade to latest extension. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param extensionId Id of extension resource. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - farmBeatsResourceName: string, - extensionId: string, - options?: ExtensionsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, farmBeatsResourceName, extensionId, options }, - updateOperationSpec + { + resourceGroupName, + dataManagerForAgricultureResourceName, + extensionId, + options, + }, + getOperationSpec, ); } /** * Uninstall extension. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param extensionId Id of extension resource. * @param options The options parameters. */ delete( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, extensionId: string, - options?: ExtensionsDeleteOptionalParams + options?: ExtensionsDeleteOptionalParams, ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, farmBeatsResourceName, extensionId, options }, - deleteOperationSpec + { + resourceGroupName, + dataManagerForAgricultureResourceName, + extensionId, + options, + }, + deleteOperationSpec, ); } /** * Get installed extensions details. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param options The options parameters. */ - private _listByFarmBeats( + private _listByDataManagerForAgriculture( resourceGroupName: string, - farmBeatsResourceName: string, - options?: ExtensionsListByFarmBeatsOptionalParams - ): Promise { + dataManagerForAgricultureResourceName: string, + options?: ExtensionsListByDataManagerForAgricultureOptionalParams, + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, farmBeatsResourceName, options }, - listByFarmBeatsOperationSpec + { resourceGroupName, dataManagerForAgricultureResourceName, options }, + listByDataManagerForAgricultureOperationSpec, ); } /** - * ListByFarmBeatsNext + * ListByDataManagerForAgricultureNext * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param nextLink The nextLink from the previous successful call to the ListByFarmBeats method. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param nextLink The nextLink from the previous successful call to the + * ListByDataManagerForAgriculture method. * @param options The options parameters. */ - private _listByFarmBeatsNext( + private _listByDataManagerForAgricultureNext( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, nextLink: string, - options?: ExtensionsListByFarmBeatsNextOptionalParams - ): Promise { + options?: ExtensionsListByDataManagerForAgricultureNextOptionalParams, + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, farmBeatsResourceName, nextLink, options }, - listByFarmBeatsNextOperationSpec + { + resourceGroupName, + dataManagerForAgricultureResourceName, + nextLink, + options, + }, + listByDataManagerForAgricultureNextOperationSpec, ); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}/extensions/{extensionId}", +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/extensions/{extensionId}", httpMethod: "PUT", responses: { 201: { - bodyMapper: Mappers.Extension + bodyMapper: Mappers.Extension, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, + requestBody: Parameters.requestBody, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.farmBeatsResourceName, - Parameters.extensionId + Parameters.dataManagerForAgricultureResourceName, + Parameters.extensionId, ], - headerParameters: [Parameters.accept], - serializer + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}/extensions/{extensionId}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/extensions/{extensionId}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Extension + bodyMapper: Mappers.Extension, }, default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.farmBeatsResourceName, - Parameters.extensionId - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}/extensions/{extensionId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.Extension + bodyMapper: Mappers.ErrorResponse, }, - default: { - bodyMapper: Mappers.ErrorResponse - } }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.farmBeatsResourceName, - Parameters.extensionId + Parameters.dataManagerForAgricultureResourceName, + Parameters.extensionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}/extensions/{extensionId}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/extensions/{extensionId}", httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.farmBeatsResourceName, - Parameters.extensionId + Parameters.dataManagerForAgricultureResourceName, + Parameters.extensionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; -const listByFarmBeatsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}/extensions", +const listByDataManagerForAgricultureOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/extensions", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ExtensionListResponse + bodyMapper: Mappers.ExtensionListResponse, }, default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.extensionIds, - Parameters.extensionCategories, - Parameters.maxPageSize, - Parameters.skipToken - ], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.farmBeatsResourceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByFarmBeatsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExtensionListResponse + bodyMapper: Mappers.ErrorResponse, }, - default: { - bodyMapper: Mappers.ErrorResponse - } }, queryParameters: [ Parameters.apiVersion, - Parameters.extensionIds, - Parameters.extensionCategories, Parameters.maxPageSize, - Parameters.skipToken + Parameters.skipToken, + Parameters.extensionCategories, + Parameters.extensionIds, ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.farmBeatsResourceName, - Parameters.nextLink + Parameters.dataManagerForAgricultureResourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; +const listByDataManagerForAgricultureNextOperationSpec: coreClient.OperationSpec = + { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExtensionListResponse, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dataManagerForAgricultureResourceName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, + }; diff --git a/sdk/agrifood/arm-agrifood/src/operations/index.ts b/sdk/agrifood/arm-agrifood/src/operations/index.ts index a08b7e34e1dd..324d0f4a3a16 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/index.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/index.ts @@ -6,10 +6,14 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./checkNameAvailability"; +export * from "./dataConnectors"; +export * from "./dataManagerForAgricultureExtensions"; +export * from "./dataManagerForAgricultureResources"; +export * from "./operationResults"; export * from "./extensions"; -export * from "./farmBeatsExtensions"; -export * from "./farmBeatsModels"; -export * from "./locations"; export * from "./operations"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; +export * from "./solutions"; +export * from "./solutionsDiscoverability"; diff --git a/sdk/agrifood/arm-agrifood/src/operations/operationResults.ts b/sdk/agrifood/arm-agrifood/src/operations/operationResults.ts new file mode 100644 index 000000000000..cc856fe3c066 --- /dev/null +++ b/sdk/agrifood/arm-agrifood/src/operations/operationResults.ts @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { OperationResults } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import { + OperationResultsGetOptionalParams, + OperationResultsGetResponse, +} from "../models"; + +/** Class containing OperationResults operations. */ +export class OperationResultsImpl implements OperationResults { + private readonly client: AgriFoodMgmtClient; + + /** + * Initialize a new instance of the class OperationResults class. + * @param client Reference to the service client + */ + constructor(client: AgriFoodMgmtClient) { + this.client = client; + } + + /** + * Get operationResults for a Data Manager For Agriculture resource. + * @param locations Location. + * @param operationResultsId operationResultsId for a specific location. + * @param options The options parameters. + */ + get( + locations: string, + operationResultsId: string, + options?: OperationResultsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { locations, operationResultsId, options }, + getOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/locations/{locations}/operationResults/{operationResultsId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ArmAsyncOperation, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.locations, + Parameters.operationResultsId, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/agrifood/arm-agrifood/src/operations/operations.ts b/sdk/agrifood/arm-agrifood/src/operations/operations.ts index f63b79ac1d80..d6a6caba2cda 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/operations.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/operations.ts @@ -18,7 +18,7 @@ import { OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, - OperationsListNextResponse + OperationsListNextResponse, } from "../models"; /// @@ -39,7 +39,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ public list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -54,13 +54,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 +81,7 @@ export class OperationsImpl implements Operations { } private async *listPagingAll( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -93,7 +93,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ private _list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -105,11 +105,11 @@ export class OperationsImpl implements Operations { */ private _listNext( nextLink: string, - options?: OperationsListNextOptionalParams + options?: OperationsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -121,30 +121,29 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResult + bodyMapper: Mappers.OperationListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResult + bodyMapper: Mappers.OperationListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/agrifood/arm-agrifood/src/operations/privateEndpointConnections.ts b/sdk/agrifood/arm-agrifood/src/operations/privateEndpointConnections.ts index 41581045d45d..b4184ce1eb0e 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/privateEndpointConnections.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/privateEndpointConnections.ts @@ -6,29 +6,32 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; import { PrivateEndpointConnections } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { PrivateEndpointConnection, - PrivateEndpointConnectionsListByResourceOptionalParams, - PrivateEndpointConnectionsListByResourceResponse, PrivateEndpointConnectionsCreateOrUpdateOptionalParams, PrivateEndpointConnectionsCreateOrUpdateResponse, PrivateEndpointConnectionsGetOptionalParams, PrivateEndpointConnectionsGetResponse, - PrivateEndpointConnectionsDeleteOptionalParams + PrivateEndpointConnectionsDeleteOptionalParams, + PrivateEndpointConnectionsListByResourceOptionalParams, + PrivateEndpointConnectionsListByResourceResponse, } from "../models"; -/// /** Class containing PrivateEndpointConnections operations. */ export class PrivateEndpointConnectionsImpl - implements PrivateEndpointConnections { + implements PrivateEndpointConnections +{ private readonly client: AgriFoodMgmtClient; /** @@ -39,153 +42,86 @@ export class PrivateEndpointConnectionsImpl this.client = client; } - /** - * Get list of Private endpoint connections. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param options The options parameters. - */ - public listByResource( - resourceGroupName: string, - farmBeatsResourceName: string, - options?: PrivateEndpointConnectionsListByResourceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourcePagingAll( - resourceGroupName, - farmBeatsResourceName, - 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.listByResourcePagingPage( - resourceGroupName, - farmBeatsResourceName, - options, - settings - ); - } - }; - } - - private async *listByResourcePagingPage( - resourceGroupName: string, - farmBeatsResourceName: string, - options?: PrivateEndpointConnectionsListByResourceOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: PrivateEndpointConnectionsListByResourceResponse; - result = await this._listByResource( - resourceGroupName, - farmBeatsResourceName, - options - ); - yield result.value || []; - } - - private async *listByResourcePagingAll( - resourceGroupName: string, - farmBeatsResourceName: string, - options?: PrivateEndpointConnectionsListByResourceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourcePagingPage( - resourceGroupName, - farmBeatsResourceName, - options - )) { - yield* page; - } - } - /** * Approves or Rejects a Private endpoint connection request. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param privateEndpointConnectionName Private endpoint connection name. - * @param body Request object. + * @param request Request object. * @param options The options parameters. */ createOrUpdate( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, privateEndpointConnectionName: string, - body: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams + request: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, - farmBeatsResourceName, + dataManagerForAgricultureResourceName, privateEndpointConnectionName, - body, - options + request, + options, }, - createOrUpdateOperationSpec + createOrUpdateOperationSpec, ); } /** * Get Private endpoint connection object. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param privateEndpointConnectionName Private endpoint connection name. * @param options The options parameters. */ get( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsGetOptionalParams + options?: PrivateEndpointConnectionsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, - farmBeatsResourceName, + dataManagerForAgricultureResourceName, privateEndpointConnectionName, - options + options, }, - getOperationSpec + getOperationSpec, ); } /** * Delete Private endpoint connection request. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param privateEndpointConnectionName Private endpoint connection name. * @param options The options parameters. */ async beginDelete( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>> { + options?: PrivateEndpointConnectionsDeleteOptionalParams, + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -194,8 +130,8 @@ export class PrivateEndpointConnectionsImpl ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -203,25 +139,25 @@ export class PrivateEndpointConnectionsImpl rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, - farmBeatsResourceName, + dataManagerForAgricultureResourceName, privateEndpointConnectionName, - options + options, }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -230,21 +166,21 @@ export class PrivateEndpointConnectionsImpl /** * Delete Private endpoint connection request. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param privateEndpointConnectionName Private endpoint connection name. * @param options The options parameters. */ async beginDeleteAndWait( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams + options?: PrivateEndpointConnectionsDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, - farmBeatsResourceName, + dataManagerForAgricultureResourceName, privateEndpointConnectionName, - options + options, ); return poller.pollUntilDone(); } @@ -252,17 +188,17 @@ export class PrivateEndpointConnectionsImpl /** * Get list of Private endpoint connections. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param options The options parameters. */ - private _listByResource( + listByResource( resourceGroupName: string, - farmBeatsResourceName: string, - options?: PrivateEndpointConnectionsListByResourceOptionalParams + dataManagerForAgricultureResourceName: string, + options?: PrivateEndpointConnectionsListByResourceOptionalParams, ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, farmBeatsResourceName, options }, - listByResourceOperationSpec + { resourceGroupName, dataManagerForAgricultureResourceName, options }, + listByResourceOperationSpec, ); } } @@ -270,60 +206,61 @@ export class PrivateEndpointConnectionsImpl const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, + }, + 400: { + bodyMapper: Mappers.ErrorResponse, + isError: true, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - requestBody: Parameters.body3, + requestBody: Parameters.request2, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.farmBeatsResourceName, - Parameters.privateEndpointConnectionName + Parameters.dataManagerForAgricultureResourceName, + Parameters.privateEndpointConnectionName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, 404: { bodyMapper: Mappers.ErrorResponse, - isError: true + isError: true, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.farmBeatsResourceName, - Parameters.privateEndpointConnectionName + Parameters.dataManagerForAgricultureResourceName, + Parameters.privateEndpointConnectionName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "DELETE", responses: { 200: {}, @@ -331,39 +268,38 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.farmBeatsResourceName, - Parameters.privateEndpointConnectionName + Parameters.dataManagerForAgricultureResourceName, + Parameters.privateEndpointConnectionName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByResourceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}/privateEndpointConnections", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateEndpointConnections", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnectionListResult + bodyMapper: Mappers.PrivateEndpointConnectionListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.farmBeatsResourceName + Parameters.dataManagerForAgricultureResourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/agrifood/arm-agrifood/src/operations/privateLinkResources.ts b/sdk/agrifood/arm-agrifood/src/operations/privateLinkResources.ts index 2696b45ffd3f..85af8ec9f1ca 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/privateLinkResources.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/privateLinkResources.ts @@ -6,21 +6,18 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; import { PrivateLinkResources } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; import { - PrivateLinkResource, PrivateLinkResourcesListByResourceOptionalParams, PrivateLinkResourcesListByResourceResponse, PrivateLinkResourcesGetOptionalParams, - PrivateLinkResourcesGetResponse + PrivateLinkResourcesGetResponse, } from "../models"; -/// /** Class containing PrivateLinkResources operations. */ export class PrivateLinkResourcesImpl implements PrivateLinkResources { private readonly client: AgriFoodMgmtClient; @@ -36,102 +33,41 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { /** * Get list of Private link resources. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param options The options parameters. */ - public listByResource( + listByResource( resourceGroupName: string, - farmBeatsResourceName: string, - options?: PrivateLinkResourcesListByResourceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourcePagingAll( - resourceGroupName, - farmBeatsResourceName, - 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.listByResourcePagingPage( - resourceGroupName, - farmBeatsResourceName, - options, - settings - ); - } - }; - } - - private async *listByResourcePagingPage( - resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, options?: PrivateLinkResourcesListByResourceOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: PrivateLinkResourcesListByResourceResponse; - result = await this._listByResource( - resourceGroupName, - farmBeatsResourceName, - options - ); - yield result.value || []; - } - - private async *listByResourcePagingAll( - resourceGroupName: string, - farmBeatsResourceName: string, - options?: PrivateLinkResourcesListByResourceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourcePagingPage( - resourceGroupName, - farmBeatsResourceName, - options - )) { - yield* page; - } - } - - /** - * Get list of Private link resources. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param options The options parameters. - */ - private _listByResource( - resourceGroupName: string, - farmBeatsResourceName: string, - options?: PrivateLinkResourcesListByResourceOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, farmBeatsResourceName, options }, - listByResourceOperationSpec + { resourceGroupName, dataManagerForAgricultureResourceName, options }, + listByResourceOperationSpec, ); } /** * Get Private link resource object. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param subResourceName Sub resource name. * @param options The options parameters. */ get( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, subResourceName: string, - options?: PrivateLinkResourcesGetOptionalParams + options?: PrivateLinkResourcesGetOptionalParams, ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, farmBeatsResourceName, subResourceName, options }, - getOperationSpec + { + resourceGroupName, + dataManagerForAgricultureResourceName, + subResourceName, + options, + }, + getOperationSpec, ); } } @@ -139,51 +75,49 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByResourceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}/privateLinkResources", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateLinkResources", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateLinkResourceListResult + bodyMapper: Mappers.PrivateLinkResourceListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.farmBeatsResourceName + Parameters.dataManagerForAgricultureResourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}/privateLinkResources/{subResourceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateLinkResources/{subResourceName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateLinkResource + bodyMapper: Mappers.PrivateLinkResource, }, 404: { bodyMapper: Mappers.ErrorResponse, - isError: true + isError: true, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.farmBeatsResourceName, - Parameters.subResourceName + Parameters.dataManagerForAgricultureResourceName, + Parameters.subResourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/agrifood/arm-agrifood/src/operations/solutions.ts b/sdk/agrifood/arm-agrifood/src/operations/solutions.ts new file mode 100644 index 000000000000..ec31cb1dbc6f --- /dev/null +++ b/sdk/agrifood/arm-agrifood/src/operations/solutions.ts @@ -0,0 +1,366 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Solutions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import { + Solution, + SolutionsListNextOptionalParams, + SolutionsListOptionalParams, + SolutionsListResponse, + SolutionsCreateOrUpdateOptionalParams, + SolutionsCreateOrUpdateResponse, + SolutionsGetOptionalParams, + SolutionsGetResponse, + SolutionsDeleteOptionalParams, + SolutionsListNextResponse, +} from "../models"; + +/// +/** Class containing Solutions operations. */ +export class SolutionsImpl implements Solutions { + private readonly client: AgriFoodMgmtClient; + + /** + * Initialize a new instance of the class Solutions class. + * @param client Reference to the service client + */ + constructor(client: AgriFoodMgmtClient) { + this.client = client; + } + + /** + * Get installed Solutions details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + options?: SolutionsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + dataManagerForAgricultureResourceName, + 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, + dataManagerForAgricultureResourceName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + options?: SolutionsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: SolutionsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + dataManagerForAgricultureResourceName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + dataManagerForAgricultureResourceName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + options?: SolutionsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + dataManagerForAgricultureResourceName, + options, + )) { + yield* page; + } + } + + /** + * Install Or Update Solution. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param solutionId SolutionId for Data Manager For Agriculture Resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + solutionId: string, + options?: SolutionsCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dataManagerForAgricultureResourceName, + solutionId, + options, + }, + createOrUpdateOperationSpec, + ); + } + + /** + * Get installed Solution details by Solution id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param solutionId SolutionId for Data Manager For Agriculture Resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + solutionId: string, + options?: SolutionsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dataManagerForAgricultureResourceName, + solutionId, + options, + }, + getOperationSpec, + ); + } + + /** + * Uninstall Solution. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param solutionId SolutionId for Data Manager For Agriculture Resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + solutionId: string, + options?: SolutionsDeleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dataManagerForAgricultureResourceName, + solutionId, + options, + }, + deleteOperationSpec, + ); + } + + /** + * Get installed Solutions details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + options?: SolutionsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, dataManagerForAgricultureResourceName, options }, + listOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + nextLink: string, + options?: SolutionsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dataManagerForAgricultureResourceName, + nextLink, + options, + }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/solutions/{solutionId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Solution, + }, + 201: { + bodyMapper: Mappers.Solution, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.requestBody1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dataManagerForAgricultureResourceName, + Parameters.solutionId, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/solutions/{solutionId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Solution, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dataManagerForAgricultureResourceName, + Parameters.solutionId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/solutions/{solutionId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dataManagerForAgricultureResourceName, + Parameters.solutionId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/solutions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SolutionListResponse, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.maxPageSize, + Parameters.skipToken, + Parameters.solutionIds, + Parameters.ids, + Parameters.names, + Parameters.propertyFilters, + Parameters.statuses, + Parameters.minCreatedDateTime, + Parameters.maxCreatedDateTime, + Parameters.minLastModifiedDateTime, + Parameters.maxLastModifiedDateTime, + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dataManagerForAgricultureResourceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SolutionListResponse, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dataManagerForAgricultureResourceName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/agrifood/arm-agrifood/src/operations/solutionsDiscoverability.ts b/sdk/agrifood/arm-agrifood/src/operations/solutionsDiscoverability.ts new file mode 100644 index 000000000000..b99f600b5fee --- /dev/null +++ b/sdk/agrifood/arm-agrifood/src/operations/solutionsDiscoverability.ts @@ -0,0 +1,190 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { SolutionsDiscoverability } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import { + DataManagerForAgricultureSolution, + SolutionsDiscoverabilityListNextOptionalParams, + SolutionsDiscoverabilityListOptionalParams, + SolutionsDiscoverabilityListResponse, + SolutionsDiscoverabilityGetOptionalParams, + SolutionsDiscoverabilityGetResponse, + SolutionsDiscoverabilityListNextResponse, +} from "../models"; + +/// +/** Class containing SolutionsDiscoverability operations. */ +export class SolutionsDiscoverabilityImpl implements SolutionsDiscoverability { + private readonly client: AgriFoodMgmtClient; + + /** + * Initialize a new instance of the class SolutionsDiscoverability class. + * @param client Reference to the service client + */ + constructor(client: AgriFoodMgmtClient) { + this.client = client; + } + + /** + * Get list of Data Manager For Agriculture solutions. + * @param options The options parameters. + */ + public list( + options?: SolutionsDiscoverabilityListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + }, + }; + } + + private async *listPagingPage( + options?: SolutionsDiscoverabilityListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: SolutionsDiscoverabilityListResponse; + 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?: SolutionsDiscoverabilityListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Get list of Data Manager For Agriculture solutions. + * @param options The options parameters. + */ + private _list( + options?: SolutionsDiscoverabilityListOptionalParams, + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Get Data Manager For Agriculture solution by id. + * @param dataManagerForAgricultureSolutionId dataManagerForAgricultureSolutionId to be queried. + * @param options The options parameters. + */ + get( + dataManagerForAgricultureSolutionId: string, + options?: SolutionsDiscoverabilityGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { dataManagerForAgricultureSolutionId, options }, + getOperationSpec, + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: SolutionsDiscoverabilityListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataManagerForAgricultureSolutionListResponse, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.maxPageSize, + Parameters.farmBeatsSolutionIds, + Parameters.farmBeatsSolutionNames, + ], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions/{dataManagerForAgricultureSolutionId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataManagerForAgricultureSolution, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.dataManagerForAgricultureSolutionId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataManagerForAgricultureSolutionListResponse, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/checkNameAvailability.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/checkNameAvailability.ts new file mode 100644 index 000000000000..d55be1cb2a81 --- /dev/null +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/checkNameAvailability.ts @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + CheckNameAvailabilityRequest, + CheckNameAvailabilityCheckNameAvailabilityOptionalParams, + CheckNameAvailabilityCheckNameAvailabilityResponse, +} from "../models"; + +/** Interface representing a CheckNameAvailability. */ +export interface CheckNameAvailability { + /** + * Checks the name availability of the resource with requested resource name. + * @param nameAvailabilityRequest NameAvailabilityRequest object. + * @param options The options parameters. + */ + checkNameAvailability( + nameAvailabilityRequest: CheckNameAvailabilityRequest, + options?: CheckNameAvailabilityCheckNameAvailabilityOptionalParams, + ): Promise; +} diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/dataConnectors.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/dataConnectors.ts new file mode 100644 index 000000000000..57b0f27dedcb --- /dev/null +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/dataConnectors.ts @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + DataConnector, + DataConnectorsListOptionalParams, + DataConnectorsGetOptionalParams, + DataConnectorsGetResponse, + DataConnectorsCreateOrUpdateOptionalParams, + DataConnectorsCreateOrUpdateResponse, + DataConnectorsDeleteOptionalParams, +} from "../models"; + +/// +/** Interface representing a DataConnectors. */ +export interface DataConnectors { + /** + * Lists the Data Connector Credentials for MADMA instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + options?: DataConnectorsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get specific Data Connector resource by DataConnectorName. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param dataConnectorName Connector name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + dataConnectorName: string, + options?: DataConnectorsGetOptionalParams, + ): Promise; + /** + * Create or update Data Connector For MADMA resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param dataConnectorName Connector name. + * @param body Body must be valid DataConnector request. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + dataConnectorName: string, + body: DataConnector, + options?: DataConnectorsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Delete a Data Connectors with given dataConnector name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param dataConnectorName Connector name. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + dataConnectorName: string, + options?: DataConnectorsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/dataManagerForAgricultureExtensions.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/dataManagerForAgricultureExtensions.ts new file mode 100644 index 000000000000..a0a5d199be4b --- /dev/null +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/dataManagerForAgricultureExtensions.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + DataManagerForAgricultureExtension, + DataManagerForAgricultureExtensionsListOptionalParams, + DataManagerForAgricultureExtensionsGetOptionalParams, + DataManagerForAgricultureExtensionsGetResponse, +} from "../models"; + +/// +/** Interface representing a DataManagerForAgricultureExtensions. */ +export interface DataManagerForAgricultureExtensions { + /** + * Get list of Data Manager For Agriculture extension. + * @param options The options parameters. + */ + list( + options?: DataManagerForAgricultureExtensionsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get Data Manager For Agriculture extension. + * @param dataManagerForAgricultureExtensionId dataManagerForAgricultureExtensionId to be queried. + * @param options The options parameters. + */ + get( + dataManagerForAgricultureExtensionId: string, + options?: DataManagerForAgricultureExtensionsGetOptionalParams, + ): Promise; +} diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/dataManagerForAgricultureResources.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/dataManagerForAgricultureResources.ts new file mode 100644 index 000000000000..818a897d583b --- /dev/null +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/dataManagerForAgricultureResources.ts @@ -0,0 +1,110 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + DataManagerForAgriculture, + DataManagerForAgricultureResourcesListBySubscriptionOptionalParams, + DataManagerForAgricultureResourcesListByResourceGroupOptionalParams, + DataManagerForAgricultureResourcesGetOptionalParams, + DataManagerForAgricultureResourcesGetResponse, + DataManagerForAgricultureResourcesCreateOrUpdateOptionalParams, + DataManagerForAgricultureResourcesCreateOrUpdateResponse, + DataManagerForAgricultureUpdateRequestModel, + DataManagerForAgricultureResourcesUpdateOptionalParams, + DataManagerForAgricultureResourcesUpdateResponse, + DataManagerForAgricultureResourcesDeleteOptionalParams, +} from "../models"; + +/// +/** Interface representing a DataManagerForAgricultureResources. */ +export interface DataManagerForAgricultureResources { + /** + * Lists the DataManagerForAgriculture instances for a subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: DataManagerForAgricultureResourcesListBySubscriptionOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Lists the DataManagerForAgriculture instances for 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?: DataManagerForAgricultureResourcesListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get DataManagerForAgriculture resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + options?: DataManagerForAgricultureResourcesGetOptionalParams, + ): Promise; + /** + * Create or update Data Manager For Agriculture resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param request Data Manager For Agriculture resource create or update request object. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + request: DataManagerForAgriculture, + options?: DataManagerForAgricultureResourcesCreateOrUpdateOptionalParams, + ): Promise; + /** + * Update a Data Manager For Agriculture resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param request Request object. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + request: DataManagerForAgricultureUpdateRequestModel, + options?: DataManagerForAgricultureResourcesUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + DataManagerForAgricultureResourcesUpdateResponse + > + >; + /** + * Update a Data Manager For Agriculture resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param request Request object. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + request: DataManagerForAgricultureUpdateRequestModel, + options?: DataManagerForAgricultureResourcesUpdateOptionalParams, + ): Promise; + /** + * Delete a Data Manager For Agriculture resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + options?: DataManagerForAgricultureResourcesDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/extensions.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/extensions.ts index 985a7ed1eb1c..57ba6b491496 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/extensions.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/extensions.ts @@ -9,14 +9,12 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { Extension, - ExtensionsListByFarmBeatsOptionalParams, - ExtensionsCreateOptionalParams, - ExtensionsCreateResponse, + ExtensionsListByDataManagerForAgricultureOptionalParams, + ExtensionsCreateOrUpdateOptionalParams, + ExtensionsCreateOrUpdateResponse, ExtensionsGetOptionalParams, ExtensionsGetResponse, - ExtensionsUpdateOptionalParams, - ExtensionsUpdateResponse, - ExtensionsDeleteOptionalParams + ExtensionsDeleteOptionalParams, } from "../models"; /// @@ -25,64 +23,53 @@ export interface Extensions { /** * Get installed extensions details. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param options The options parameters. */ - listByFarmBeats( + listByDataManagerForAgriculture( resourceGroupName: string, - farmBeatsResourceName: string, - options?: ExtensionsListByFarmBeatsOptionalParams + dataManagerForAgricultureResourceName: string, + options?: ExtensionsListByDataManagerForAgricultureOptionalParams, ): PagedAsyncIterableIterator; /** - * Install extension. + * Install or Update extension. Additional Api Properties are merged patch and if the extension is + * updated to a new version then the obsolete entries will be auto deleted from Additional Api + * Properties. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param extensionId Id of extension resource. * @param options The options parameters. */ - create( + createOrUpdate( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, extensionId: string, - options?: ExtensionsCreateOptionalParams - ): Promise; + options?: ExtensionsCreateOrUpdateOptionalParams, + ): Promise; /** * Get installed extension details by extension id. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param extensionId Id of extension resource. * @param options The options parameters. */ get( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, extensionId: string, - options?: ExtensionsGetOptionalParams + options?: ExtensionsGetOptionalParams, ): Promise; - /** - * Upgrade to latest extension. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param extensionId Id of extension resource. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - farmBeatsResourceName: string, - extensionId: string, - options?: ExtensionsUpdateOptionalParams - ): Promise; /** * Uninstall extension. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param extensionId Id of extension resource. * @param options The options parameters. */ delete( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, extensionId: string, - options?: ExtensionsDeleteOptionalParams + options?: ExtensionsDeleteOptionalParams, ): Promise; } diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsExtensions.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsExtensions.ts deleted file mode 100644 index 297061be8aa3..000000000000 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsExtensions.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - FarmBeatsExtension, - FarmBeatsExtensionsListOptionalParams, - FarmBeatsExtensionsGetOptionalParams, - FarmBeatsExtensionsGetResponse -} from "../models"; - -/// -/** Interface representing a FarmBeatsExtensions. */ -export interface FarmBeatsExtensions { - /** - * Get list of farmBeats extension. - * @param options The options parameters. - */ - list( - options?: FarmBeatsExtensionsListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get farmBeats extension. - * @param farmBeatsExtensionId farmBeatsExtensionId to be queried. - * @param options The options parameters. - */ - get( - farmBeatsExtensionId: string, - options?: FarmBeatsExtensionsGetOptionalParams - ): Promise; -} diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsModels.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsModels.ts deleted file mode 100644 index c23cb34a6ed6..000000000000 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsModels.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - FarmBeats, - FarmBeatsModelsListBySubscriptionOptionalParams, - FarmBeatsModelsListByResourceGroupOptionalParams, - FarmBeatsModelsGetOptionalParams, - FarmBeatsModelsGetResponse, - FarmBeatsModelsCreateOrUpdateOptionalParams, - FarmBeatsModelsCreateOrUpdateResponse, - FarmBeatsUpdateRequestModel, - FarmBeatsModelsUpdateOptionalParams, - FarmBeatsModelsUpdateResponse, - FarmBeatsModelsDeleteOptionalParams, - FarmBeatsModelsGetOperationResultOptionalParams, - FarmBeatsModelsGetOperationResultResponse -} from "../models"; - -/// -/** Interface representing a FarmBeatsModels. */ -export interface FarmBeatsModels { - /** - * Lists the FarmBeats instances for a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: FarmBeatsModelsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists the FarmBeats instances for 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?: FarmBeatsModelsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get FarmBeats resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - farmBeatsResourceName: string, - options?: FarmBeatsModelsGetOptionalParams - ): Promise; - /** - * Create or update FarmBeats resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param body FarmBeats resource create or update request object. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - farmBeatsResourceName: string, - body: FarmBeats, - options?: FarmBeatsModelsCreateOrUpdateOptionalParams - ): Promise; - /** - * Update a FarmBeats resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param body Request object. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - farmBeatsResourceName: string, - body: FarmBeatsUpdateRequestModel, - options?: FarmBeatsModelsUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - FarmBeatsModelsUpdateResponse - > - >; - /** - * Update a FarmBeats resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param body Request object. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - farmBeatsResourceName: string, - body: FarmBeatsUpdateRequestModel, - options?: FarmBeatsModelsUpdateOptionalParams - ): Promise; - /** - * Delete a FarmBeats resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - farmBeatsResourceName: string, - options?: FarmBeatsModelsDeleteOptionalParams - ): Promise; - /** - * Get operationResults for a FarmBeats resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param operationResultsId The operation results id. - * @param options The options parameters. - */ - getOperationResult( - resourceGroupName: string, - farmBeatsResourceName: string, - operationResultsId: string, - options?: FarmBeatsModelsGetOperationResultOptionalParams - ): Promise; -} diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/index.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/index.ts index a08b7e34e1dd..324d0f4a3a16 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/index.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/index.ts @@ -6,10 +6,14 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./checkNameAvailability"; +export * from "./dataConnectors"; +export * from "./dataManagerForAgricultureExtensions"; +export * from "./dataManagerForAgricultureResources"; +export * from "./operationResults"; export * from "./extensions"; -export * from "./farmBeatsExtensions"; -export * from "./farmBeatsModels"; -export * from "./locations"; export * from "./operations"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; +export * from "./solutions"; +export * from "./solutionsDiscoverability"; diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/locations.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/locations.ts deleted file mode 100644 index 37298457c7c5..000000000000 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/locations.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - CheckNameAvailabilityRequest, - LocationsCheckNameAvailabilityOptionalParams, - LocationsCheckNameAvailabilityResponse -} from "../models"; - -/** Interface representing a Locations. */ -export interface Locations { - /** - * Checks the name availability of the resource with requested resource name. - * @param body NameAvailabilityRequest object. - * @param options The options parameters. - */ - checkNameAvailability( - body: CheckNameAvailabilityRequest, - options?: LocationsCheckNameAvailabilityOptionalParams - ): Promise; -} diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/operationResults.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/operationResults.ts new file mode 100644 index 000000000000..114290ca2f5d --- /dev/null +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/operationResults.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + OperationResultsGetOptionalParams, + OperationResultsGetResponse, +} from "../models"; + +/** Interface representing a OperationResults. */ +export interface OperationResults { + /** + * Get operationResults for a Data Manager For Agriculture resource. + * @param locations Location. + * @param operationResultsId operationResultsId for a specific location. + * @param options The options parameters. + */ + get( + locations: string, + operationResultsId: string, + options?: OperationResultsGetOptionalParams, + ): Promise; +} diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/operations.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/operations.ts index 59cc6551a887..26a35e5f5380 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/operations.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/operations.ts @@ -17,6 +17,6 @@ export interface Operations { * @param options The options parameters. */ list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateEndpointConnections.ts index bafe92b91a36..5c133ea1e909 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateEndpointConnections.ts @@ -6,84 +6,83 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { PrivateEndpointConnection, - PrivateEndpointConnectionsListByResourceOptionalParams, PrivateEndpointConnectionsCreateOrUpdateOptionalParams, PrivateEndpointConnectionsCreateOrUpdateResponse, PrivateEndpointConnectionsGetOptionalParams, PrivateEndpointConnectionsGetResponse, - PrivateEndpointConnectionsDeleteOptionalParams + PrivateEndpointConnectionsDeleteOptionalParams, + PrivateEndpointConnectionsListByResourceOptionalParams, + PrivateEndpointConnectionsListByResourceResponse, } from "../models"; -/// /** Interface representing a PrivateEndpointConnections. */ export interface PrivateEndpointConnections { - /** - * Get list of Private endpoint connections. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. - * @param options The options parameters. - */ - listByResource( - resourceGroupName: string, - farmBeatsResourceName: string, - options?: PrivateEndpointConnectionsListByResourceOptionalParams - ): PagedAsyncIterableIterator; /** * Approves or Rejects a Private endpoint connection request. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param privateEndpointConnectionName Private endpoint connection name. - * @param body Request object. + * @param request Request object. * @param options The options parameters. */ createOrUpdate( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, privateEndpointConnectionName: string, - body: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams + request: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams, ): Promise; /** * Get Private endpoint connection object. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param privateEndpointConnectionName Private endpoint connection name. * @param options The options parameters. */ get( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsGetOptionalParams + options?: PrivateEndpointConnectionsGetOptionalParams, ): Promise; /** * Delete Private endpoint connection request. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param privateEndpointConnectionName Private endpoint connection name. * @param options The options parameters. */ beginDelete( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>>; + options?: PrivateEndpointConnectionsDeleteOptionalParams, + ): Promise, void>>; /** * Delete Private endpoint connection request. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param privateEndpointConnectionName Private endpoint connection name. * @param options The options parameters. */ beginDeleteAndWait( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams + options?: PrivateEndpointConnectionsDeleteOptionalParams, ): Promise; + /** + * Get list of Private endpoint connections. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param options The options parameters. + */ + listByResource( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + options?: PrivateEndpointConnectionsListByResourceOptionalParams, + ): Promise; } diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateLinkResources.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateLinkResources.ts index 1aa8e6a22d38..d59f281461cf 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateLinkResources.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateLinkResources.ts @@ -6,39 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - PrivateLinkResource, PrivateLinkResourcesListByResourceOptionalParams, + PrivateLinkResourcesListByResourceResponse, PrivateLinkResourcesGetOptionalParams, - PrivateLinkResourcesGetResponse + PrivateLinkResourcesGetResponse, } from "../models"; -/// /** Interface representing a PrivateLinkResources. */ export interface PrivateLinkResources { /** * Get list of Private link resources. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param options The options parameters. */ listByResource( resourceGroupName: string, - farmBeatsResourceName: string, - options?: PrivateLinkResourcesListByResourceOptionalParams - ): PagedAsyncIterableIterator; + dataManagerForAgricultureResourceName: string, + options?: PrivateLinkResourcesListByResourceOptionalParams, + ): Promise; /** * Get Private link resource object. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param farmBeatsResourceName FarmBeats resource name. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. * @param subResourceName Sub resource name. * @param options The options parameters. */ get( resourceGroupName: string, - farmBeatsResourceName: string, + dataManagerForAgricultureResourceName: string, subResourceName: string, - options?: PrivateLinkResourcesGetOptionalParams + options?: PrivateLinkResourcesGetOptionalParams, ): Promise; } diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/solutions.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/solutions.ts new file mode 100644 index 000000000000..980a60ae89b9 --- /dev/null +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/solutions.ts @@ -0,0 +1,73 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + Solution, + SolutionsListOptionalParams, + SolutionsCreateOrUpdateOptionalParams, + SolutionsCreateOrUpdateResponse, + SolutionsGetOptionalParams, + SolutionsGetResponse, + SolutionsDeleteOptionalParams, +} from "../models"; + +/// +/** Interface representing a Solutions. */ +export interface Solutions { + /** + * Get installed Solutions details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + options?: SolutionsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Install Or Update Solution. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param solutionId SolutionId for Data Manager For Agriculture Resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + solutionId: string, + options?: SolutionsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Get installed Solution details by Solution id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param solutionId SolutionId for Data Manager For Agriculture Resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + solutionId: string, + options?: SolutionsGetOptionalParams, + ): Promise; + /** + * Uninstall Solution. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataManagerForAgricultureResourceName DataManagerForAgriculture resource name. + * @param solutionId SolutionId for Data Manager For Agriculture Resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + dataManagerForAgricultureResourceName: string, + solutionId: string, + options?: SolutionsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/solutionsDiscoverability.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/solutionsDiscoverability.ts new file mode 100644 index 000000000000..09ded67849ad --- /dev/null +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/solutionsDiscoverability.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + DataManagerForAgricultureSolution, + SolutionsDiscoverabilityListOptionalParams, + SolutionsDiscoverabilityGetOptionalParams, + SolutionsDiscoverabilityGetResponse, +} from "../models"; + +/// +/** Interface representing a SolutionsDiscoverability. */ +export interface SolutionsDiscoverability { + /** + * Get list of Data Manager For Agriculture solutions. + * @param options The options parameters. + */ + list( + options?: SolutionsDiscoverabilityListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get Data Manager For Agriculture solution by id. + * @param dataManagerForAgricultureSolutionId dataManagerForAgricultureSolutionId to be queried. + * @param options The options parameters. + */ + get( + dataManagerForAgricultureSolutionId: string, + options?: SolutionsDiscoverabilityGetOptionalParams, + ): Promise; +} diff --git a/sdk/agrifood/arm-agrifood/src/pagingHelper.ts b/sdk/agrifood/arm-agrifood/src/pagingHelper.ts index d85fc13bce1e..205cccc26592 100644 --- a/sdk/agrifood/arm-agrifood/src/pagingHelper.ts +++ b/sdk/agrifood/arm-agrifood/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { @@ -28,7 +28,7 @@ export function getContinuationToken(page: unknown): string | undefined { export function setContinuationToken( page: unknown, - continuationToken: string | undefined + continuationToken: string | undefined, ): void { if (typeof page !== "object" || page === null || !continuationToken) { return; diff --git a/sdk/agrifood/arm-agrifood/test/sampleTest.ts b/sdk/agrifood/arm-agrifood/test/sampleTest.ts index 25aeb3ebcc36..d64be981b694 100644 --- a/sdk/agrifood/arm-agrifood/test/sampleTest.ts +++ b/sdk/agrifood/arm-agrifood/test/sampleTest.ts @@ -9,7 +9,7 @@ import { Recorder, RecorderStartOptions, - env + env, } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { Context } from "mocha"; @@ -18,26 +18,26 @@ 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 = { - envSetupForPlayback: replaceableVariables + envSetupForPlayback: replaceableVariables, }; describe("My test", () => { let recorder: Recorder; - beforeEach(async function(this: Context) { + beforeEach(async function (this: Context) { recorder = new Recorder(this.currentTest); await recorder.start(recorderOptions); }); - afterEach(async function() { + afterEach(async function () { await recorder.stop(); }); - it("sample test", async function() { + it("sample test", async function () { console.log("Hi, I'm a test!"); }); }); diff --git a/sdk/agrifood/arm-agrifood/tsconfig.json b/sdk/agrifood/arm-agrifood/tsconfig.json index 67feca918942..3e6ae96443f3 100644 --- a/sdk/agrifood/arm-agrifood/tsconfig.json +++ b/sdk/agrifood/arm-agrifood/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-agrifood": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"