@azure/arm-servicelinker
Advanced tools
Comparing version 2.1.1-alpha.20230320.1 to 2.1.1-alpha.20230418.1
@@ -22,3 +22,3 @@ /* | ||
function linkList() { | ||
var e_1, _a; | ||
var _a, e_1, _b, _c; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -30,5 +30,12 @@ const resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app"; | ||
try { | ||
for (var _b = __asyncValues(client.linker.list(resourceUri)), _c; _c = yield _b.next(), !_c.done;) { | ||
let item = _c.value; | ||
resArray.push(item); | ||
for (var _d = true, _e = __asyncValues(client.linker.list(resourceUri)), _f; _f = yield _e.next(), _a = _f.done, !_a;) { | ||
_c = _f.value; | ||
_d = false; | ||
try { | ||
let item = _c; | ||
resArray.push(item); | ||
} | ||
finally { | ||
_d = true; | ||
} | ||
} | ||
@@ -39,3 +46,3 @@ } | ||
try { | ||
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); | ||
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); | ||
} | ||
@@ -42,0 +49,0 @@ finally { if (e_1) throw e_1.error; } |
@@ -22,3 +22,3 @@ /* | ||
function getConfiguration() { | ||
var e_1, _a; | ||
var _a, e_1, _b, _c; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -29,5 +29,12 @@ const credential = new DefaultAzureCredential(); | ||
try { | ||
for (var _b = __asyncValues(client.operations.list()), _c; _c = yield _b.next(), !_c.done;) { | ||
let item = _c.value; | ||
resArray.push(item); | ||
for (var _d = true, _e = __asyncValues(client.operations.list()), _f; _f = yield _e.next(), _a = _f.done, !_a;) { | ||
_c = _f.value; | ||
_d = false; | ||
try { | ||
let item = _c; | ||
resArray.push(item); | ||
} | ||
finally { | ||
_d = true; | ||
} | ||
} | ||
@@ -38,3 +45,3 @@ } | ||
try { | ||
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); | ||
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); | ||
} | ||
@@ -41,0 +48,0 @@ finally { if (e_1) throw e_1.error; } |
import * as coreClient from "@azure/core-client"; | ||
export declare type TargetServiceBaseUnion = TargetServiceBase | AzureResource | ConfluentBootstrapServer | ConfluentSchemaRegistry; | ||
export declare type AuthInfoBaseUnion = AuthInfoBase | SecretAuthInfo | UserAssignedIdentityAuthInfo | SystemAssignedIdentityAuthInfo | ServicePrincipalSecretAuthInfo | ServicePrincipalCertificateAuthInfo; | ||
export declare type AzureResourcePropertiesBaseUnion = AzureResourcePropertiesBase | AzureKeyVaultProperties; | ||
export declare type SecretInfoBaseUnion = SecretInfoBase | ValueSecretInfo | KeyVaultSecretReferenceSecretInfo | KeyVaultSecretUriSecretInfo; | ||
export type TargetServiceBaseUnion = TargetServiceBase | AzureResource | ConfluentBootstrapServer | ConfluentSchemaRegistry; | ||
export type AuthInfoBaseUnion = AuthInfoBase | SecretAuthInfo | UserAssignedIdentityAuthInfo | SystemAssignedIdentityAuthInfo | ServicePrincipalSecretAuthInfo | ServicePrincipalCertificateAuthInfo; | ||
export type AzureResourcePropertiesBaseUnion = AzureResourcePropertiesBase | AzureKeyVaultProperties; | ||
export type SecretInfoBaseUnion = SecretInfoBase | ValueSecretInfo | KeyVaultSecretReferenceSecretInfo | KeyVaultSecretUriSecretInfo; | ||
/** The list of Linker. */ | ||
@@ -395,3 +395,3 @@ export interface LinkerList { | ||
*/ | ||
export declare type TargetServiceType = string; | ||
export type TargetServiceType = string; | ||
/** Known values of {@link AuthType} that the service accepts. */ | ||
@@ -421,3 +421,3 @@ export declare enum KnownAuthType { | ||
*/ | ||
export declare type AuthType = string; | ||
export type AuthType = string; | ||
/** Known values of {@link ClientType} that the service accepts. */ | ||
@@ -462,3 +462,3 @@ export declare enum KnownClientType { | ||
*/ | ||
export declare type ClientType = string; | ||
export type ClientType = string; | ||
/** Known values of {@link VNetSolutionType} that the service accepts. */ | ||
@@ -479,3 +479,3 @@ export declare enum KnownVNetSolutionType { | ||
*/ | ||
export declare type VNetSolutionType = string; | ||
export type VNetSolutionType = string; | ||
/** Known values of {@link CreatedByType} that the service accepts. */ | ||
@@ -502,3 +502,3 @@ export declare enum KnownCreatedByType { | ||
*/ | ||
export declare type CreatedByType = string; | ||
export type CreatedByType = string; | ||
/** Known values of {@link ValidationResultStatus} that the service accepts. */ | ||
@@ -522,3 +522,3 @@ export declare enum KnownValidationResultStatus { | ||
*/ | ||
export declare type ValidationResultStatus = string; | ||
export type ValidationResultStatus = string; | ||
/** Known values of {@link Origin} that the service accepts. */ | ||
@@ -542,3 +542,3 @@ export declare enum KnownOrigin { | ||
*/ | ||
export declare type Origin = string; | ||
export type Origin = string; | ||
/** Known values of {@link ActionType} that the service accepts. */ | ||
@@ -556,3 +556,3 @@ export declare enum KnownActionType { | ||
*/ | ||
export declare type ActionType = string; | ||
export type ActionType = string; | ||
/** Known values of {@link AzureResourceType} that the service accepts. */ | ||
@@ -570,3 +570,3 @@ export declare enum KnownAzureResourceType { | ||
*/ | ||
export declare type AzureResourceType = string; | ||
export type AzureResourceType = string; | ||
/** Known values of {@link SecretType} that the service accepts. */ | ||
@@ -590,3 +590,3 @@ export declare enum KnownSecretType { | ||
*/ | ||
export declare type SecretType = string; | ||
export type SecretType = string; | ||
/** Optional parameters. */ | ||
@@ -596,3 +596,3 @@ export interface LinkerListOptionalParams extends coreClient.OperationOptions { | ||
/** Contains response data for the list operation. */ | ||
export declare type LinkerListResponse = LinkerList; | ||
export type LinkerListResponse = LinkerList; | ||
/** Optional parameters. */ | ||
@@ -602,3 +602,3 @@ export interface LinkerGetOptionalParams extends coreClient.OperationOptions { | ||
/** Contains response data for the get operation. */ | ||
export declare type LinkerGetResponse = LinkerResource; | ||
export type LinkerGetResponse = LinkerResource; | ||
/** Optional parameters. */ | ||
@@ -612,3 +612,3 @@ export interface LinkerCreateOrUpdateOptionalParams extends coreClient.OperationOptions { | ||
/** Contains response data for the createOrUpdate operation. */ | ||
export declare type LinkerCreateOrUpdateResponse = LinkerResource; | ||
export type LinkerCreateOrUpdateResponse = LinkerResource; | ||
/** Optional parameters. */ | ||
@@ -629,3 +629,3 @@ export interface LinkerDeleteOptionalParams extends coreClient.OperationOptions { | ||
/** Contains response data for the update operation. */ | ||
export declare type LinkerUpdateResponse = LinkerResource; | ||
export type LinkerUpdateResponse = LinkerResource; | ||
/** Optional parameters. */ | ||
@@ -639,3 +639,3 @@ export interface LinkerValidateOptionalParams extends coreClient.OperationOptions { | ||
/** Contains response data for the validate operation. */ | ||
export declare type LinkerValidateResponse = ValidateOperationResult; | ||
export type LinkerValidateResponse = ValidateOperationResult; | ||
/** Optional parameters. */ | ||
@@ -645,3 +645,3 @@ export interface LinkerListConfigurationsOptionalParams extends coreClient.OperationOptions { | ||
/** Contains response data for the listConfigurations operation. */ | ||
export declare type LinkerListConfigurationsResponse = SourceConfigurationResult; | ||
export type LinkerListConfigurationsResponse = SourceConfigurationResult; | ||
/** Optional parameters. */ | ||
@@ -651,3 +651,3 @@ export interface LinkerListNextOptionalParams extends coreClient.OperationOptions { | ||
/** Contains response data for the listNext operation. */ | ||
export declare type LinkerListNextResponse = LinkerList; | ||
export type LinkerListNextResponse = LinkerList; | ||
/** Optional parameters. */ | ||
@@ -657,3 +657,3 @@ export interface OperationsListOptionalParams extends coreClient.OperationOptions { | ||
/** Contains response data for the list operation. */ | ||
export declare type OperationsListResponse = OperationListResult; | ||
export type OperationsListResponse = OperationListResult; | ||
/** Optional parameters. */ | ||
@@ -663,3 +663,3 @@ export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { | ||
/** Contains response data for the listNext operation. */ | ||
export declare type OperationsListNextResponse = OperationListResult; | ||
export type OperationsListNextResponse = OperationListResult; | ||
/** Optional parameters. */ | ||
@@ -666,0 +666,0 @@ export interface ServiceLinkerManagementClientOptionalParams extends coreClient.ServiceClientOptions { |
@@ -70,7 +70,14 @@ /* | ||
return __asyncGenerator(this, arguments, function* listPagingAll_1() { | ||
var e_1, _a; | ||
var _a, e_1, _b, _c; | ||
try { | ||
for (var _b = __asyncValues(this.listPagingPage(resourceUri, options)), _c; _c = yield __await(_b.next()), !_c.done;) { | ||
const page = _c.value; | ||
yield __await(yield* __asyncDelegator(__asyncValues(page))); | ||
for (var _d = true, _e = __asyncValues(this.listPagingPage(resourceUri, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) { | ||
_c = _f.value; | ||
_d = false; | ||
try { | ||
const page = _c; | ||
yield __await(yield* __asyncDelegator(__asyncValues(page))); | ||
} | ||
finally { | ||
_d = true; | ||
} | ||
} | ||
@@ -81,3 +88,3 @@ } | ||
try { | ||
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b)); | ||
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e)); | ||
} | ||
@@ -84,0 +91,0 @@ finally { if (e_1) throw e_1.error; } |
@@ -66,7 +66,14 @@ /* | ||
return __asyncGenerator(this, arguments, function* listPagingAll_1() { | ||
var e_1, _a; | ||
var _a, e_1, _b, _c; | ||
try { | ||
for (var _b = __asyncValues(this.listPagingPage(options)), _c; _c = yield __await(_b.next()), !_c.done;) { | ||
const page = _c.value; | ||
yield __await(yield* __asyncDelegator(__asyncValues(page))); | ||
for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) { | ||
_c = _f.value; | ||
_d = false; | ||
try { | ||
const page = _c; | ||
yield __await(yield* __asyncDelegator(__asyncValues(page))); | ||
} | ||
finally { | ||
_d = true; | ||
} | ||
} | ||
@@ -77,3 +84,3 @@ } | ||
try { | ||
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b)); | ||
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e)); | ||
} | ||
@@ -80,0 +87,0 @@ finally { if (e_1) throw e_1.error; } |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var tslib=require("tslib"),coreClient=require("@azure/core-client"),coreRestPipeline=require("@azure/core-rest-pipeline"),coreLro=require("@azure/core-lro");function _interopNamespace(r){var i;return r&&r.__esModule?r:(i=Object.create(null),r&&Object.keys(r).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(r,e),Object.defineProperty(i,e,t.get?t:{enumerable:!0,get:function(){return r[e]}}))}),i.default=r,Object.freeze(i))}var coreClient__namespace=_interopNamespace(coreClient),coreRestPipeline__namespace=_interopNamespace(coreRestPipeline);const pageMap=new WeakMap;function getContinuationToken(e){return"object"!=typeof e||null===e||null==(e=pageMap.get(e))?void 0:e.continuationToken}function setContinuationToken(e,t){var r;"object"==typeof e&&null!==e&&t&&((r=null!=(r=pageMap.get(e))?r:{}).continuationToken=t,pageMap.set(e,r))}exports.KnownTargetServiceType=void 0,function(e){e.AzureResource="AzureResource",e.ConfluentBootstrapServer="ConfluentBootstrapServer",e.ConfluentSchemaRegistry="ConfluentSchemaRegistry"}(exports.KnownTargetServiceType||(exports.KnownTargetServiceType={})),exports.KnownAuthType=void 0,function(e){e.SystemAssignedIdentity="systemAssignedIdentity",e.UserAssignedIdentity="userAssignedIdentity",e.ServicePrincipalSecret="servicePrincipalSecret",e.ServicePrincipalCertificate="servicePrincipalCertificate",e.Secret="secret"}(exports.KnownAuthType||(exports.KnownAuthType={})),exports.KnownClientType=void 0,function(e){e.None="none",e.Dotnet="dotnet",e.Java="java",e.Python="python",e.Go="go",e.Php="php",e.Ruby="ruby",e.Django="django",e.Nodejs="nodejs",e.SpringBoot="springBoot"}(exports.KnownClientType||(exports.KnownClientType={})),exports.KnownVNetSolutionType=void 0,function(e){e.ServiceEndpoint="serviceEndpoint",e.PrivateLink="privateLink"}(exports.KnownVNetSolutionType||(exports.KnownVNetSolutionType={})),exports.KnownCreatedByType=void 0,function(e){e.User="User",e.Application="Application",e.ManagedIdentity="ManagedIdentity",e.Key="Key"}(exports.KnownCreatedByType||(exports.KnownCreatedByType={})),exports.KnownValidationResultStatus=void 0,function(e){e.Success="success",e.Failure="failure",e.Warning="warning"}(exports.KnownValidationResultStatus||(exports.KnownValidationResultStatus={})),exports.KnownOrigin=void 0,function(e){e.User="user",e.System="system",e.UserSystem="user,system"}(exports.KnownOrigin||(exports.KnownOrigin={})),exports.KnownActionType=void 0,(exports.KnownActionType||(exports.KnownActionType={})).Internal="Internal",exports.KnownAzureResourceType=void 0,(exports.KnownAzureResourceType||(exports.KnownAzureResourceType={})).KeyVault="KeyVault",exports.KnownSecretType=void 0,function(e){e.RawValue="rawValue",e.KeyVaultSecretUri="keyVaultSecretUri",e.KeyVaultSecretReference="keyVaultSecretReference"}(exports.KnownSecretType||(exports.KnownSecretType={}));const LinkerList={type:{name:"Composite",className:"LinkerList",modelProperties:{nextLink:{serializedName:"nextLink",nullable:!0,type:{name:"String"}},value:{serializedName:"value",type:{name:"Sequence",element:{type:{name:"Composite",className:"LinkerResource"}}}}}}},TargetServiceBase={type:{name:"Composite",className:"TargetServiceBase",uberParent:"TargetServiceBase",polymorphicDiscriminator:{serializedName:"type",clientName:"type"},modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}}}}},AuthInfoBase={type:{name:"Composite",className:"AuthInfoBase",uberParent:"AuthInfoBase",polymorphicDiscriminator:{serializedName:"authType",clientName:"authType"},modelProperties:{authType:{serializedName:"authType",required:!0,type:{name:"String"}}}}},VNetSolution={type:{name:"Composite",className:"VNetSolution",modelProperties:{type:{serializedName:"type",nullable:!0,type:{name:"String"}}}}},SecretStore={type:{name:"Composite",className:"SecretStore",modelProperties:{keyVaultId:{serializedName:"keyVaultId",nullable:!0,type:{name:"String"}}}}},SystemData={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"}}}}},Resource={type:{name:"Composite",className:"Resource",modelProperties:{id:{serializedName:"id",readOnly:!0,type:{name:"String"}},name:{serializedName:"name",readOnly:!0,type:{name:"String"}},type:{serializedName:"type",readOnly:!0,type:{name:"String"}}}}},ErrorResponse={type:{name:"Composite",className:"ErrorResponse",modelProperties:{error:{serializedName:"error",type:{name:"Composite",className:"ErrorDetail"}}}}},ErrorDetail={type:{name:"Composite",className:"ErrorDetail",modelProperties:{code:{serializedName:"code",readOnly:!0,type:{name:"String"}},message:{serializedName:"message",readOnly:!0,type:{name:"String"}},target:{serializedName:"target",readOnly:!0,type:{name:"String"}},details:{serializedName:"details",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ErrorDetail"}}}},additionalInfo:{serializedName:"additionalInfo",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ErrorAdditionalInfo"}}}}}}},ErrorAdditionalInfo={type:{name:"Composite",className:"ErrorAdditionalInfo",modelProperties:{type:{serializedName:"type",readOnly:!0,type:{name:"String"}},info:{serializedName:"info",readOnly:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},LinkerPatch={type:{name:"Composite",className:"LinkerPatch",modelProperties:{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"}},provisioningState:{serializedName:"properties.provisioningState",readOnly:!0,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:!0,type:{name:"String"}}}}},ValidateOperationResult={type:{name:"Composite",className:"ValidateOperationResult",modelProperties:{resourceId:{serializedName:"resourceId",nullable:!0,type:{name:"String"}},status:{serializedName:"status",nullable:!0,type:{name:"String"}},linkerName:{serializedName:"properties.linkerName",nullable:!0,type:{name:"String"}},isConnectionAvailable:{serializedName:"properties.isConnectionAvailable",nullable:!0,type:{name:"Boolean"}},reportStartTimeUtc:{serializedName:"properties.reportStartTimeUtc",nullable:!0,type:{name:"DateTime"}},reportEndTimeUtc:{serializedName:"properties.reportEndTimeUtc",nullable:!0,type:{name:"DateTime"}},sourceId:{serializedName:"properties.sourceId",nullable:!0,type:{name:"String"}},targetId:{serializedName:"properties.targetId",nullable:!0,type:{name:"String"}},authType:{serializedName:"properties.authType",nullable:!0,type:{name:"String"}},validationDetail:{serializedName:"properties.validationDetail",nullable:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ValidationResultItem"}}}}}}},ValidationResultItem={type:{name:"Composite",className:"ValidationResultItem",modelProperties:{name:{serializedName:"name",type:{name:"String"}},description:{serializedName:"description",nullable:!0,type:{name:"String"}},result:{serializedName:"result",nullable:!0,type:{name:"String"}},errorMessage:{serializedName:"errorMessage",nullable:!0,type:{name:"String"}},errorCode:{serializedName:"errorCode",nullable:!0,type:{name:"String"}}}}},SourceConfigurationResult={type:{name:"Composite",className:"SourceConfigurationResult",modelProperties:{configurations:{serializedName:"configurations",type:{name:"Sequence",element:{type:{name:"Composite",className:"SourceConfiguration"}}}}}}},SourceConfiguration={type:{name:"Composite",className:"SourceConfiguration",modelProperties:{name:{serializedName:"name",type:{name:"String"}},value:{serializedName:"value",nullable:!0,type:{name:"String"}}}}},OperationListResult={type:{name:"Composite",className:"OperationListResult",modelProperties:{value:{serializedName:"value",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Operation"}}}},nextLink:{serializedName:"nextLink",readOnly:!0,type:{name:"String"}}}}},Operation={type:{name:"Composite",className:"Operation",modelProperties:{name:{serializedName:"name",readOnly:!0,type:{name:"String"}},isDataAction:{serializedName:"isDataAction",readOnly:!0,type:{name:"Boolean"}},display:{serializedName:"display",type:{name:"Composite",className:"OperationDisplay"}},origin:{serializedName:"origin",readOnly:!0,type:{name:"String"}},actionType:{serializedName:"actionType",readOnly:!0,type:{name:"String"}}}}},OperationDisplay={type:{name:"Composite",className:"OperationDisplay",modelProperties:{provider:{serializedName:"provider",readOnly:!0,type:{name:"String"}},resource:{serializedName:"resource",readOnly:!0,type:{name:"String"}},operation:{serializedName:"operation",readOnly:!0,type:{name:"String"}},description:{serializedName:"description",readOnly:!0,type:{name:"String"}}}}},AzureResourcePropertiesBase={type:{name:"Composite",className:"AzureResourcePropertiesBase",uberParent:"AzureResourcePropertiesBase",polymorphicDiscriminator:{serializedName:"type",clientName:"type"},modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}}}}},SecretInfoBase={type:{name:"Composite",className:"SecretInfoBase",uberParent:"SecretInfoBase",polymorphicDiscriminator:{serializedName:"secretType",clientName:"secretType"},modelProperties:{secretType:{serializedName:"secretType",required:!0,type:{name:"String"}}}}},AzureResource={serializedName:"AzureResource",type:{name:"Composite",className:"AzureResource",uberParent:"TargetServiceBase",polymorphicDiscriminator:TargetServiceBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},TargetServiceBase.type.modelProperties),{id:{serializedName:"id",type:{name:"String"}},resourceProperties:{serializedName:"resourceProperties",type:{name:"Composite",className:"AzureResourcePropertiesBase"}}})}},ConfluentBootstrapServer={serializedName:"ConfluentBootstrapServer",type:{name:"Composite",className:"ConfluentBootstrapServer",uberParent:"TargetServiceBase",polymorphicDiscriminator:TargetServiceBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},TargetServiceBase.type.modelProperties),{endpoint:{serializedName:"endpoint",type:{name:"String"}}})}},ConfluentSchemaRegistry={serializedName:"ConfluentSchemaRegistry",type:{name:"Composite",className:"ConfluentSchemaRegistry",uberParent:"TargetServiceBase",polymorphicDiscriminator:TargetServiceBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},TargetServiceBase.type.modelProperties),{endpoint:{serializedName:"endpoint",type:{name:"String"}}})}},SecretAuthInfo={serializedName:"secret",type:{name:"Composite",className:"SecretAuthInfo",uberParent:"AuthInfoBase",polymorphicDiscriminator:AuthInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},AuthInfoBase.type.modelProperties),{name:{serializedName:"name",nullable:!0,type:{name:"String"}},secretInfo:{serializedName:"secretInfo",type:{name:"Composite",className:"SecretInfoBase"}}})}},UserAssignedIdentityAuthInfo={serializedName:"userAssignedIdentity",type:{name:"Composite",className:"UserAssignedIdentityAuthInfo",uberParent:"AuthInfoBase",polymorphicDiscriminator:AuthInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},AuthInfoBase.type.modelProperties),{clientId:{serializedName:"clientId",type:{name:"String"}},subscriptionId:{serializedName:"subscriptionId",type:{name:"String"}}})}},SystemAssignedIdentityAuthInfo={serializedName:"systemAssignedIdentity",type:{name:"Composite",className:"SystemAssignedIdentityAuthInfo",uberParent:"AuthInfoBase",polymorphicDiscriminator:AuthInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign({},AuthInfoBase.type.modelProperties)}},ServicePrincipalSecretAuthInfo={serializedName:"servicePrincipalSecret",type:{name:"Composite",className:"ServicePrincipalSecretAuthInfo",uberParent:"AuthInfoBase",polymorphicDiscriminator:AuthInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},AuthInfoBase.type.modelProperties),{clientId:{serializedName:"clientId",required:!0,type:{name:"String"}},principalId:{serializedName:"principalId",required:!0,type:{name:"String"}},secret:{serializedName:"secret",required:!0,type:{name:"String"}}})}},ServicePrincipalCertificateAuthInfo={serializedName:"servicePrincipalCertificate",type:{name:"Composite",className:"ServicePrincipalCertificateAuthInfo",uberParent:"AuthInfoBase",polymorphicDiscriminator:AuthInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},AuthInfoBase.type.modelProperties),{clientId:{serializedName:"clientId",required:!0,type:{name:"String"}},principalId:{serializedName:"principalId",required:!0,type:{name:"String"}},certificate:{serializedName:"certificate",required:!0,type:{name:"String"}}})}},ProxyResource={type:{name:"Composite",className:"ProxyResource",modelProperties:Object.assign({},Resource.type.modelProperties)}},AzureKeyVaultProperties={serializedName:"KeyVault",type:{name:"Composite",className:"AzureKeyVaultProperties",uberParent:"AzureResourcePropertiesBase",polymorphicDiscriminator:AzureResourcePropertiesBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},AzureResourcePropertiesBase.type.modelProperties),{connectAsKubernetesCsiDriver:{serializedName:"connectAsKubernetesCsiDriver",nullable:!0,type:{name:"Boolean"}}})}},ValueSecretInfo={serializedName:"rawValue",type:{name:"Composite",className:"ValueSecretInfo",uberParent:"SecretInfoBase",polymorphicDiscriminator:SecretInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},SecretInfoBase.type.modelProperties),{value:{serializedName:"value",nullable:!0,type:{name:"String"}}})}},KeyVaultSecretReferenceSecretInfo={serializedName:"keyVaultSecretReference",type:{name:"Composite",className:"KeyVaultSecretReferenceSecretInfo",uberParent:"SecretInfoBase",polymorphicDiscriminator:SecretInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},SecretInfoBase.type.modelProperties),{name:{serializedName:"name",type:{name:"String"}},version:{serializedName:"version",nullable:!0,type:{name:"String"}}})}},KeyVaultSecretUriSecretInfo={serializedName:"keyVaultSecretUri",type:{name:"Composite",className:"KeyVaultSecretUriSecretInfo",uberParent:"SecretInfoBase",polymorphicDiscriminator:SecretInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},SecretInfoBase.type.modelProperties),{value:{serializedName:"value",type:{name:"String"}}})}},LinkerResource={type:{name:"Composite",className:"LinkerResource",modelProperties:Object.assign(Object.assign({},ProxyResource.type.modelProperties),{systemData:{serializedName:"systemData",type:{name:"Composite",className:"SystemData"}},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"}},provisioningState:{serializedName:"properties.provisioningState",readOnly:!0,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:!0,type:{name:"String"}}})}};let discriminators={TargetServiceBase:TargetServiceBase,AuthInfoBase:AuthInfoBase,AzureResourcePropertiesBase:AzureResourcePropertiesBase,SecretInfoBase:SecretInfoBase,"TargetServiceBase.AzureResource":AzureResource,"TargetServiceBase.ConfluentBootstrapServer":ConfluentBootstrapServer,"TargetServiceBase.ConfluentSchemaRegistry":ConfluentSchemaRegistry,"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};var Mappers=Object.freeze({__proto__:null,LinkerList:LinkerList,TargetServiceBase:TargetServiceBase,AuthInfoBase:AuthInfoBase,VNetSolution:VNetSolution,SecretStore:SecretStore,SystemData:SystemData,Resource:Resource,ErrorResponse:ErrorResponse,ErrorDetail:ErrorDetail,ErrorAdditionalInfo:ErrorAdditionalInfo,LinkerPatch:LinkerPatch,ValidateOperationResult:ValidateOperationResult,ValidationResultItem:ValidationResultItem,SourceConfigurationResult:SourceConfigurationResult,SourceConfiguration:SourceConfiguration,OperationListResult:OperationListResult,Operation:Operation,OperationDisplay:OperationDisplay,AzureResourcePropertiesBase:AzureResourcePropertiesBase,SecretInfoBase:SecretInfoBase,AzureResource:AzureResource,ConfluentBootstrapServer:ConfluentBootstrapServer,ConfluentSchemaRegistry:ConfluentSchemaRegistry,SecretAuthInfo:SecretAuthInfo,UserAssignedIdentityAuthInfo:UserAssignedIdentityAuthInfo,SystemAssignedIdentityAuthInfo:SystemAssignedIdentityAuthInfo,ServicePrincipalSecretAuthInfo:ServicePrincipalSecretAuthInfo,ServicePrincipalCertificateAuthInfo:ServicePrincipalCertificateAuthInfo,ProxyResource:ProxyResource,AzureKeyVaultProperties:AzureKeyVaultProperties,ValueSecretInfo:ValueSecretInfo,KeyVaultSecretReferenceSecretInfo:KeyVaultSecretReferenceSecretInfo,KeyVaultSecretUriSecretInfo:KeyVaultSecretUriSecretInfo,LinkerResource:LinkerResource,discriminators:discriminators});const accept={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},$host={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},resourceUri={parameterPath:"resourceUri",mapper:{serializedName:"resourceUri",required:!0,type:{name:"String"}},skipEncoding:!0},apiVersion={parameterPath:"apiVersion",mapper:{defaultValue:"2022-05-01",isConstant:!0,serializedName:"api-version",type:{name:"String"}}},linkerName={parameterPath:"linkerName",mapper:{serializedName:"linkerName",required:!0,type:{name:"String"}}},contentType={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},parameters={parameterPath:"parameters",mapper:LinkerResource},parameters1={parameterPath:"parameters",mapper:LinkerPatch},nextLink={parameterPath:"nextLink",mapper:{serializedName:"nextLink",required:!0,type:{name:"String"}},skipEncoding:!0};class LroImpl{constructor(e,t,r,i=r.path,a=r.httpMethod){this.sendOperationFn=e,this.args=t,this.spec=r,this.requestPath=i,this.requestMethod=a}sendInitialRequest(){return tslib.__awaiter(this,void 0,void 0,function*(){return this.sendOperationFn(this.args,this.spec)})}sendPollRequest(t){return tslib.__awaiter(this,void 0,void 0,function*(){var e=this.spec,e=tslib.__rest(e,["requestBody"]);return this.sendOperationFn(this.args,Object.assign(Object.assign({},e),{path:t,httpMethod:"GET"}))})}}class LinkerImpl{constructor(e){this.client=e}list(t,r){const e=this.listPagingAll(t,r);return{next(){return e.next()},[Symbol.asyncIterator](){return this},byPage:e=>{if(null!=e&&e.maxPageSize)throw new Error("maxPageSize is not supported by this operation.");return this.listPagingPage(t,r,e)}}}listPagingPage(a,n,s){return tslib.__asyncGenerator(this,arguments,function*(){let e,t=null==s?void 0:s.continuationToken;var r;for(t||(setContinuationToken(r=(e=yield tslib.__await(this._list(a,n))).value||[],t=e.nextLink),yield yield tslib.__await(r));t;){e=yield tslib.__await(this._listNext(a,t,n)),t=e.nextLink;var i=e.value||[];setContinuationToken(i,t),yield yield tslib.__await(i)}})}listPagingAll(n,s){return tslib.__asyncGenerator(this,arguments,function*(){var t,e;try{for(var r,i=tslib.__asyncValues(this.listPagingPage(n,s));!(r=yield tslib.__await(i.next())).done;){var a=r.value;yield tslib.__await(yield*tslib.__asyncDelegator(tslib.__asyncValues(a)))}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&(yield tslib.__await(e.call(i)))}finally{if(t)throw t.error}}})}_list(e,t){return this.client.sendOperationRequest({resourceUri:e,options:t},listOperationSpec$1)}get(e,t,r){return this.client.sendOperationRequest({resourceUri:e,linkerName:t,options:r},getOperationSpec)}beginCreateOrUpdate(t,r,i,a){return tslib.__awaiter(this,void 0,void 0,function*(){const n=(e,t)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,t)});var e=new LroImpl((t,a)=>tslib.__awaiter(this,void 0,void 0,function*(){let r=void 0;const i=null==(e=t.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},t),{options:Object.assign(Object.assign({},t.options),{onResponse:(e,t)=>{r=e,null!==i&&void 0!==i&&i(e,t)}})});return{flatResponse:yield n(e,a),rawResponse:{statusCode:r.status,body:r.parsedBody,headers:r.headers.toJSON()}}}),{resourceUri:t,linkerName:r,parameters:i,options:a},createOrUpdateOperationSpec),e=new coreLro.LroEngine(e,{resumeFrom:null==a?void 0:a.resumeFrom,intervalInMs:null==a?void 0:a.updateIntervalInMs,lroResourceLocationConfig:"azure-async-operation"});return yield e.poll(),e})}beginCreateOrUpdateAndWait(e,t,r,i){return tslib.__awaiter(this,void 0,void 0,function*(){return(yield this.beginCreateOrUpdate(e,t,r,i)).pollUntilDone()})}beginDelete(t,r,i){return tslib.__awaiter(this,void 0,void 0,function*(){const n=(e,t)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,t)});var e=new LroImpl((t,a)=>tslib.__awaiter(this,void 0,void 0,function*(){let r=void 0;const i=null==(e=t.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},t),{options:Object.assign(Object.assign({},t.options),{onResponse:(e,t)=>{r=e,null!==i&&void 0!==i&&i(e,t)}})});return{flatResponse:yield n(e,a),rawResponse:{statusCode:r.status,body:r.parsedBody,headers:r.headers.toJSON()}}}),{resourceUri:t,linkerName:r,options:i},deleteOperationSpec),e=new coreLro.LroEngine(e,{resumeFrom:null==i?void 0:i.resumeFrom,intervalInMs:null==i?void 0:i.updateIntervalInMs,lroResourceLocationConfig:"azure-async-operation"});return yield e.poll(),e})}beginDeleteAndWait(e,t,r){return tslib.__awaiter(this,void 0,void 0,function*(){return(yield this.beginDelete(e,t,r)).pollUntilDone()})}beginUpdate(t,r,i,a){return tslib.__awaiter(this,void 0,void 0,function*(){const n=(e,t)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,t)});var e=new LroImpl((t,a)=>tslib.__awaiter(this,void 0,void 0,function*(){let r=void 0;const i=null==(e=t.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},t),{options:Object.assign(Object.assign({},t.options),{onResponse:(e,t)=>{r=e,null!==i&&void 0!==i&&i(e,t)}})});return{flatResponse:yield n(e,a),rawResponse:{statusCode:r.status,body:r.parsedBody,headers:r.headers.toJSON()}}}),{resourceUri:t,linkerName:r,parameters:i,options:a},updateOperationSpec),e=new coreLro.LroEngine(e,{resumeFrom:null==a?void 0:a.resumeFrom,intervalInMs:null==a?void 0:a.updateIntervalInMs,lroResourceLocationConfig:"azure-async-operation"});return yield e.poll(),e})}beginUpdateAndWait(e,t,r,i){return tslib.__awaiter(this,void 0,void 0,function*(){return(yield this.beginUpdate(e,t,r,i)).pollUntilDone()})}beginValidate(t,r,i){return tslib.__awaiter(this,void 0,void 0,function*(){const n=(e,t)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,t)});var e=new LroImpl((t,a)=>tslib.__awaiter(this,void 0,void 0,function*(){let r=void 0;const i=null==(e=t.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},t),{options:Object.assign(Object.assign({},t.options),{onResponse:(e,t)=>{r=e,null!==i&&void 0!==i&&i(e,t)}})});return{flatResponse:yield n(e,a),rawResponse:{statusCode:r.status,body:r.parsedBody,headers:r.headers.toJSON()}}}),{resourceUri:t,linkerName:r,options:i},validateOperationSpec),e=new coreLro.LroEngine(e,{resumeFrom:null==i?void 0:i.resumeFrom,intervalInMs:null==i?void 0:i.updateIntervalInMs,lroResourceLocationConfig:"azure-async-operation"});return yield e.poll(),e})}beginValidateAndWait(e,t,r){return tslib.__awaiter(this,void 0,void 0,function*(){return(yield this.beginValidate(e,t,r)).pollUntilDone()})}listConfigurations(e,t,r){return this.client.sendOperationRequest({resourceUri:e,linkerName:t,options:r},listConfigurationsOperationSpec)}_listNext(e,t,r){return this.client.sendOperationRequest({resourceUri:e,nextLink:t,options:r},listNextOperationSpec$1)}}const serializer$1=coreClient__namespace.createSerializer(Mappers,!1),listOperationSpec$1={path:"/{resourceUri}/providers/Microsoft.ServiceLinker/linkers",httpMethod:"GET",responses:{200:{bodyMapper:LinkerList},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceUri],headerParameters:[accept],serializer:serializer$1},getOperationSpec={path:"/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}",httpMethod:"GET",responses:{200:{bodyMapper:LinkerResource},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceUri,linkerName],headerParameters:[accept],serializer:serializer$1},createOrUpdateOperationSpec={path:"/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}",httpMethod:"PUT",responses:{200:{bodyMapper:LinkerResource},201:{bodyMapper:LinkerResource},202:{bodyMapper:LinkerResource},204:{bodyMapper:LinkerResource},default:{bodyMapper:ErrorResponse}},requestBody:parameters,queryParameters:[apiVersion],urlParameters:[$host,resourceUri,linkerName],headerParameters:[accept,contentType],mediaType:"json",serializer:serializer$1},deleteOperationSpec={path:"/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}",httpMethod:"DELETE",responses:{200:{},201:{},202:{},204:{},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceUri,linkerName],headerParameters:[accept],serializer:serializer$1},updateOperationSpec={path:"/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}",httpMethod:"PATCH",responses:{200:{bodyMapper:LinkerResource},201:{bodyMapper:LinkerResource},202:{bodyMapper:LinkerResource},204:{bodyMapper:LinkerResource},default:{bodyMapper:ErrorResponse}},requestBody:parameters1,queryParameters:[apiVersion],urlParameters:[$host,resourceUri,linkerName],headerParameters:[accept,contentType],mediaType:"json",serializer:serializer$1},validateOperationSpec={path:"/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/validateLinker",httpMethod:"POST",responses:{200:{bodyMapper:ValidateOperationResult},201:{bodyMapper:ValidateOperationResult},202:{bodyMapper:ValidateOperationResult},204:{bodyMapper:ValidateOperationResult},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceUri,linkerName],headerParameters:[accept],serializer:serializer$1},listConfigurationsOperationSpec={path:"/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/listConfigurations",httpMethod:"POST",responses:{200:{bodyMapper:SourceConfigurationResult},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceUri,linkerName],headerParameters:[accept],serializer:serializer$1},listNextOperationSpec$1={path:"{nextLink}",httpMethod:"GET",responses:{200:{bodyMapper:LinkerList},default:{bodyMapper:ErrorResponse}},urlParameters:[$host,resourceUri,nextLink],headerParameters:[accept],serializer:serializer$1};class OperationsImpl{constructor(e){this.client=e}list(t){const e=this.listPagingAll(t);return{next(){return e.next()},[Symbol.asyncIterator](){return this},byPage:e=>{if(null!=e&&e.maxPageSize)throw new Error("maxPageSize is not supported by this operation.");return this.listPagingPage(t,e)}}}listPagingPage(a,n){return tslib.__asyncGenerator(this,arguments,function*(){let e,t=null==n?void 0:n.continuationToken;var r;for(t||(setContinuationToken(r=(e=yield tslib.__await(this._list(a))).value||[],t=e.nextLink),yield yield tslib.__await(r));t;){e=yield tslib.__await(this._listNext(t,a)),t=e.nextLink;var i=e.value||[];setContinuationToken(i,t),yield yield tslib.__await(i)}})}listPagingAll(n){return tslib.__asyncGenerator(this,arguments,function*(){var t,e;try{for(var r,i=tslib.__asyncValues(this.listPagingPage(n));!(r=yield tslib.__await(i.next())).done;){var a=r.value;yield tslib.__await(yield*tslib.__asyncDelegator(tslib.__asyncValues(a)))}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&(yield tslib.__await(e.call(i)))}finally{if(t)throw t.error}}})}_list(e){return this.client.sendOperationRequest({options:e},listOperationSpec)}_listNext(e,t){return this.client.sendOperationRequest({nextLink:e,options:t},listNextOperationSpec)}}const serializer=coreClient__namespace.createSerializer(Mappers,!1),listOperationSpec={path:"/providers/Microsoft.ServiceLinker/operations",httpMethod:"GET",responses:{200:{bodyMapper:OperationListResult},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host],headerParameters:[accept],serializer:serializer},listNextOperationSpec={path:"{nextLink}",httpMethod:"GET",responses:{200:{bodyMapper:OperationListResult},default:{bodyMapper:ErrorResponse}},urlParameters:[$host,nextLink],headerParameters:[accept],serializer:serializer};class ServiceLinkerManagementClient extends coreClient__namespace.ServiceClient{constructor(e,t){if(void 0===e)throw new Error("'credentials' cannot be null");var r,i="azsdk-js-arm-servicelinker/2.1.1",i=(t=t||{}).userAgentOptions&&t.userAgentOptions.userAgentPrefix?t.userAgentOptions.userAgentPrefix+" "+i:i,i=Object.assign(Object.assign(Object.assign({},{requestContentType:"application/json; charset=utf-8",credential:e}),t),{userAgentOptions:{userAgentPrefix:i},endpoint:null!=(i=null!=(i=t.endpoint)?i:t.baseUri)?i:"https://management.azure.com"});super(i);let a=!1;null!=t&&t.pipeline&&0<t.pipeline.getOrderedPolicies().length&&(r=t.pipeline.getOrderedPolicies(),a=r.some(e=>e.name===coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName)),t&&t.pipeline&&0!=t.pipeline.getOrderedPolicies().length&&a||(this.pipeline.removePolicy({name:coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName}),this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({credential:e,scopes:null!=(r=i.credentialScopes)?r:i.endpoint+"/.default",challengeCallbacks:{authorizeRequestOnChallenge:coreClient__namespace.authorizeRequestOnClaimChallenge}}))),this.$host=t.$host||"https://management.azure.com",this.apiVersion=t.apiVersion||"2022-05-01",this.linker=new LinkerImpl(this),this.operations=new OperationsImpl(this),this.addCustomApiVersionPolicy(t.apiVersion)}addCustomApiVersionPolicy(a){a&&this.pipeline.addPolicy({name:"CustomApiVersionPolicy",sendRequest(r,i){return tslib.__awaiter(this,void 0,void 0,function*(){var e,t=r.url.split("?");return 1<t.length&&(e=t[1].split("&").map(e=>-1<e.indexOf("api-version")?"api-version="+a:e),r.url=t[0]+"?"+e.join("&")),i(r)})}})}}exports.ServiceLinkerManagementClient=ServiceLinkerManagementClient,exports.getContinuationToken=getContinuationToken; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var tslib=require("tslib"),coreClient=require("@azure/core-client"),coreRestPipeline=require("@azure/core-rest-pipeline"),coreLro=require("@azure/core-lro");function _interopNamespace(r){var i;return r&&r.__esModule?r:(i=Object.create(null),r&&Object.keys(r).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(r,e),Object.defineProperty(i,e,t.get?t:{enumerable:!0,get:function(){return r[e]}}))}),i.default=r,Object.freeze(i))}var coreClient__namespace=_interopNamespace(coreClient),coreRestPipeline__namespace=_interopNamespace(coreRestPipeline);const pageMap=new WeakMap;function getContinuationToken(e){return"object"!=typeof e||null===e||null==(e=pageMap.get(e))?void 0:e.continuationToken}function setContinuationToken(e,t){var r;"object"==typeof e&&null!==e&&t&&((r=null!=(r=pageMap.get(e))?r:{}).continuationToken=t,pageMap.set(e,r))}exports.KnownTargetServiceType=void 0,function(e){e.AzureResource="AzureResource",e.ConfluentBootstrapServer="ConfluentBootstrapServer",e.ConfluentSchemaRegistry="ConfluentSchemaRegistry"}(exports.KnownTargetServiceType||(exports.KnownTargetServiceType={})),exports.KnownAuthType=void 0,function(e){e.SystemAssignedIdentity="systemAssignedIdentity",e.UserAssignedIdentity="userAssignedIdentity",e.ServicePrincipalSecret="servicePrincipalSecret",e.ServicePrincipalCertificate="servicePrincipalCertificate",e.Secret="secret"}(exports.KnownAuthType||(exports.KnownAuthType={})),exports.KnownClientType=void 0,function(e){e.None="none",e.Dotnet="dotnet",e.Java="java",e.Python="python",e.Go="go",e.Php="php",e.Ruby="ruby",e.Django="django",e.Nodejs="nodejs",e.SpringBoot="springBoot"}(exports.KnownClientType||(exports.KnownClientType={})),exports.KnownVNetSolutionType=void 0,function(e){e.ServiceEndpoint="serviceEndpoint",e.PrivateLink="privateLink"}(exports.KnownVNetSolutionType||(exports.KnownVNetSolutionType={})),exports.KnownCreatedByType=void 0,function(e){e.User="User",e.Application="Application",e.ManagedIdentity="ManagedIdentity",e.Key="Key"}(exports.KnownCreatedByType||(exports.KnownCreatedByType={})),exports.KnownValidationResultStatus=void 0,function(e){e.Success="success",e.Failure="failure",e.Warning="warning"}(exports.KnownValidationResultStatus||(exports.KnownValidationResultStatus={})),exports.KnownOrigin=void 0,function(e){e.User="user",e.System="system",e.UserSystem="user,system"}(exports.KnownOrigin||(exports.KnownOrigin={})),exports.KnownActionType=void 0,(exports.KnownActionType||(exports.KnownActionType={})).Internal="Internal",exports.KnownAzureResourceType=void 0,(exports.KnownAzureResourceType||(exports.KnownAzureResourceType={})).KeyVault="KeyVault",exports.KnownSecretType=void 0,function(e){e.RawValue="rawValue",e.KeyVaultSecretUri="keyVaultSecretUri",e.KeyVaultSecretReference="keyVaultSecretReference"}(exports.KnownSecretType||(exports.KnownSecretType={}));const LinkerList={type:{name:"Composite",className:"LinkerList",modelProperties:{nextLink:{serializedName:"nextLink",nullable:!0,type:{name:"String"}},value:{serializedName:"value",type:{name:"Sequence",element:{type:{name:"Composite",className:"LinkerResource"}}}}}}},TargetServiceBase={type:{name:"Composite",className:"TargetServiceBase",uberParent:"TargetServiceBase",polymorphicDiscriminator:{serializedName:"type",clientName:"type"},modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}}}}},AuthInfoBase={type:{name:"Composite",className:"AuthInfoBase",uberParent:"AuthInfoBase",polymorphicDiscriminator:{serializedName:"authType",clientName:"authType"},modelProperties:{authType:{serializedName:"authType",required:!0,type:{name:"String"}}}}},VNetSolution={type:{name:"Composite",className:"VNetSolution",modelProperties:{type:{serializedName:"type",nullable:!0,type:{name:"String"}}}}},SecretStore={type:{name:"Composite",className:"SecretStore",modelProperties:{keyVaultId:{serializedName:"keyVaultId",nullable:!0,type:{name:"String"}}}}},SystemData={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"}}}}},Resource={type:{name:"Composite",className:"Resource",modelProperties:{id:{serializedName:"id",readOnly:!0,type:{name:"String"}},name:{serializedName:"name",readOnly:!0,type:{name:"String"}},type:{serializedName:"type",readOnly:!0,type:{name:"String"}}}}},ErrorResponse={type:{name:"Composite",className:"ErrorResponse",modelProperties:{error:{serializedName:"error",type:{name:"Composite",className:"ErrorDetail"}}}}},ErrorDetail={type:{name:"Composite",className:"ErrorDetail",modelProperties:{code:{serializedName:"code",readOnly:!0,type:{name:"String"}},message:{serializedName:"message",readOnly:!0,type:{name:"String"}},target:{serializedName:"target",readOnly:!0,type:{name:"String"}},details:{serializedName:"details",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ErrorDetail"}}}},additionalInfo:{serializedName:"additionalInfo",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ErrorAdditionalInfo"}}}}}}},ErrorAdditionalInfo={type:{name:"Composite",className:"ErrorAdditionalInfo",modelProperties:{type:{serializedName:"type",readOnly:!0,type:{name:"String"}},info:{serializedName:"info",readOnly:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},LinkerPatch={type:{name:"Composite",className:"LinkerPatch",modelProperties:{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"}},provisioningState:{serializedName:"properties.provisioningState",readOnly:!0,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:!0,type:{name:"String"}}}}},ValidateOperationResult={type:{name:"Composite",className:"ValidateOperationResult",modelProperties:{resourceId:{serializedName:"resourceId",nullable:!0,type:{name:"String"}},status:{serializedName:"status",nullable:!0,type:{name:"String"}},linkerName:{serializedName:"properties.linkerName",nullable:!0,type:{name:"String"}},isConnectionAvailable:{serializedName:"properties.isConnectionAvailable",nullable:!0,type:{name:"Boolean"}},reportStartTimeUtc:{serializedName:"properties.reportStartTimeUtc",nullable:!0,type:{name:"DateTime"}},reportEndTimeUtc:{serializedName:"properties.reportEndTimeUtc",nullable:!0,type:{name:"DateTime"}},sourceId:{serializedName:"properties.sourceId",nullable:!0,type:{name:"String"}},targetId:{serializedName:"properties.targetId",nullable:!0,type:{name:"String"}},authType:{serializedName:"properties.authType",nullable:!0,type:{name:"String"}},validationDetail:{serializedName:"properties.validationDetail",nullable:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ValidationResultItem"}}}}}}},ValidationResultItem={type:{name:"Composite",className:"ValidationResultItem",modelProperties:{name:{serializedName:"name",type:{name:"String"}},description:{serializedName:"description",nullable:!0,type:{name:"String"}},result:{serializedName:"result",nullable:!0,type:{name:"String"}},errorMessage:{serializedName:"errorMessage",nullable:!0,type:{name:"String"}},errorCode:{serializedName:"errorCode",nullable:!0,type:{name:"String"}}}}},SourceConfigurationResult={type:{name:"Composite",className:"SourceConfigurationResult",modelProperties:{configurations:{serializedName:"configurations",type:{name:"Sequence",element:{type:{name:"Composite",className:"SourceConfiguration"}}}}}}},SourceConfiguration={type:{name:"Composite",className:"SourceConfiguration",modelProperties:{name:{serializedName:"name",type:{name:"String"}},value:{serializedName:"value",nullable:!0,type:{name:"String"}}}}},OperationListResult={type:{name:"Composite",className:"OperationListResult",modelProperties:{value:{serializedName:"value",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Operation"}}}},nextLink:{serializedName:"nextLink",readOnly:!0,type:{name:"String"}}}}},Operation={type:{name:"Composite",className:"Operation",modelProperties:{name:{serializedName:"name",readOnly:!0,type:{name:"String"}},isDataAction:{serializedName:"isDataAction",readOnly:!0,type:{name:"Boolean"}},display:{serializedName:"display",type:{name:"Composite",className:"OperationDisplay"}},origin:{serializedName:"origin",readOnly:!0,type:{name:"String"}},actionType:{serializedName:"actionType",readOnly:!0,type:{name:"String"}}}}},OperationDisplay={type:{name:"Composite",className:"OperationDisplay",modelProperties:{provider:{serializedName:"provider",readOnly:!0,type:{name:"String"}},resource:{serializedName:"resource",readOnly:!0,type:{name:"String"}},operation:{serializedName:"operation",readOnly:!0,type:{name:"String"}},description:{serializedName:"description",readOnly:!0,type:{name:"String"}}}}},AzureResourcePropertiesBase={type:{name:"Composite",className:"AzureResourcePropertiesBase",uberParent:"AzureResourcePropertiesBase",polymorphicDiscriminator:{serializedName:"type",clientName:"type"},modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}}}}},SecretInfoBase={type:{name:"Composite",className:"SecretInfoBase",uberParent:"SecretInfoBase",polymorphicDiscriminator:{serializedName:"secretType",clientName:"secretType"},modelProperties:{secretType:{serializedName:"secretType",required:!0,type:{name:"String"}}}}},AzureResource={serializedName:"AzureResource",type:{name:"Composite",className:"AzureResource",uberParent:"TargetServiceBase",polymorphicDiscriminator:TargetServiceBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},TargetServiceBase.type.modelProperties),{id:{serializedName:"id",type:{name:"String"}},resourceProperties:{serializedName:"resourceProperties",type:{name:"Composite",className:"AzureResourcePropertiesBase"}}})}},ConfluentBootstrapServer={serializedName:"ConfluentBootstrapServer",type:{name:"Composite",className:"ConfluentBootstrapServer",uberParent:"TargetServiceBase",polymorphicDiscriminator:TargetServiceBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},TargetServiceBase.type.modelProperties),{endpoint:{serializedName:"endpoint",type:{name:"String"}}})}},ConfluentSchemaRegistry={serializedName:"ConfluentSchemaRegistry",type:{name:"Composite",className:"ConfluentSchemaRegistry",uberParent:"TargetServiceBase",polymorphicDiscriminator:TargetServiceBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},TargetServiceBase.type.modelProperties),{endpoint:{serializedName:"endpoint",type:{name:"String"}}})}},SecretAuthInfo={serializedName:"secret",type:{name:"Composite",className:"SecretAuthInfo",uberParent:"AuthInfoBase",polymorphicDiscriminator:AuthInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},AuthInfoBase.type.modelProperties),{name:{serializedName:"name",nullable:!0,type:{name:"String"}},secretInfo:{serializedName:"secretInfo",type:{name:"Composite",className:"SecretInfoBase"}}})}},UserAssignedIdentityAuthInfo={serializedName:"userAssignedIdentity",type:{name:"Composite",className:"UserAssignedIdentityAuthInfo",uberParent:"AuthInfoBase",polymorphicDiscriminator:AuthInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},AuthInfoBase.type.modelProperties),{clientId:{serializedName:"clientId",type:{name:"String"}},subscriptionId:{serializedName:"subscriptionId",type:{name:"String"}}})}},SystemAssignedIdentityAuthInfo={serializedName:"systemAssignedIdentity",type:{name:"Composite",className:"SystemAssignedIdentityAuthInfo",uberParent:"AuthInfoBase",polymorphicDiscriminator:AuthInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign({},AuthInfoBase.type.modelProperties)}},ServicePrincipalSecretAuthInfo={serializedName:"servicePrincipalSecret",type:{name:"Composite",className:"ServicePrincipalSecretAuthInfo",uberParent:"AuthInfoBase",polymorphicDiscriminator:AuthInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},AuthInfoBase.type.modelProperties),{clientId:{serializedName:"clientId",required:!0,type:{name:"String"}},principalId:{serializedName:"principalId",required:!0,type:{name:"String"}},secret:{serializedName:"secret",required:!0,type:{name:"String"}}})}},ServicePrincipalCertificateAuthInfo={serializedName:"servicePrincipalCertificate",type:{name:"Composite",className:"ServicePrincipalCertificateAuthInfo",uberParent:"AuthInfoBase",polymorphicDiscriminator:AuthInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},AuthInfoBase.type.modelProperties),{clientId:{serializedName:"clientId",required:!0,type:{name:"String"}},principalId:{serializedName:"principalId",required:!0,type:{name:"String"}},certificate:{serializedName:"certificate",required:!0,type:{name:"String"}}})}},ProxyResource={type:{name:"Composite",className:"ProxyResource",modelProperties:Object.assign({},Resource.type.modelProperties)}},AzureKeyVaultProperties={serializedName:"KeyVault",type:{name:"Composite",className:"AzureKeyVaultProperties",uberParent:"AzureResourcePropertiesBase",polymorphicDiscriminator:AzureResourcePropertiesBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},AzureResourcePropertiesBase.type.modelProperties),{connectAsKubernetesCsiDriver:{serializedName:"connectAsKubernetesCsiDriver",nullable:!0,type:{name:"Boolean"}}})}},ValueSecretInfo={serializedName:"rawValue",type:{name:"Composite",className:"ValueSecretInfo",uberParent:"SecretInfoBase",polymorphicDiscriminator:SecretInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},SecretInfoBase.type.modelProperties),{value:{serializedName:"value",nullable:!0,type:{name:"String"}}})}},KeyVaultSecretReferenceSecretInfo={serializedName:"keyVaultSecretReference",type:{name:"Composite",className:"KeyVaultSecretReferenceSecretInfo",uberParent:"SecretInfoBase",polymorphicDiscriminator:SecretInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},SecretInfoBase.type.modelProperties),{name:{serializedName:"name",type:{name:"String"}},version:{serializedName:"version",nullable:!0,type:{name:"String"}}})}},KeyVaultSecretUriSecretInfo={serializedName:"keyVaultSecretUri",type:{name:"Composite",className:"KeyVaultSecretUriSecretInfo",uberParent:"SecretInfoBase",polymorphicDiscriminator:SecretInfoBase.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},SecretInfoBase.type.modelProperties),{value:{serializedName:"value",type:{name:"String"}}})}},LinkerResource={type:{name:"Composite",className:"LinkerResource",modelProperties:Object.assign(Object.assign({},ProxyResource.type.modelProperties),{systemData:{serializedName:"systemData",type:{name:"Composite",className:"SystemData"}},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"}},provisioningState:{serializedName:"properties.provisioningState",readOnly:!0,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:!0,type:{name:"String"}}})}};let discriminators={TargetServiceBase:TargetServiceBase,AuthInfoBase:AuthInfoBase,AzureResourcePropertiesBase:AzureResourcePropertiesBase,SecretInfoBase:SecretInfoBase,"TargetServiceBase.AzureResource":AzureResource,"TargetServiceBase.ConfluentBootstrapServer":ConfluentBootstrapServer,"TargetServiceBase.ConfluentSchemaRegistry":ConfluentSchemaRegistry,"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};var Mappers=Object.freeze({__proto__:null,LinkerList:LinkerList,TargetServiceBase:TargetServiceBase,AuthInfoBase:AuthInfoBase,VNetSolution:VNetSolution,SecretStore:SecretStore,SystemData:SystemData,Resource:Resource,ErrorResponse:ErrorResponse,ErrorDetail:ErrorDetail,ErrorAdditionalInfo:ErrorAdditionalInfo,LinkerPatch:LinkerPatch,ValidateOperationResult:ValidateOperationResult,ValidationResultItem:ValidationResultItem,SourceConfigurationResult:SourceConfigurationResult,SourceConfiguration:SourceConfiguration,OperationListResult:OperationListResult,Operation:Operation,OperationDisplay:OperationDisplay,AzureResourcePropertiesBase:AzureResourcePropertiesBase,SecretInfoBase:SecretInfoBase,AzureResource:AzureResource,ConfluentBootstrapServer:ConfluentBootstrapServer,ConfluentSchemaRegistry:ConfluentSchemaRegistry,SecretAuthInfo:SecretAuthInfo,UserAssignedIdentityAuthInfo:UserAssignedIdentityAuthInfo,SystemAssignedIdentityAuthInfo:SystemAssignedIdentityAuthInfo,ServicePrincipalSecretAuthInfo:ServicePrincipalSecretAuthInfo,ServicePrincipalCertificateAuthInfo:ServicePrincipalCertificateAuthInfo,ProxyResource:ProxyResource,AzureKeyVaultProperties:AzureKeyVaultProperties,ValueSecretInfo:ValueSecretInfo,KeyVaultSecretReferenceSecretInfo:KeyVaultSecretReferenceSecretInfo,KeyVaultSecretUriSecretInfo:KeyVaultSecretUriSecretInfo,LinkerResource:LinkerResource,discriminators:discriminators});const accept={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},$host={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},resourceUri={parameterPath:"resourceUri",mapper:{serializedName:"resourceUri",required:!0,type:{name:"String"}},skipEncoding:!0},apiVersion={parameterPath:"apiVersion",mapper:{defaultValue:"2022-05-01",isConstant:!0,serializedName:"api-version",type:{name:"String"}}},linkerName={parameterPath:"linkerName",mapper:{serializedName:"linkerName",required:!0,type:{name:"String"}}},contentType={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},parameters={parameterPath:"parameters",mapper:LinkerResource},parameters1={parameterPath:"parameters",mapper:LinkerPatch},nextLink={parameterPath:"nextLink",mapper:{serializedName:"nextLink",required:!0,type:{name:"String"}},skipEncoding:!0};class LroImpl{constructor(e,t,r,i=r.path,a=r.httpMethod){this.sendOperationFn=e,this.args=t,this.spec=r,this.requestPath=i,this.requestMethod=a}sendInitialRequest(){return tslib.__awaiter(this,void 0,void 0,function*(){return this.sendOperationFn(this.args,this.spec)})}sendPollRequest(t){return tslib.__awaiter(this,void 0,void 0,function*(){var e=this.spec,e=tslib.__rest(e,["requestBody"]);return this.sendOperationFn(this.args,Object.assign(Object.assign({},e),{path:t,httpMethod:"GET"}))})}}class LinkerImpl{constructor(e){this.client=e}list(t,r){const e=this.listPagingAll(t,r);return{next(){return e.next()},[Symbol.asyncIterator](){return this},byPage:e=>{if(null!=e&&e.maxPageSize)throw new Error("maxPageSize is not supported by this operation.");return this.listPagingPage(t,r,e)}}}listPagingPage(a,n,s){return tslib.__asyncGenerator(this,arguments,function*(){let e,t=null==s?void 0:s.continuationToken;var r;for(t||(setContinuationToken(r=(e=yield tslib.__await(this._list(a,n))).value||[],t=e.nextLink),yield yield tslib.__await(r));t;){e=yield tslib.__await(this._listNext(a,t,n)),t=e.nextLink;var i=e.value||[];setContinuationToken(i,t),yield yield tslib.__await(i)}})}listPagingAll(o,l){return tslib.__asyncGenerator(this,arguments,function*(){var e,t,r,i;try{for(var a,n=!0,s=tslib.__asyncValues(this.listPagingPage(o,l));!(e=(a=yield tslib.__await(s.next())).done);){i=a.value,n=!1;try{yield tslib.__await(yield*tslib.__asyncDelegator(tslib.__asyncValues(i)))}finally{n=!0}}}catch(e){t={error:e}}finally{try{n||e||!(r=s.return)||(yield tslib.__await(r.call(s)))}finally{if(t)throw t.error}}})}_list(e,t){return this.client.sendOperationRequest({resourceUri:e,options:t},listOperationSpec$1)}get(e,t,r){return this.client.sendOperationRequest({resourceUri:e,linkerName:t,options:r},getOperationSpec)}beginCreateOrUpdate(t,r,i,a){return tslib.__awaiter(this,void 0,void 0,function*(){const n=(e,t)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,t)});var e=new LroImpl((t,a)=>tslib.__awaiter(this,void 0,void 0,function*(){let r=void 0;const i=null==(e=t.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},t),{options:Object.assign(Object.assign({},t.options),{onResponse:(e,t)=>{r=e,null!==i&&void 0!==i&&i(e,t)}})});return{flatResponse:yield n(e,a),rawResponse:{statusCode:r.status,body:r.parsedBody,headers:r.headers.toJSON()}}}),{resourceUri:t,linkerName:r,parameters:i,options:a},createOrUpdateOperationSpec),e=new coreLro.LroEngine(e,{resumeFrom:null==a?void 0:a.resumeFrom,intervalInMs:null==a?void 0:a.updateIntervalInMs,lroResourceLocationConfig:"azure-async-operation"});return yield e.poll(),e})}beginCreateOrUpdateAndWait(e,t,r,i){return tslib.__awaiter(this,void 0,void 0,function*(){return(yield this.beginCreateOrUpdate(e,t,r,i)).pollUntilDone()})}beginDelete(t,r,i){return tslib.__awaiter(this,void 0,void 0,function*(){const n=(e,t)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,t)});var e=new LroImpl((t,a)=>tslib.__awaiter(this,void 0,void 0,function*(){let r=void 0;const i=null==(e=t.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},t),{options:Object.assign(Object.assign({},t.options),{onResponse:(e,t)=>{r=e,null!==i&&void 0!==i&&i(e,t)}})});return{flatResponse:yield n(e,a),rawResponse:{statusCode:r.status,body:r.parsedBody,headers:r.headers.toJSON()}}}),{resourceUri:t,linkerName:r,options:i},deleteOperationSpec),e=new coreLro.LroEngine(e,{resumeFrom:null==i?void 0:i.resumeFrom,intervalInMs:null==i?void 0:i.updateIntervalInMs,lroResourceLocationConfig:"azure-async-operation"});return yield e.poll(),e})}beginDeleteAndWait(e,t,r){return tslib.__awaiter(this,void 0,void 0,function*(){return(yield this.beginDelete(e,t,r)).pollUntilDone()})}beginUpdate(t,r,i,a){return tslib.__awaiter(this,void 0,void 0,function*(){const n=(e,t)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,t)});var e=new LroImpl((t,a)=>tslib.__awaiter(this,void 0,void 0,function*(){let r=void 0;const i=null==(e=t.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},t),{options:Object.assign(Object.assign({},t.options),{onResponse:(e,t)=>{r=e,null!==i&&void 0!==i&&i(e,t)}})});return{flatResponse:yield n(e,a),rawResponse:{statusCode:r.status,body:r.parsedBody,headers:r.headers.toJSON()}}}),{resourceUri:t,linkerName:r,parameters:i,options:a},updateOperationSpec),e=new coreLro.LroEngine(e,{resumeFrom:null==a?void 0:a.resumeFrom,intervalInMs:null==a?void 0:a.updateIntervalInMs,lroResourceLocationConfig:"azure-async-operation"});return yield e.poll(),e})}beginUpdateAndWait(e,t,r,i){return tslib.__awaiter(this,void 0,void 0,function*(){return(yield this.beginUpdate(e,t,r,i)).pollUntilDone()})}beginValidate(t,r,i){return tslib.__awaiter(this,void 0,void 0,function*(){const n=(e,t)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,t)});var e=new LroImpl((t,a)=>tslib.__awaiter(this,void 0,void 0,function*(){let r=void 0;const i=null==(e=t.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},t),{options:Object.assign(Object.assign({},t.options),{onResponse:(e,t)=>{r=e,null!==i&&void 0!==i&&i(e,t)}})});return{flatResponse:yield n(e,a),rawResponse:{statusCode:r.status,body:r.parsedBody,headers:r.headers.toJSON()}}}),{resourceUri:t,linkerName:r,options:i},validateOperationSpec),e=new coreLro.LroEngine(e,{resumeFrom:null==i?void 0:i.resumeFrom,intervalInMs:null==i?void 0:i.updateIntervalInMs,lroResourceLocationConfig:"azure-async-operation"});return yield e.poll(),e})}beginValidateAndWait(e,t,r){return tslib.__awaiter(this,void 0,void 0,function*(){return(yield this.beginValidate(e,t,r)).pollUntilDone()})}listConfigurations(e,t,r){return this.client.sendOperationRequest({resourceUri:e,linkerName:t,options:r},listConfigurationsOperationSpec)}_listNext(e,t,r){return this.client.sendOperationRequest({resourceUri:e,nextLink:t,options:r},listNextOperationSpec$1)}}const serializer$1=coreClient__namespace.createSerializer(Mappers,!1),listOperationSpec$1={path:"/{resourceUri}/providers/Microsoft.ServiceLinker/linkers",httpMethod:"GET",responses:{200:{bodyMapper:LinkerList},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceUri],headerParameters:[accept],serializer:serializer$1},getOperationSpec={path:"/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}",httpMethod:"GET",responses:{200:{bodyMapper:LinkerResource},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceUri,linkerName],headerParameters:[accept],serializer:serializer$1},createOrUpdateOperationSpec={path:"/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}",httpMethod:"PUT",responses:{200:{bodyMapper:LinkerResource},201:{bodyMapper:LinkerResource},202:{bodyMapper:LinkerResource},204:{bodyMapper:LinkerResource},default:{bodyMapper:ErrorResponse}},requestBody:parameters,queryParameters:[apiVersion],urlParameters:[$host,resourceUri,linkerName],headerParameters:[accept,contentType],mediaType:"json",serializer:serializer$1},deleteOperationSpec={path:"/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}",httpMethod:"DELETE",responses:{200:{},201:{},202:{},204:{},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceUri,linkerName],headerParameters:[accept],serializer:serializer$1},updateOperationSpec={path:"/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}",httpMethod:"PATCH",responses:{200:{bodyMapper:LinkerResource},201:{bodyMapper:LinkerResource},202:{bodyMapper:LinkerResource},204:{bodyMapper:LinkerResource},default:{bodyMapper:ErrorResponse}},requestBody:parameters1,queryParameters:[apiVersion],urlParameters:[$host,resourceUri,linkerName],headerParameters:[accept,contentType],mediaType:"json",serializer:serializer$1},validateOperationSpec={path:"/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/validateLinker",httpMethod:"POST",responses:{200:{bodyMapper:ValidateOperationResult},201:{bodyMapper:ValidateOperationResult},202:{bodyMapper:ValidateOperationResult},204:{bodyMapper:ValidateOperationResult},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceUri,linkerName],headerParameters:[accept],serializer:serializer$1},listConfigurationsOperationSpec={path:"/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/listConfigurations",httpMethod:"POST",responses:{200:{bodyMapper:SourceConfigurationResult},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceUri,linkerName],headerParameters:[accept],serializer:serializer$1},listNextOperationSpec$1={path:"{nextLink}",httpMethod:"GET",responses:{200:{bodyMapper:LinkerList},default:{bodyMapper:ErrorResponse}},urlParameters:[$host,resourceUri,nextLink],headerParameters:[accept],serializer:serializer$1};class OperationsImpl{constructor(e){this.client=e}list(t){const e=this.listPagingAll(t);return{next(){return e.next()},[Symbol.asyncIterator](){return this},byPage:e=>{if(null!=e&&e.maxPageSize)throw new Error("maxPageSize is not supported by this operation.");return this.listPagingPage(t,e)}}}listPagingPage(a,n){return tslib.__asyncGenerator(this,arguments,function*(){let e,t=null==n?void 0:n.continuationToken;var r;for(t||(setContinuationToken(r=(e=yield tslib.__await(this._list(a))).value||[],t=e.nextLink),yield yield tslib.__await(r));t;){e=yield tslib.__await(this._listNext(t,a)),t=e.nextLink;var i=e.value||[];setContinuationToken(i,t),yield yield tslib.__await(i)}})}listPagingAll(o){return tslib.__asyncGenerator(this,arguments,function*(){var e,t,r,i;try{for(var a,n=!0,s=tslib.__asyncValues(this.listPagingPage(o));!(e=(a=yield tslib.__await(s.next())).done);){i=a.value,n=!1;try{yield tslib.__await(yield*tslib.__asyncDelegator(tslib.__asyncValues(i)))}finally{n=!0}}}catch(e){t={error:e}}finally{try{n||e||!(r=s.return)||(yield tslib.__await(r.call(s)))}finally{if(t)throw t.error}}})}_list(e){return this.client.sendOperationRequest({options:e},listOperationSpec)}_listNext(e,t){return this.client.sendOperationRequest({nextLink:e,options:t},listNextOperationSpec)}}const serializer=coreClient__namespace.createSerializer(Mappers,!1),listOperationSpec={path:"/providers/Microsoft.ServiceLinker/operations",httpMethod:"GET",responses:{200:{bodyMapper:OperationListResult},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host],headerParameters:[accept],serializer:serializer},listNextOperationSpec={path:"{nextLink}",httpMethod:"GET",responses:{200:{bodyMapper:OperationListResult},default:{bodyMapper:ErrorResponse}},urlParameters:[$host,nextLink],headerParameters:[accept],serializer:serializer};class ServiceLinkerManagementClient extends coreClient__namespace.ServiceClient{constructor(e,t){if(void 0===e)throw new Error("'credentials' cannot be null");var r,i="azsdk-js-arm-servicelinker/2.1.1",i=(t=t||{}).userAgentOptions&&t.userAgentOptions.userAgentPrefix?t.userAgentOptions.userAgentPrefix+" "+i:i,i=Object.assign(Object.assign(Object.assign({},{requestContentType:"application/json; charset=utf-8",credential:e}),t),{userAgentOptions:{userAgentPrefix:i},endpoint:null!=(i=null!=(i=t.endpoint)?i:t.baseUri)?i:"https://management.azure.com"});super(i);let a=!1;null!=t&&t.pipeline&&0<t.pipeline.getOrderedPolicies().length&&(r=t.pipeline.getOrderedPolicies(),a=r.some(e=>e.name===coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName)),t&&t.pipeline&&0!=t.pipeline.getOrderedPolicies().length&&a||(this.pipeline.removePolicy({name:coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName}),this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({credential:e,scopes:null!=(r=i.credentialScopes)?r:i.endpoint+"/.default",challengeCallbacks:{authorizeRequestOnChallenge:coreClient__namespace.authorizeRequestOnClaimChallenge}}))),this.$host=t.$host||"https://management.azure.com",this.apiVersion=t.apiVersion||"2022-05-01",this.linker=new LinkerImpl(this),this.operations=new OperationsImpl(this),this.addCustomApiVersionPolicy(t.apiVersion)}addCustomApiVersionPolicy(a){a&&this.pipeline.addPolicy({name:"CustomApiVersionPolicy",sendRequest(r,i){return tslib.__awaiter(this,void 0,void 0,function*(){var e,t=r.url.split("?");return 1<t.length&&(e=t[1].split("&").map(e=>-1<e.indexOf("api-version")?"api-version="+a:e),r.url=t[0]+"?"+e.join("&")),i(r)})}})}}exports.ServiceLinkerManagementClient=ServiceLinkerManagementClient,exports.getContinuationToken=getContinuationToken; |
@@ -6,3 +6,3 @@ { | ||
"description": "A generated SDK for ServiceLinkerManagementClient.", | ||
"version": "2.1.1-alpha.20230320.1", | ||
"version": "2.1.1-alpha.20230418.1", | ||
"engines": { | ||
@@ -40,3 +40,3 @@ "node": ">=14.0.0" | ||
"rollup-plugin-sourcemaps": "^0.6.3", | ||
"typescript": "~4.8.0", | ||
"typescript": "~5.0.0", | ||
"uglify-js": "^3.4.9", | ||
@@ -43,0 +43,0 @@ "rimraf": "^3.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
634346
9536