diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 99321d0907bc..778f1a076dd6 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: @@ -4495,7 +4495,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20231030 + typescript: 5.4.0-dev.20231106 dev: false /eastasianwidth@0.2.0: @@ -9261,8 +9261,8 @@ packages: hasBin: true dev: false - /typescript@5.3.0-dev.20231030: - resolution: {integrity: sha512-azWrF0lAiu8cBHNr6yq3RDkU/DtQScvT48ea3Ngq6oXJ/GPO0n96wCFSRQA5UbZlVVf3fAAqsUfvOdohRbrPVg==} + /typescript@5.4.0-dev.20231106: + resolution: {integrity: sha512-Uxjjt7meOHOSXpQJkiObTPUXfQKqSkdcMQOV+ZAjo3U1w/D/1Qah5Pdg0x/jt/fIA6laCNWLogS+QiaT5HOohw==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -15306,20 +15306,22 @@ packages: dev: false file:projects/arm-servicelinker.tgz: - resolution: {integrity: sha512-udECqWC7AR8a+LQyDFyjHN/2bdy4xCXgJNElaRUKiLajilsr5yoVpdjaKA2f6+BRuOKMSKtZD1wvGmOFJ1gviA==, tarball: file:projects/arm-servicelinker.tgz} + resolution: {integrity: sha512-L/qtNeelvXVvH/DB+ijXlJHN4lYTg1YoiwF6elWJuy8DykWU42ubZ3Zh54Cpe/oKzUiPcQkmwpXTkd8GX/FvqA==, tarball: file:projects/arm-servicelinker.tgz} name: '@rush-temp/arm-servicelinker' version: 0.0.0 dependencies: '@azure/identity': 3.3.2 '@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 dotenv: 16.3.1 - mkdirp: 1.0.4 + esm: 3.2.25 + mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 + rimraf: 5.0.5 ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2) tslib: 2.6.2 typescript: 5.2.2 @@ -20375,7 +20377,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/servicelinker/arm-servicelinker/CHANGELOG.md b/sdk/servicelinker/arm-servicelinker/CHANGELOG.md index b2b4092ccc22..3368ff34ec24 100644 --- a/sdk/servicelinker/arm-servicelinker/CHANGELOG.md +++ b/sdk/servicelinker/arm-servicelinker/CHANGELOG.md @@ -1,15 +1,25 @@ # Release History + +## 3.0.0 (2023-11-06) + +**Features** -## 2.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Enum KnownClientType has a new value KafkaSpringBoot -### Other Changes +**Breaking Changes** + - Removed operation Linker.beginCreateOrUpdate + - Removed operation Linker.beginCreateOrUpdateAndWait + - Removed operation Linker.beginDelete + - Removed operation Linker.beginDeleteAndWait + - Removed operation Linker.beginUpdate + - Removed operation Linker.beginUpdateAndWait + - Removed operation Linker.beginValidate + - Removed operation Linker.beginValidateAndWait + - Removed operation Linker.get + - Removed operation Linker.list + + ## 2.1.0 (2022-12-16) **Features** @@ -45,4 +55,4 @@ ## 1.0.0 (2022-04-27) -The package of @azure/arm-servicelinker is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +The package of @azure/arm-servicelinker is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/servicelinker/arm-servicelinker/LICENSE b/sdk/servicelinker/arm-servicelinker/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/servicelinker/arm-servicelinker/LICENSE +++ b/sdk/servicelinker/arm-servicelinker/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/servicelinker/arm-servicelinker/README.md b/sdk/servicelinker/arm-servicelinker/README.md index bd1e958daa3d..2438582b5095 100644 --- a/sdk/servicelinker/arm-servicelinker/README.md +++ b/sdk/servicelinker/arm-servicelinker/README.md @@ -2,7 +2,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ServiceLinkerManagement client. -Microsoft.ServiceLinker provider +Microsoft.ServiceLinker provider asd [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicelinker/arm-servicelinker) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-servicelinker) | diff --git a/sdk/servicelinker/arm-servicelinker/_meta.json b/sdk/servicelinker/arm-servicelinker/_meta.json index a88461956128..60ad2f2baf0b 100644 --- a/sdk/servicelinker/arm-servicelinker/_meta.json +++ b/sdk/servicelinker/arm-servicelinker/_meta.json @@ -1,8 +1,8 @@ { - "commit": "eeb81e9f8a12ad473e8df3a71f2d58682741bcd2", - "readme": "specification\\servicelinker\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\servicelinker\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.5.20221215.1 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", - "use": "@autorest/typescript@6.0.0-rc.5.20221215.1" + "commit": "653a732b59526aba31f1ac15a66f1941900dd3e9", + "readme": "specification/servicelinker/resource-manager/readme.md", + "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/servicelinker/resource-manager/readme.md --use=@autorest/typescript@^6.0.11", + "repository_url": "https://github.com/openapi-env-test/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", + "use": "@autorest/typescript@^6.0.11" } \ No newline at end of file diff --git a/sdk/servicelinker/arm-servicelinker/package.json b/sdk/servicelinker/arm-servicelinker/package.json index 09f7d83e3866..5260afd12449 100644 --- a/sdk/servicelinker/arm-servicelinker/package.json +++ b/sdk/servicelinker/arm-servicelinker/package.json @@ -3,17 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ServiceLinkerManagementClient.", - "version": "2.1.1", + "version": "3.0.0", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", - "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -29,20 +27,22 @@ "types": "./types/arm-servicelinker.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "typescript": "~5.2.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", "dotenv": "^16.0.0", + "@azure/dev-tool": "^1.0.0", "@azure/identity": "^3.3.0", "@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" }, "repository": { @@ -77,7 +77,7 @@ "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,13 +105,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicelinker/arm-servicelinker", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-servicelinker?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicelinker/arm-servicelinker" +} \ No newline at end of file diff --git a/sdk/servicelinker/arm-servicelinker/review/arm-servicelinker.api.md b/sdk/servicelinker/arm-servicelinker/review/arm-servicelinker.api.md index 0d160013a145..8d0be556c91c 100644 --- a/sdk/servicelinker/arm-servicelinker/review/arm-servicelinker.api.md +++ b/sdk/servicelinker/arm-servicelinker/review/arm-servicelinker.api.md @@ -7,8 +7,6 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; // @public export type ActionType = string; @@ -127,6 +125,7 @@ export enum KnownClientType { Dotnet = "dotnet", Go = "go", Java = "java", + KafkaSpringBoot = "kafka-springBoot", Nodejs = "nodejs", None = "none", Php = "php", @@ -179,41 +178,9 @@ export enum KnownVNetSolutionType { // @public export interface Linker { - beginCreateOrUpdate(resourceUri: string, linkerName: string, parameters: LinkerResource, options?: LinkerCreateOrUpdateOptionalParams): Promise, LinkerCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceUri: string, linkerName: string, parameters: LinkerResource, options?: LinkerCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceUri: string, linkerName: string, options?: LinkerDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceUri: string, linkerName: string, options?: LinkerDeleteOptionalParams): Promise; - beginUpdate(resourceUri: string, linkerName: string, parameters: LinkerPatch, options?: LinkerUpdateOptionalParams): Promise, LinkerUpdateResponse>>; - beginUpdateAndWait(resourceUri: string, linkerName: string, parameters: LinkerPatch, options?: LinkerUpdateOptionalParams): Promise; - beginValidate(resourceUri: string, linkerName: string, options?: LinkerValidateOptionalParams): Promise, LinkerValidateResponse>>; - beginValidateAndWait(resourceUri: string, linkerName: string, options?: LinkerValidateOptionalParams): Promise; - get(resourceUri: string, linkerName: string, options?: LinkerGetOptionalParams): Promise; - list(resourceUri: string, options?: LinkerListOptionalParams): PagedAsyncIterableIterator; listConfigurations(resourceUri: string, linkerName: string, options?: LinkerListConfigurationsOptionalParams): Promise; } -// @public -export interface LinkerCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type LinkerCreateOrUpdateResponse = LinkerResource; - -// @public -export interface LinkerDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface LinkerGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LinkerGetResponse = LinkerResource; - // @public export interface LinkerList { nextLink?: string; @@ -227,20 +194,6 @@ export interface LinkerListConfigurationsOptionalParams extends coreClient.Opera // @public export type LinkerListConfigurationsResponse = SourceConfigurationResult; -// @public -export interface LinkerListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LinkerListNextResponse = LinkerList; - -// @public -export interface LinkerListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LinkerListResponse = LinkerList; - // @public export interface LinkerPatch { authInfo?: AuthInfoBaseUnion; @@ -264,24 +217,6 @@ export interface LinkerResource extends ProxyResource { vNetSolution?: VNetSolution; } -// @public -export interface LinkerUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type LinkerUpdateResponse = LinkerResource; - -// @public -export interface LinkerValidateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type LinkerValidateResponse = ValidateOperationResult; - // @public export interface Operation { readonly actionType?: ActionType; diff --git a/sdk/servicelinker/arm-servicelinker/src/lroImpl.ts b/sdk/servicelinker/arm-servicelinker/src/lroImpl.ts deleted file mode 100644 index 518d5f053b4e..000000000000 --- a/sdk/servicelinker/arm-servicelinker/src/lroImpl.ts +++ /dev/null @@ -1,34 +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 { 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" - }); - } -} diff --git a/sdk/servicelinker/arm-servicelinker/src/models/index.ts b/sdk/servicelinker/arm-servicelinker/src/models/index.ts index 709e0b5102bc..fbe14e6aa7f8 100644 --- a/sdk/servicelinker/arm-servicelinker/src/models/index.ts +++ b/sdk/servicelinker/arm-servicelinker/src/models/index.ts @@ -13,13 +13,6 @@ export type TargetServiceBaseUnion = | AzureResource | ConfluentBootstrapServer | ConfluentSchemaRegistry; -export type AuthInfoBaseUnion = - | AuthInfoBase - | SecretAuthInfo - | UserAssignedIdentityAuthInfo - | SystemAssignedIdentityAuthInfo - | ServicePrincipalSecretAuthInfo - | ServicePrincipalCertificateAuthInfo; export type AzureResourcePropertiesBaseUnion = | AzureResourcePropertiesBase | AzureKeyVaultProperties; @@ -28,80 +21,26 @@ export type SecretInfoBaseUnion = | ValueSecretInfo | KeyVaultSecretReferenceSecretInfo | KeyVaultSecretUriSecretInfo; +export type AuthInfoBaseUnion = + | AuthInfoBase + | SecretAuthInfo + | UserAssignedIdentityAuthInfo + | SystemAssignedIdentityAuthInfo + | ServicePrincipalSecretAuthInfo + | ServicePrincipalCertificateAuthInfo; -/** The list of Linker. */ -export interface LinkerList { - /** The link used to get the next page of Linker list. */ - nextLink?: string; - /** The list of Linkers. */ - value?: LinkerResource[]; -} - -/** The target service properties */ -export interface TargetServiceBase { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: - | "AzureResource" - | "ConfluentBootstrapServer" - | "ConfluentSchemaRegistry"; -} - -/** The authentication info */ -export interface AuthInfoBase { - /** Polymorphic discriminator, which specifies the different types this object can be */ - authType: - | "secret" - | "userAssignedIdentity" - | "systemAssignedIdentity" - | "servicePrincipalSecret" - | "servicePrincipalCertificate"; -} - -/** The VNet solution for linker */ -export interface VNetSolution { - /** Type of VNet solution. */ - type?: VNetSolutionType; -} - -/** An option to store secret value in secure place */ -export interface SecretStore { - /** The key vault id to store secret */ - keyVaultId?: string; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; +/** Configurations for source resource, include appSettings, connectionString and serviceBindings */ +export interface SourceConfigurationResult { + /** The configuration properties for source resource. */ + configurations?: SourceConfiguration[]; } -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; +/** A configuration item for source resource */ +export interface SourceConfiguration { + /** The name of setting. */ + name?: string; + /** The value of setting */ + value?: 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.). */ @@ -153,79 +92,6 @@ export interface ErrorAdditionalInfo { readonly info?: Record; } -/** A linker to be updated. */ -export interface LinkerPatch { - /** The target service properties */ - targetService?: TargetServiceBaseUnion; - /** The authentication type. */ - authInfo?: AuthInfoBaseUnion; - /** The application client type */ - clientType?: ClientType; - /** - * The provisioning state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** The VNet solution. */ - vNetSolution?: VNetSolution; - /** An option to store secret value in secure place */ - secretStore?: SecretStore; - /** connection scope in source service. */ - scope?: string; -} - -/** The validation operation result for a linker. */ -export interface ValidateOperationResult { - /** Validated linker id. */ - resourceId?: string; - /** Validation operation status. */ - status?: string; - /** The linker name. */ - linkerName?: string; - /** A boolean value indicating whether the connection is available or not */ - isConnectionAvailable?: boolean; - /** The start time of the validation report. */ - reportStartTimeUtc?: Date; - /** The end time of the validation report. */ - reportEndTimeUtc?: Date; - /** The resource id of the linker source application. */ - sourceId?: string; - /** The resource Id of target service. */ - targetId?: string; - /** The authentication type. */ - authType?: AuthType; - /** The detail of validation result */ - validationDetail?: ValidationResultItem[]; -} - -/** The validation item for a linker. */ -export interface ValidationResultItem { - /** The validation item name. */ - name?: string; - /** The display name of validation item */ - description?: string; - /** The result of validation */ - result?: ValidationResultStatus; - /** The error message of validation result */ - errorMessage?: string; - /** The error code of validation result */ - errorCode?: string; -} - -/** Configurations for source resource, include appSettings, connectionString and serviceBindings */ -export interface SourceConfigurationResult { - /** The configuration properties for source resource. */ - configurations?: SourceConfiguration[]; -} - -/** A configuration item for source resource */ -export interface SourceConfiguration { - /** The name of setting. */ - name?: string; - /** The value of setting */ - value?: string; -} - /** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ export interface OperationListResult { /** @@ -290,16 +156,150 @@ export interface OperationDisplay { readonly description?: string; } +/** The target service properties */ +export interface TargetServiceBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: + | "AzureResource" + | "ConfluentBootstrapServer" + | "ConfluentSchemaRegistry"; +} + /** The azure resource properties */ export interface AzureResourcePropertiesBase { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "KeyVault"; } -/** The secret info */ -export interface SecretInfoBase { - /** Polymorphic discriminator, which specifies the different types this object can be */ - secretType: "rawValue" | "keyVaultSecretReference" | "keyVaultSecretUri"; +/** The secret info */ +export interface SecretInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + secretType: "rawValue" | "keyVaultSecretReference" | "keyVaultSecretUri"; +} + +/** The authentication info */ +export interface AuthInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + authType: + | "secret" + | "userAssignedIdentity" + | "systemAssignedIdentity" + | "servicePrincipalSecret" + | "servicePrincipalCertificate"; +} + +/** The VNet solution for linker */ +export interface VNetSolution { + /** Type of VNet solution. */ + type?: VNetSolutionType; +} + +/** An option to store secret value in secure place */ +export interface SecretStore { + /** The key vault id to store secret */ + keyVaultId?: string; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; +} + +/** A linker to be updated. */ +export interface LinkerPatch { + /** The target service properties */ + targetService?: TargetServiceBaseUnion; + /** The authentication type. */ + authInfo?: AuthInfoBaseUnion; + /** The application client type */ + clientType?: ClientType; + /** + * The provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** The VNet solution. */ + vNetSolution?: VNetSolution; + /** An option to store secret value in secure place */ + secretStore?: SecretStore; + /** connection scope in source service. */ + scope?: string; +} + +/** The list of Linker. */ +export interface LinkerList { + /** The link used to get the next page of Linker list. */ + nextLink?: string; + /** The list of Linkers. */ + value?: LinkerResource[]; +} + +/** The validation operation result for a linker. */ +export interface ValidateOperationResult { + /** Validated linker id. */ + resourceId?: string; + /** Validation operation status. */ + status?: string; + /** The linker name. */ + linkerName?: string; + /** A boolean value indicating whether the connection is available or not */ + isConnectionAvailable?: boolean; + /** The start time of the validation report. */ + reportStartTimeUtc?: Date; + /** The end time of the validation report. */ + reportEndTimeUtc?: Date; + /** The resource id of the linker source application. */ + sourceId?: string; + /** The resource Id of target service. */ + targetId?: string; + /** The authentication type. */ + authType?: AuthType; + /** The detail of validation result */ + validationDetail?: ValidationResultItem[]; +} + +/** The validation item for a linker. */ +export interface ValidationResultItem { + /** The validation item name. */ + name?: string; + /** The display name of validation item */ + description?: string; + /** The result of validation */ + result?: ValidationResultStatus; + /** The error message of validation result */ + errorMessage?: string; + /** The error code of validation result */ + errorCode?: string; } /** The azure resource info when target service type is AzureResource */ @@ -328,6 +328,40 @@ export interface ConfluentSchemaRegistry extends TargetServiceBase { endpoint?: string; } +/** The resource properties when type is Azure Key Vault */ +export interface AzureKeyVaultProperties extends AzureResourcePropertiesBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "KeyVault"; + /** True if connect via Kubernetes CSI Driver. */ + connectAsKubernetesCsiDriver?: boolean; +} + +/** The secret info when type is rawValue. It's for scenarios that user input the secret. */ +export interface ValueSecretInfo extends SecretInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + secretType: "rawValue"; + /** The actual value of the secret. */ + value?: string; +} + +/** The secret info when type is keyVaultSecretReference. It's for scenario that user provides a secret stored in user's keyvault and source is Azure Kubernetes. The key Vault's resource id is linked to secretStore.keyVaultId. */ +export interface KeyVaultSecretReferenceSecretInfo extends SecretInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + secretType: "keyVaultSecretReference"; + /** Name of the Key Vault secret. */ + name?: string; + /** Version of the Key Vault secret. */ + version?: string; +} + +/** The secret info when type is keyVaultSecretUri. It's for scenario that user provides a secret stored in user's keyvault and source is Web App, Spring Cloud or Container App. */ +export interface KeyVaultSecretUriSecretInfo extends SecretInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + secretType: "keyVaultSecretUri"; + /** URI to the keyvault secret */ + value?: string; +} + /** The authentication info when authType is secret */ export interface SecretAuthInfo extends AuthInfoBase { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -381,40 +415,6 @@ export interface ServicePrincipalCertificateAuthInfo extends AuthInfoBase { /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} -/** The resource properties when type is Azure Key Vault */ -export interface AzureKeyVaultProperties extends AzureResourcePropertiesBase { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "KeyVault"; - /** True if connect via Kubernetes CSI Driver. */ - connectAsKubernetesCsiDriver?: boolean; -} - -/** The secret info when type is rawValue. It's for scenarios that user input the secret. */ -export interface ValueSecretInfo extends SecretInfoBase { - /** Polymorphic discriminator, which specifies the different types this object can be */ - secretType: "rawValue"; - /** The actual value of the secret. */ - value?: string; -} - -/** The secret info when type is keyVaultSecretReference. It's for scenario that user provides a secret stored in user's keyvault and source is Azure Kubernetes. The key Vault's resource id is linked to secretStore.keyVaultId. */ -export interface KeyVaultSecretReferenceSecretInfo extends SecretInfoBase { - /** Polymorphic discriminator, which specifies the different types this object can be */ - secretType: "keyVaultSecretReference"; - /** Name of the Key Vault secret. */ - name?: string; - /** Version of the Key Vault secret. */ - version?: string; -} - -/** The secret info when type is keyVaultSecretUri. It's for scenario that user provides a secret stored in user's keyvault and source is Web App, Spring Cloud or Container App. */ -export interface KeyVaultSecretUriSecretInfo extends SecretInfoBase { - /** Polymorphic discriminator, which specifies the different types this object can be */ - secretType: "keyVaultSecretUri"; - /** URI to the keyvault secret */ - value?: string; -} - /** Linker of source and target resource */ export interface LinkerResource extends ProxyResource { /** @@ -441,6 +441,42 @@ export interface LinkerResource extends ProxyResource { scope?: string; } +/** Known values of {@link Origin} that the service accepts. */ +export enum KnownOrigin { + /** User */ + User = "user", + /** System */ + System = "system", + /** UserSystem */ + UserSystem = "user,system" +} + +/** + * Defines values for Origin. \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user** \ + * **system** \ + * **user,system** + */ +export type Origin = string; + +/** Known values of {@link ActionType} that the service accepts. */ +export enum KnownActionType { + /** Internal */ + Internal = "Internal" +} + +/** + * Defines values for ActionType. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal** + */ +export type ActionType = string; + /** Known values of {@link TargetServiceType} that the service accepts. */ export enum KnownTargetServiceType { /** AzureResource */ @@ -462,6 +498,42 @@ export enum KnownTargetServiceType { */ export type TargetServiceType = string; +/** Known values of {@link AzureResourceType} that the service accepts. */ +export enum KnownAzureResourceType { + /** KeyVault */ + KeyVault = "KeyVault" +} + +/** + * Defines values for AzureResourceType. \ + * {@link KnownAzureResourceType} can be used interchangeably with AzureResourceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **KeyVault** + */ +export type AzureResourceType = string; + +/** Known values of {@link SecretType} that the service accepts. */ +export enum KnownSecretType { + /** RawValue */ + RawValue = "rawValue", + /** KeyVaultSecretUri */ + KeyVaultSecretUri = "keyVaultSecretUri", + /** KeyVaultSecretReference */ + KeyVaultSecretReference = "keyVaultSecretReference" +} + +/** + * Defines values for SecretType. \ + * {@link KnownSecretType} can be used interchangeably with SecretType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **rawValue** \ + * **keyVaultSecretUri** \ + * **keyVaultSecretReference** + */ +export type SecretType = string; + /** Known values of {@link AuthType} that the service accepts. */ export enum KnownAuthType { /** SystemAssignedIdentity */ @@ -510,7 +582,9 @@ export enum KnownClientType { /** Nodejs */ Nodejs = "nodejs", /** SpringBoot */ - SpringBoot = "springBoot" + SpringBoot = "springBoot", + /** KafkaSpringBoot */ + KafkaSpringBoot = "kafka-springBoot" } /** @@ -527,7 +601,8 @@ export enum KnownClientType { * **ruby** \ * **django** \ * **nodejs** \ - * **springBoot** + * **springBoot** \ + * **kafka-springBoot** */ export type ClientType = string; @@ -594,135 +669,6 @@ export enum KnownValidationResultStatus { */ export type ValidationResultStatus = string; -/** Known values of {@link Origin} that the service accepts. */ -export enum KnownOrigin { - /** User */ - User = "user", - /** System */ - System = "system", - /** UserSystem */ - UserSystem = "user,system" -} - -/** - * Defines values for Origin. \ - * {@link KnownOrigin} can be used interchangeably with Origin, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **user** \ - * **system** \ - * **user,system** - */ -export type Origin = string; - -/** Known values of {@link ActionType} that the service accepts. */ -export enum KnownActionType { - /** Internal */ - Internal = "Internal" -} - -/** - * Defines values for ActionType. \ - * {@link KnownActionType} can be used interchangeably with ActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Internal** - */ -export type ActionType = string; - -/** Known values of {@link AzureResourceType} that the service accepts. */ -export enum KnownAzureResourceType { - /** KeyVault */ - KeyVault = "KeyVault" -} - -/** - * Defines values for AzureResourceType. \ - * {@link KnownAzureResourceType} can be used interchangeably with AzureResourceType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **KeyVault** - */ -export type AzureResourceType = string; - -/** Known values of {@link SecretType} that the service accepts. */ -export enum KnownSecretType { - /** RawValue */ - RawValue = "rawValue", - /** KeyVaultSecretUri */ - KeyVaultSecretUri = "keyVaultSecretUri", - /** KeyVaultSecretReference */ - KeyVaultSecretReference = "keyVaultSecretReference" -} - -/** - * Defines values for SecretType. \ - * {@link KnownSecretType} can be used interchangeably with SecretType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **rawValue** \ - * **keyVaultSecretUri** \ - * **keyVaultSecretReference** - */ -export type SecretType = string; - -/** Optional parameters. */ -export interface LinkerListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type LinkerListResponse = LinkerList; - -/** Optional parameters. */ -export interface LinkerGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type LinkerGetResponse = LinkerResource; - -/** Optional parameters. */ -export interface LinkerCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type LinkerCreateOrUpdateResponse = LinkerResource; - -/** Optional parameters. */ -export interface LinkerDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface LinkerUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type LinkerUpdateResponse = LinkerResource; - -/** Optional parameters. */ -export interface LinkerValidateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the validate operation. */ -export type LinkerValidateResponse = ValidateOperationResult; - /** Optional parameters. */ export interface LinkerListConfigurationsOptionalParams extends coreClient.OperationOptions {} @@ -730,13 +676,6 @@ export interface LinkerListConfigurationsOptionalParams /** Contains response data for the listConfigurations operation. */ export type LinkerListConfigurationsResponse = SourceConfigurationResult; -/** Optional parameters. */ -export interface LinkerListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type LinkerListNextResponse = LinkerList; - /** Optional parameters. */ export interface OperationsListOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/servicelinker/arm-servicelinker/src/models/mappers.ts b/sdk/servicelinker/arm-servicelinker/src/models/mappers.ts index 606d95ae720c..5b710fd9661f 100644 --- a/sdk/servicelinker/arm-servicelinker/src/models/mappers.ts +++ b/sdk/servicelinker/arm-servicelinker/src/models/mappers.ts @@ -8,26 +8,19 @@ import * as coreClient from "@azure/core-client"; -export const LinkerList: coreClient.CompositeMapper = { +export const SourceConfigurationResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LinkerList", + className: "SourceConfigurationResult", modelProperties: { - nextLink: { - serializedName: "nextLink", - nullable: true, - type: { - name: "String" - } - }, - value: { - serializedName: "value", + configurations: { + serializedName: "configurations", type: { name: "Sequence", element: { type: { name: "Composite", - className: "LinkerResource" + className: "SourceConfiguration" } } } @@ -36,147 +29,20 @@ export const LinkerList: coreClient.CompositeMapper = { } }; -export const TargetServiceBase: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TargetServiceBase", - uberParent: "TargetServiceBase", - polymorphicDiscriminator: { - serializedName: "type", - clientName: "type" - }, - modelProperties: { - type: { - serializedName: "type", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const AuthInfoBase: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AuthInfoBase", - uberParent: "AuthInfoBase", - polymorphicDiscriminator: { - serializedName: "authType", - clientName: "authType" - }, - modelProperties: { - authType: { - serializedName: "authType", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const VNetSolution: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VNetSolution", - modelProperties: { - type: { - serializedName: "type", - nullable: true, - type: { - name: "String" - } - } - } - } -}; - -export const SecretStore: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecretStore", - modelProperties: { - keyVaultId: { - serializedName: "keyVaultId", - nullable: true, - type: { - name: "String" - } - } - } - } -}; - -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 Resource: coreClient.CompositeMapper = { +export const SourceConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "SourceConfiguration", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, name: { serializedName: "name", - readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + value: { + serializedName: "value", + nullable: true, type: { name: "String" } @@ -281,55 +147,71 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { } }; -export const LinkerPatch: coreClient.CompositeMapper = { +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LinkerPatch", + className: "OperationListResult", modelProperties: { - targetService: { - serializedName: "properties.targetService", + value: { + serializedName: "value", + readOnly: true, type: { - name: "Composite", - className: "TargetServiceBase" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } } }, - authInfo: { - serializedName: "properties.authInfo", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Composite", - className: "AuthInfoBase" + name: "String" } - }, - clientType: { - serializedName: "properties.clientType", + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + isDataAction: { + serializedName: "isDataAction", readOnly: true, type: { - name: "String" + name: "Boolean" } }, - vNetSolution: { - serializedName: "properties.vNetSolution", + display: { + serializedName: "display", type: { name: "Composite", - className: "VNetSolution" + className: "OperationDisplay" } }, - secretStore: { - serializedName: "properties.secretStore", + origin: { + serializedName: "origin", + readOnly: true, type: { - name: "Composite", - className: "SecretStore" + name: "String" } }, - scope: { - serializedName: "properties.scope", - nullable: true, + actionType: { + serializedName: "actionType", + readOnly: true, type: { name: "String" } @@ -338,168 +220,282 @@ export const LinkerPatch: coreClient.CompositeMapper = { } }; -export const ValidateOperationResult: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ValidateOperationResult", + className: "OperationDisplay", modelProperties: { - resourceId: { - serializedName: "resourceId", - nullable: true, + provider: { + serializedName: "provider", + readOnly: true, type: { name: "String" } }, - status: { - serializedName: "status", - nullable: true, + resource: { + serializedName: "resource", + readOnly: true, type: { name: "String" } }, - linkerName: { - serializedName: "properties.linkerName", - nullable: true, + operation: { + serializedName: "operation", + readOnly: true, type: { name: "String" } }, - isConnectionAvailable: { - serializedName: "properties.isConnectionAvailable", - nullable: true, + description: { + serializedName: "description", + readOnly: true, type: { - name: "Boolean" + name: "String" } - }, - reportStartTimeUtc: { - serializedName: "properties.reportStartTimeUtc", - nullable: true, + } + } + } +}; + +export const TargetServiceBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TargetServiceBase", + uberParent: "TargetServiceBase", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + modelProperties: { + type: { + serializedName: "type", + required: true, type: { - name: "DateTime" + name: "String" } - }, - reportEndTimeUtc: { - serializedName: "properties.reportEndTimeUtc", - nullable: true, + } + } + } +}; + +export const AzureResourcePropertiesBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureResourcePropertiesBase", + uberParent: "AzureResourcePropertiesBase", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + modelProperties: { + type: { + serializedName: "type", + required: true, type: { - name: "DateTime" + name: "String" } - }, - sourceId: { - serializedName: "properties.sourceId", - nullable: true, + } + } + } +}; + +export const SecretInfoBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecretInfoBase", + uberParent: "SecretInfoBase", + polymorphicDiscriminator: { + serializedName: "secretType", + clientName: "secretType" + }, + modelProperties: { + secretType: { + serializedName: "secretType", + required: true, type: { name: "String" } - }, - targetId: { - serializedName: "properties.targetId", - nullable: true, + } + } + } +}; + +export const AuthInfoBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthInfoBase", + uberParent: "AuthInfoBase", + polymorphicDiscriminator: { + serializedName: "authType", + clientName: "authType" + }, + modelProperties: { + authType: { + serializedName: "authType", + required: true, type: { name: "String" } - }, - authType: { - serializedName: "properties.authType", + } + } + } +}; + +export const VNetSolution: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VNetSolution", + modelProperties: { + type: { + serializedName: "type", nullable: true, type: { name: "String" } - }, - validationDetail: { - serializedName: "properties.validationDetail", + } + } + } +}; + +export const SecretStore: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecretStore", + modelProperties: { + keyVaultId: { + serializedName: "keyVaultId", nullable: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ValidationResultItem" - } - } + name: "String" } } } } }; -export const ValidationResultItem: coreClient.CompositeMapper = { +export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ValidationResultItem", + className: "SystemData", modelProperties: { - name: { - serializedName: "name", + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - description: { - serializedName: "description", - nullable: true, + createdByType: { + serializedName: "createdByType", type: { name: "String" } }, - result: { - serializedName: "result", - nullable: true, + createdAt: { + serializedName: "createdAt", type: { - name: "String" + name: "DateTime" } }, - errorMessage: { - serializedName: "errorMessage", - nullable: true, + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } }, - errorCode: { - serializedName: "errorCode", - nullable: true, + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String" } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } } } } }; -export const SourceConfigurationResult: coreClient.CompositeMapper = { +export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SourceConfigurationResult", + className: "Resource", modelProperties: { - configurations: { - serializedName: "configurations", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SourceConfiguration" - } - } + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" } } } } }; -export const SourceConfiguration: coreClient.CompositeMapper = { +export const LinkerPatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SourceConfiguration", + className: "LinkerPatch", modelProperties: { - name: { - serializedName: "name", + targetService: { + serializedName: "properties.targetService", + type: { + name: "Composite", + className: "TargetServiceBase" + } + }, + authInfo: { + serializedName: "properties.authInfo", + type: { + name: "Composite", + className: "AuthInfoBase" + } + }, + clientType: { + serializedName: "properties.clientType", type: { name: "String" } }, - value: { - serializedName: "value", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + vNetSolution: { + serializedName: "properties.vNetSolution", + type: { + name: "Composite", + className: "VNetSolution" + } + }, + secretStore: { + serializedName: "properties.secretStore", + type: { + name: "Composite", + className: "SecretStore" + } + }, + scope: { + serializedName: "properties.scope", nullable: true, type: { name: "String" @@ -509,150 +505,154 @@ export const SourceConfiguration: coreClient.CompositeMapper = { } }; -export const OperationListResult: coreClient.CompositeMapper = { +export const LinkerList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationListResult", + className: "LinkerList", modelProperties: { + nextLink: { + serializedName: "nextLink", + nullable: true, + type: { + name: "String" + } + }, value: { serializedName: "value", - readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Operation" + className: "LinkerResource" } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } } } } }; -export const Operation: coreClient.CompositeMapper = { +export const ValidateOperationResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Operation", + className: "ValidateOperationResult", modelProperties: { - name: { - serializedName: "name", - readOnly: true, + resourceId: { + serializedName: "resourceId", + nullable: true, type: { name: "String" } }, - isDataAction: { - serializedName: "isDataAction", - readOnly: true, + status: { + serializedName: "status", + nullable: true, + type: { + name: "String" + } + }, + linkerName: { + serializedName: "properties.linkerName", + nullable: true, + type: { + name: "String" + } + }, + isConnectionAvailable: { + serializedName: "properties.isConnectionAvailable", + nullable: true, type: { name: "Boolean" } }, - display: { - serializedName: "display", + reportStartTimeUtc: { + serializedName: "properties.reportStartTimeUtc", + nullable: true, type: { - name: "Composite", - className: "OperationDisplay" + name: "DateTime" } }, - origin: { - serializedName: "origin", - readOnly: true, + reportEndTimeUtc: { + serializedName: "properties.reportEndTimeUtc", + nullable: true, + type: { + name: "DateTime" + } + }, + sourceId: { + serializedName: "properties.sourceId", + nullable: true, type: { name: "String" } }, - actionType: { - serializedName: "actionType", - readOnly: true, + targetId: { + serializedName: "properties.targetId", + nullable: true, + type: { + name: "String" + } + }, + authType: { + serializedName: "properties.authType", + nullable: true, type: { name: "String" } + }, + validationDetail: { + serializedName: "properties.validationDetail", + nullable: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ValidationResultItem" + } + } + } } } } }; -export const OperationDisplay: coreClient.CompositeMapper = { +export const ValidationResultItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "ValidationResultItem", modelProperties: { - provider: { - serializedName: "provider", - readOnly: true, + name: { + serializedName: "name", type: { name: "String" } }, - resource: { - serializedName: "resource", - readOnly: true, + description: { + serializedName: "description", + nullable: true, type: { name: "String" } }, - operation: { - serializedName: "operation", - readOnly: true, + result: { + serializedName: "result", + nullable: true, type: { name: "String" } }, - description: { - serializedName: "description", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const AzureResourcePropertiesBase: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureResourcePropertiesBase", - uberParent: "AzureResourcePropertiesBase", - polymorphicDiscriminator: { - serializedName: "type", - clientName: "type" - }, - modelProperties: { - type: { - serializedName: "type", - required: true, + errorMessage: { + serializedName: "errorMessage", + nullable: true, type: { name: "String" } - } - } - } -}; - -export const SecretInfoBase: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecretInfoBase", - uberParent: "SecretInfoBase", - polymorphicDiscriminator: { - serializedName: "secretType", - clientName: "secretType" - }, - modelProperties: { - secretType: { - serializedName: "secretType", - required: true, + }, + errorCode: { + serializedName: "errorCode", + nullable: true, type: { name: "String" } @@ -725,6 +725,92 @@ export const ConfluentSchemaRegistry: coreClient.CompositeMapper = { } }; +export const AzureKeyVaultProperties: coreClient.CompositeMapper = { + serializedName: "KeyVault", + type: { + name: "Composite", + className: "AzureKeyVaultProperties", + uberParent: "AzureResourcePropertiesBase", + polymorphicDiscriminator: + AzureResourcePropertiesBase.type.polymorphicDiscriminator, + modelProperties: { + ...AzureResourcePropertiesBase.type.modelProperties, + connectAsKubernetesCsiDriver: { + serializedName: "connectAsKubernetesCsiDriver", + nullable: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const ValueSecretInfo: coreClient.CompositeMapper = { + serializedName: "rawValue", + type: { + name: "Composite", + className: "ValueSecretInfo", + uberParent: "SecretInfoBase", + polymorphicDiscriminator: SecretInfoBase.type.polymorphicDiscriminator, + modelProperties: { + ...SecretInfoBase.type.modelProperties, + value: { + serializedName: "value", + nullable: true, + type: { + name: "String" + } + } + } + } +}; + +export const KeyVaultSecretReferenceSecretInfo: coreClient.CompositeMapper = { + serializedName: "keyVaultSecretReference", + type: { + name: "Composite", + className: "KeyVaultSecretReferenceSecretInfo", + uberParent: "SecretInfoBase", + polymorphicDiscriminator: SecretInfoBase.type.polymorphicDiscriminator, + modelProperties: { + ...SecretInfoBase.type.modelProperties, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + nullable: true, + type: { + name: "String" + } + } + } + } +}; + +export const KeyVaultSecretUriSecretInfo: coreClient.CompositeMapper = { + serializedName: "keyVaultSecretUri", + type: { + name: "Composite", + className: "KeyVaultSecretUriSecretInfo", + uberParent: "SecretInfoBase", + polymorphicDiscriminator: SecretInfoBase.type.polymorphicDiscriminator, + modelProperties: { + ...SecretInfoBase.type.modelProperties, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + export const SecretAuthInfo: coreClient.CompositeMapper = { serializedName: "secret", type: { @@ -868,92 +954,6 @@ export const ProxyResource: coreClient.CompositeMapper = { } }; -export const AzureKeyVaultProperties: coreClient.CompositeMapper = { - serializedName: "KeyVault", - type: { - name: "Composite", - className: "AzureKeyVaultProperties", - uberParent: "AzureResourcePropertiesBase", - polymorphicDiscriminator: - AzureResourcePropertiesBase.type.polymorphicDiscriminator, - modelProperties: { - ...AzureResourcePropertiesBase.type.modelProperties, - connectAsKubernetesCsiDriver: { - serializedName: "connectAsKubernetesCsiDriver", - nullable: true, - type: { - name: "Boolean" - } - } - } - } -}; - -export const ValueSecretInfo: coreClient.CompositeMapper = { - serializedName: "rawValue", - type: { - name: "Composite", - className: "ValueSecretInfo", - uberParent: "SecretInfoBase", - polymorphicDiscriminator: SecretInfoBase.type.polymorphicDiscriminator, - modelProperties: { - ...SecretInfoBase.type.modelProperties, - value: { - serializedName: "value", - nullable: true, - type: { - name: "String" - } - } - } - } -}; - -export const KeyVaultSecretReferenceSecretInfo: coreClient.CompositeMapper = { - serializedName: "keyVaultSecretReference", - type: { - name: "Composite", - className: "KeyVaultSecretReferenceSecretInfo", - uberParent: "SecretInfoBase", - polymorphicDiscriminator: SecretInfoBase.type.polymorphicDiscriminator, - modelProperties: { - ...SecretInfoBase.type.modelProperties, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - version: { - serializedName: "version", - nullable: true, - type: { - name: "String" - } - } - } - } -}; - -export const KeyVaultSecretUriSecretInfo: coreClient.CompositeMapper = { - serializedName: "keyVaultSecretUri", - type: { - name: "Composite", - className: "KeyVaultSecretUriSecretInfo", - uberParent: "SecretInfoBase", - polymorphicDiscriminator: SecretInfoBase.type.polymorphicDiscriminator, - modelProperties: { - ...SecretInfoBase.type.modelProperties, - value: { - serializedName: "value", - type: { - name: "String" - } - } - } - } -}; - export const LinkerResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1021,19 +1021,19 @@ export const LinkerResource: coreClient.CompositeMapper = { export let discriminators = { TargetServiceBase: TargetServiceBase, - AuthInfoBase: AuthInfoBase, AzureResourcePropertiesBase: AzureResourcePropertiesBase, SecretInfoBase: SecretInfoBase, + AuthInfoBase: AuthInfoBase, "TargetServiceBase.AzureResource": AzureResource, "TargetServiceBase.ConfluentBootstrapServer": ConfluentBootstrapServer, "TargetServiceBase.ConfluentSchemaRegistry": ConfluentSchemaRegistry, + "AzureResourcePropertiesBase.KeyVault": AzureKeyVaultProperties, + "SecretInfoBase.rawValue": ValueSecretInfo, + "SecretInfoBase.keyVaultSecretReference": KeyVaultSecretReferenceSecretInfo, + "SecretInfoBase.keyVaultSecretUri": KeyVaultSecretUriSecretInfo, "AuthInfoBase.secret": SecretAuthInfo, "AuthInfoBase.userAssignedIdentity": UserAssignedIdentityAuthInfo, "AuthInfoBase.systemAssignedIdentity": SystemAssignedIdentityAuthInfo, "AuthInfoBase.servicePrincipalSecret": ServicePrincipalSecretAuthInfo, - "AuthInfoBase.servicePrincipalCertificate": ServicePrincipalCertificateAuthInfo, - "AzureResourcePropertiesBase.KeyVault": AzureKeyVaultProperties, - "SecretInfoBase.rawValue": ValueSecretInfo, - "SecretInfoBase.keyVaultSecretReference": KeyVaultSecretReferenceSecretInfo, - "SecretInfoBase.keyVaultSecretUri": KeyVaultSecretUriSecretInfo + "AuthInfoBase.servicePrincipalCertificate": ServicePrincipalCertificateAuthInfo }; diff --git a/sdk/servicelinker/arm-servicelinker/src/models/parameters.ts b/sdk/servicelinker/arm-servicelinker/src/models/parameters.ts index ab0e3f41bd86..23d7ba23fb1c 100644 --- a/sdk/servicelinker/arm-servicelinker/src/models/parameters.ts +++ b/sdk/servicelinker/arm-servicelinker/src/models/parameters.ts @@ -11,10 +11,6 @@ import { OperationURLParameter, OperationQueryParameter } from "@azure/core-client"; -import { - LinkerResource as LinkerResourceMapper, - LinkerPatch as LinkerPatchMapper -} from "../models/mappers"; export const accept: OperationParameter = { parameterPath: "accept", @@ -75,28 +71,6 @@ export const linkerName: OperationURLParameter = { } }; -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String" - } - } -}; - -export const parameters: OperationParameter = { - parameterPath: "parameters", - mapper: LinkerResourceMapper -}; - -export const parameters1: OperationParameter = { - parameterPath: "parameters", - mapper: LinkerPatchMapper -}; - export const nextLink: OperationURLParameter = { parameterPath: "nextLink", mapper: { diff --git a/sdk/servicelinker/arm-servicelinker/src/operations/linker.ts b/sdk/servicelinker/arm-servicelinker/src/operations/linker.ts index 9c6a50a0e00a..0485b6779db5 100644 --- a/sdk/servicelinker/arm-servicelinker/src/operations/linker.ts +++ b/sdk/servicelinker/arm-servicelinker/src/operations/linker.ts @@ -6,36 +6,16 @@ * 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 { Linker } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ServiceLinkerManagementClient } from "../serviceLinkerManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; import { - LinkerResource, - LinkerListNextOptionalParams, - LinkerListOptionalParams, - LinkerListResponse, - LinkerGetOptionalParams, - LinkerGetResponse, - LinkerCreateOrUpdateOptionalParams, - LinkerCreateOrUpdateResponse, - LinkerDeleteOptionalParams, - LinkerPatch, - LinkerUpdateOptionalParams, - LinkerUpdateResponse, - LinkerValidateOptionalParams, - LinkerValidateResponse, LinkerListConfigurationsOptionalParams, - LinkerListConfigurationsResponse, - LinkerListNextResponse + LinkerListConfigurationsResponse } from "../models"; -/// /** Class containing Linker operations. */ export class LinkerImpl implements Linker { private readonly client: ServiceLinkerManagementClient; @@ -48,453 +28,6 @@ export class LinkerImpl implements Linker { this.client = client; } - /** - * Returns list of Linkers which connects to the resource. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param options The options parameters. - */ - public list( - resourceUri: string, - options?: LinkerListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceUri, 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(resourceUri, options, settings); - } - }; - } - - private async *listPagingPage( - resourceUri: string, - options?: LinkerListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: LinkerListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceUri, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(resourceUri, continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceUri: string, - options?: LinkerListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceUri, options)) { - yield* page; - } - } - - /** - * Returns list of Linkers which connects to the resource. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param options The options parameters. - */ - private _list( - resourceUri: string, - options?: LinkerListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - listOperationSpec - ); - } - - /** - * Returns Linker resource for a given name. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - get( - resourceUri: string, - linkerName: string, - options?: LinkerGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, linkerName, options }, - getOperationSpec - ); - } - - /** - * Create or update linker resource. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceUri: string, - linkerName: string, - parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - LinkerCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceUri, linkerName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Create or update linker resource. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceUri: string, - linkerName: string, - parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceUri, - linkerName, - parameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * Delete a link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - async beginDelete( - resourceUri: string, - linkerName: string, - options?: LinkerDeleteOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceUri, linkerName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Delete a link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceUri: string, - linkerName: string, - options?: LinkerDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete(resourceUri, linkerName, options); - return poller.pollUntilDone(); - } - - /** - * Operation to update an existing link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - async beginUpdate( - resourceUri: string, - linkerName: string, - parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams - ): Promise< - PollerLike, LinkerUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceUri, linkerName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Operation to update an existing link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceUri: string, - linkerName: string, - parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceUri, - linkerName, - parameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * Validate a link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - async beginValidate( - resourceUri: string, - linkerName: string, - options?: LinkerValidateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - LinkerValidateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceUri, linkerName, options }, - validateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Validate a link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - async beginValidateAndWait( - resourceUri: string, - linkerName: string, - options?: LinkerValidateOptionalParams - ): Promise { - const poller = await this.beginValidate(resourceUri, linkerName, options); - return poller.pollUntilDone(); - } - /** * list source configurations for a linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be @@ -512,177 +45,10 @@ export class LinkerImpl implements Linker { listConfigurationsOperationSpec ); } - - /** - * ListNext - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceUri: string, - nextLink: string, - options?: LinkerListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, nextLink, options }, - listNextOperationSpec - ); - } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const listOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LinkerList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LinkerResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.linkerName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.LinkerResource - }, - 201: { - bodyMapper: Mappers.LinkerResource - }, - 202: { - bodyMapper: Mappers.LinkerResource - }, - 204: { - bodyMapper: Mappers.LinkerResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.linkerName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.linkerName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.LinkerResource - }, - 201: { - bodyMapper: Mappers.LinkerResource - }, - 202: { - bodyMapper: Mappers.LinkerResource - }, - 204: { - bodyMapper: Mappers.LinkerResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.linkerName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const validateOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/validateLinker", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ValidateOperationResult - }, - 201: { - bodyMapper: Mappers.ValidateOperationResult - }, - 202: { - bodyMapper: Mappers.ValidateOperationResult - }, - 204: { - bodyMapper: Mappers.ValidateOperationResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.linkerName - ], - headerParameters: [Parameters.accept], - serializer -}; const listConfigurationsOperationSpec: coreClient.OperationSpec = { path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/listConfigurations", @@ -704,22 +70,3 @@ const listConfigurationsOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LinkerList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linker.ts b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linker.ts index 2cb2e83ee1aa..82109c05b68b 100644 --- a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linker.ts +++ b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linker.ts @@ -6,166 +6,13 @@ * 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 { - LinkerResource, - LinkerListOptionalParams, - LinkerGetOptionalParams, - LinkerGetResponse, - LinkerCreateOrUpdateOptionalParams, - LinkerCreateOrUpdateResponse, - LinkerDeleteOptionalParams, - LinkerPatch, - LinkerUpdateOptionalParams, - LinkerUpdateResponse, - LinkerValidateOptionalParams, - LinkerValidateResponse, LinkerListConfigurationsOptionalParams, LinkerListConfigurationsResponse } from "../models"; -/// /** Interface representing a Linker. */ export interface Linker { - /** - * Returns list of Linkers which connects to the resource. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param options The options parameters. - */ - list( - resourceUri: string, - options?: LinkerListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Returns Linker resource for a given name. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - get( - resourceUri: string, - linkerName: string, - options?: LinkerGetOptionalParams - ): Promise; - /** - * Create or update linker resource. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceUri: string, - linkerName: string, - parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - LinkerCreateOrUpdateResponse - > - >; - /** - * Create or update linker resource. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceUri: string, - linkerName: string, - parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams - ): Promise; - /** - * Delete a link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - beginDelete( - resourceUri: string, - linkerName: string, - options?: LinkerDeleteOptionalParams - ): Promise, void>>; - /** - * Delete a link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceUri: string, - linkerName: string, - options?: LinkerDeleteOptionalParams - ): Promise; - /** - * Operation to update an existing link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - beginUpdate( - resourceUri: string, - linkerName: string, - parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams - ): Promise< - PollerLike, LinkerUpdateResponse> - >; - /** - * Operation to update an existing link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceUri: string, - linkerName: string, - parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams - ): Promise; - /** - * Validate a link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - beginValidate( - resourceUri: string, - linkerName: string, - options?: LinkerValidateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - LinkerValidateResponse - > - >; - /** - * Validate a link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - beginValidateAndWait( - resourceUri: string, - linkerName: string, - options?: LinkerValidateOptionalParams - ): Promise; /** * list source configurations for a linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be diff --git a/sdk/servicelinker/arm-servicelinker/src/serviceLinkerManagementClient.ts b/sdk/servicelinker/arm-servicelinker/src/serviceLinkerManagementClient.ts index abd984510750..259901ba1da4 100644 --- a/sdk/servicelinker/arm-servicelinker/src/serviceLinkerManagementClient.ts +++ b/sdk/servicelinker/arm-servicelinker/src/serviceLinkerManagementClient.ts @@ -44,7 +44,7 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-servicelinker/2.1.1`; + const packageDetails = `azsdk-js-arm-servicelinker/3.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/servicelinker/arm-servicelinker/tsconfig.json b/sdk/servicelinker/arm-servicelinker/tsconfig.json index 5c861ab691f6..3e6ae96443f3 100644 --- a/sdk/servicelinker/arm-servicelinker/tsconfig.json +++ b/sdk/servicelinker/arm-servicelinker/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-servicelinker": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"