diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ad1cf583ffd3..3f11925e348a 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -18781,7 +18781,7 @@ packages: dev: false file:projects/arm-webpubsub.tgz: - resolution: {integrity: sha512-Royoi1sbidwFMB2pWwZ0FSWrn+64GU/OluE27Bnu4KRHL/px7AGUynDMJxVC6JXyAy3jBlFEf2FP9+z4xYw2Sw==, tarball: file:projects/arm-webpubsub.tgz} + resolution: {integrity: sha512-HGr+ifbvdMY6ynQRSfe77cs4QZN862p9MDLrguStnTbaFdnQRSxxhbylQrxbvHjOwo3IThS1kiSMHlUjxkdJxw==, tarball: file:projects/arm-webpubsub.tgz} name: '@rush-temp/arm-webpubsub' version: 0.0.0 dependencies: @@ -18802,6 +18802,7 @@ packages: rimraf: 5.0.7 ts-node: 10.9.2(@types/node@18.19.33)(typescript@5.4.5) tslib: 2.6.2 + tsx: 4.10.5 typescript: 5.4.5 uglify-js: 3.17.4 transitivePeerDependencies: diff --git a/sdk/web-pubsub/arm-webpubsub/CHANGELOG.md b/sdk/web-pubsub/arm-webpubsub/CHANGELOG.md index e8baa582932f..a61f6b314ad1 100644 --- a/sdk/web-pubsub/arm-webpubsub/CHANGELOG.md +++ b/sdk/web-pubsub/arm-webpubsub/CHANGELOG.md @@ -1,5 +1,66 @@ # Release History +## 2.0.0 (2024-05-23) + +**Features** + + - Added operation group WebPubSubReplicas + - Added operation group WebPubSubReplicaSharedPrivateLinkResources + - Added operation WebPubSub.listReplicaSkus + - Added Interface IPRule + - Added Interface Replica + - Added Interface ReplicaList + - Added Interface WebPubSubListReplicaSkusOptionalParams + - Added Interface WebPubSubRegenerateKeyHeaders + - Added Interface WebPubSubReplicasCreateOrUpdateOptionalParams + - Added Interface WebPubSubReplicasDeleteOptionalParams + - Added Interface WebPubSubReplicasGetOptionalParams + - Added Interface WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateOptionalParams + - Added Interface WebPubSubReplicaSharedPrivateLinkResourcesGetOptionalParams + - Added Interface WebPubSubReplicaSharedPrivateLinkResourcesListNextOptionalParams + - Added Interface WebPubSubReplicaSharedPrivateLinkResourcesListOptionalParams + - Added Interface WebPubSubReplicasListNextOptionalParams + - Added Interface WebPubSubReplicasListOptionalParams + - Added Interface WebPubSubReplicasRestartHeaders + - Added Interface WebPubSubReplicasRestartOptionalParams + - Added Interface WebPubSubReplicasUpdateHeaders + - Added Interface WebPubSubReplicasUpdateOptionalParams + - Added Interface WebPubSubRestartHeaders + - Added Interface WebPubSubSocketIOSettings + - Added Interface WebPubSubUpdateHeaders + - Added Type Alias ServiceKind + - Added Type Alias WebPubSubListReplicaSkusResponse + - Added Type Alias WebPubSubReplicasCreateOrUpdateResponse + - Added Type Alias WebPubSubReplicasGetResponse + - Added Type Alias WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateResponse + - Added Type Alias WebPubSubReplicaSharedPrivateLinkResourcesGetResponse + - Added Type Alias WebPubSubReplicaSharedPrivateLinkResourcesListNextResponse + - Added Type Alias WebPubSubReplicaSharedPrivateLinkResourcesListResponse + - Added Type Alias WebPubSubReplicasListNextResponse + - Added Type Alias WebPubSubReplicasListResponse + - Added Type Alias WebPubSubReplicasRestartResponse + - Added Type Alias WebPubSubReplicasUpdateResponse + - Added Type Alias WebPubSubRestartResponse + - Interface Resource has a new optional parameter systemData + - Interface WebPubSubHubProperties has a new optional parameter webSocketKeepAliveIntervalInSeconds + - Interface WebPubSubNetworkACLs has a new optional parameter ipRules + - Interface WebPubSubResource has a new optional parameter kind + - Interface WebPubSubResource has a new optional parameter regionEndpointEnabled + - Interface WebPubSubResource has a new optional parameter resourceStopped + - Interface WebPubSubResource has a new optional parameter socketIO + - Added Enum KnownServiceKind + +**Breaking Changes** + + - Interface CustomCertificate no longer has parameter systemData + - Interface CustomDomain no longer has parameter systemData + - Interface PrivateEndpointConnection no longer has parameter systemData + - Interface SharedPrivateLinkResource no longer has parameter systemData + - Interface WebPubSubHub no longer has parameter systemData + - Interface WebPubSubResource no longer has parameter systemData + - Parameter location of interface TrackedResource is now required + + ## 2.0.0-beta.2 (2023-10-10) **Features** diff --git a/sdk/web-pubsub/arm-webpubsub/LICENSE b/sdk/web-pubsub/arm-webpubsub/LICENSE index 3a1d9b6f24f7..7d5934740965 100644 --- a/sdk/web-pubsub/arm-webpubsub/LICENSE +++ b/sdk/web-pubsub/arm-webpubsub/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2023 Microsoft +Copyright (c) 2024 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/web-pubsub/arm-webpubsub/README.md b/sdk/web-pubsub/arm-webpubsub/README.md index 3b32767350c2..1be3dc2e4569 100644 --- a/sdk/web-pubsub/arm-webpubsub/README.md +++ b/sdk/web-pubsub/arm-webpubsub/README.md @@ -6,7 +6,7 @@ REST API for Azure WebPubSub Service [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/arm-webpubsub) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-webpubsub) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-webpubsub?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-webpubsub) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/web-pubsub/arm-webpubsub/_meta.json b/sdk/web-pubsub/arm-webpubsub/_meta.json index b5d9cca89c91..1b017a2863db 100644 --- a/sdk/web-pubsub/arm-webpubsub/_meta.json +++ b/sdk/web-pubsub/arm-webpubsub/_meta.json @@ -1,8 +1,8 @@ { - "commit": "e1017d9ab49f41296177b4f4c9ac741fb7de044d", + "commit": "6e7ff2b8178aa73a8f2edaefaccf3c8af9cc3df8", "readme": "specification/webpubsub/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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\webpubsub\\resource-manager\\readme.md --use=@autorest/typescript@6.0.9 --generate-sample=true", + "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/webpubsub/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", - "use": "@autorest/typescript@6.0.9" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.9", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/web-pubsub/arm-webpubsub/package.json b/sdk/web-pubsub/arm-webpubsub/package.json index 113ca8c13eb6..70f3a49ac79d 100644 --- a/sdk/web-pubsub/arm-webpubsub/package.json +++ b/sdk/web-pubsub/arm-webpubsub/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for WebPubSubManagementClient.", - "version": "2.0.0-beta.2", + "version": "2.0.0", "engines": { "node": ">=18.0.0" }, @@ -12,8 +12,8 @@ "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.12.0", + "@azure/core-auth": "^1.6.0", + "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, "keywords": [ @@ -34,17 +34,18 @@ "uglify-js": "^3.4.9", "rimraf": "^5.0.0", "dotenv": "^16.0.0", + "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^10.0.0", + "@types/mocha": "^10.0.0", + "tsx": "^4.7.1", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^18.0.0", - "ts-node": "^10.0.0", - "@azure/dev-tool": "^1.0.0", - "@types/mocha": "^10.0.0" + "ts-node": "^10.0.0" }, "repository": { "type": "git", @@ -77,7 +78,6 @@ "pack": "npm pack 2>&1", "extract-api": "dev-tool run extract-api", "lint": "echo skipped", - "audit": "echo skipped", "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", @@ -106,13 +106,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/arm-webpubsub", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-webpubsub?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/arm-webpubsub" +} \ No newline at end of file diff --git a/sdk/web-pubsub/arm-webpubsub/review/arm-webpubsub.api.md b/sdk/web-pubsub/arm-webpubsub/review/arm-webpubsub.api.md index cf834b2bbbbc..6a6b6420c4f7 100644 --- a/sdk/web-pubsub/arm-webpubsub/review/arm-webpubsub.api.md +++ b/sdk/web-pubsub/arm-webpubsub/review/arm-webpubsub.api.md @@ -752,6 +752,7 @@ export interface WebPubSubHubProperties { anonymousConnectPolicy?: string; eventHandlers?: EventHandler[]; eventListeners?: EventListener_2[]; + webSocketKeepAliveIntervalInSeconds?: number; } // @public @@ -885,6 +886,8 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { // (undocumented) webPubSubReplicas: WebPubSubReplicas; // (undocumented) + webPubSubReplicaSharedPrivateLinkResources: WebPubSubReplicaSharedPrivateLinkResources; + // (undocumented) webPubSubSharedPrivateLinkResources: WebPubSubSharedPrivateLinkResources; } @@ -1013,6 +1016,44 @@ export interface WebPubSubReplicasGetOptionalParams extends coreClient.Operation // @public export type WebPubSubReplicasGetResponse = Replica; +// @public +export interface WebPubSubReplicaSharedPrivateLinkResources { + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, replicaName: string, sharedPrivateLinkResourceName: string, parameters: SharedPrivateLinkResource, options?: WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateOptionalParams): Promise, WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, replicaName: string, sharedPrivateLinkResourceName: string, parameters: SharedPrivateLinkResource, options?: WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, replicaName: string, sharedPrivateLinkResourceName: string, options?: WebPubSubReplicaSharedPrivateLinkResourcesGetOptionalParams): Promise; + list(resourceGroupName: string, resourceName: string, replicaName: string, options?: WebPubSubReplicaSharedPrivateLinkResourcesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateResponse = SharedPrivateLinkResource; + +// @public +export interface WebPubSubReplicaSharedPrivateLinkResourcesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebPubSubReplicaSharedPrivateLinkResourcesGetResponse = SharedPrivateLinkResource; + +// @public +export interface WebPubSubReplicaSharedPrivateLinkResourcesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebPubSubReplicaSharedPrivateLinkResourcesListNextResponse = SharedPrivateLinkResourceList; + +// @public +export interface WebPubSubReplicaSharedPrivateLinkResourcesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebPubSubReplicaSharedPrivateLinkResourcesListResponse = SharedPrivateLinkResourceList; + // @public export interface WebPubSubReplicasListNextOptionalParams extends coreClient.OperationOptions { } @@ -1081,6 +1122,7 @@ export interface WebPubSubResource extends TrackedResource { readonly serverPort?: number; readonly sharedPrivateLinkResources?: SharedPrivateLinkResource[]; sku?: ResourceSku; + socketIO?: WebPubSubSocketIOSettings; tls?: WebPubSubTlsSettings; readonly version?: string; } @@ -1155,6 +1197,11 @@ export type WebPubSubSharedPrivateLinkResourcesListResponse = SharedPrivateLinkR // @public export type WebPubSubSkuTier = string; +// @public +export interface WebPubSubSocketIOSettings { + serviceMode?: string; +} + // @public export interface WebPubSubTlsSettings { clientCertEnabled?: boolean; diff --git a/sdk/web-pubsub/arm-webpubsub/src/lroImpl.ts b/sdk/web-pubsub/arm-webpubsub/src/lroImpl.ts index dd803cd5e28c..b27f5ac7209b 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/lroImpl.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/lroImpl.ts @@ -28,15 +28,15 @@ export function createLroSpec(inputs: { sendInitialRequest: () => sendOperationFn(args, spec), sendPollRequest: ( path: string, - options?: { abortSignal?: AbortSignalLike } + options?: { abortSignal?: AbortSignalLike }, ) => { const { requestBody, ...restSpec } = spec; return sendOperationFn(args, { ...restSpec, httpMethod: "GET", path, - abortSignal: options?.abortSignal + abortSignal: options?.abortSignal, }); - } + }, }; } diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/index.ts b/sdk/web-pubsub/arm-webpubsub/src/models/index.ts index a9ed6aeb88a5..f1cf47217ef6 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/models/index.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/models/index.ts @@ -224,7 +224,7 @@ export interface ResourceSku { /** * The name of the SKU. Required. * - * Allowed values: Standard_S1, Free_F1, Premium_P1 + * Allowed values: Standard_S1, Free_F1, Premium_P1, Premium_P2 */ name: string; /** @@ -244,12 +244,14 @@ export interface ResourceSku { */ readonly family?: string; /** - * Optional, integer. The unit count of the resource. 1 by default. + * Optional, integer. The unit count of the resource. + * 1 for Free_F1/Standard_S1/Premium_P1, 100 for Premium_P2 by default. * * If present, following values are allowed: - * Free: 1; - * Standard: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; - * Premium: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; + * Free_F1: 1; + * Standard_S1: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; + * Premium_P1: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; + * Premium_P2: 100,200,300,400,500,600,700,800,900,1000; */ capacity?: number; } @@ -396,6 +398,16 @@ export interface IPRule { action?: ACLAction; } +/** SocketIO settings for the resource */ +export interface WebPubSubSocketIOSettings { + /** + * The service mode of Web PubSub for Socket.IO. Values allowed: + * "Default": have your own backend Socket.IO server + * "Serverless": your application doesn't have a backend server + */ + serviceMode?: string; +} + /** A class represent managed identities used for request and response */ export interface ManagedIdentity { /** Represents the identity type: systemAssigned, userAssigned, None */ @@ -485,6 +497,8 @@ export interface WebPubSubHubProperties { eventListeners?: EventListener[]; /** The settings for configuring if anonymous connections are allowed for this hub: "allow" or "deny". Default to "deny". */ anonymousConnectPolicy?: string; + /** The settings for configuring the WebSocket ping-pong interval in seconds for all clients in the hub. Valid range: 1 to 120. Default to 20 seconds. */ + webSocketKeepAliveIntervalInSeconds?: number; } /** Properties of event handler. */ @@ -610,6 +624,14 @@ export interface ReplicaList { nextLink?: string; } +/** A list of shared private link resources */ +export interface SharedPrivateLinkResourceList { + /** The list of the shared private link resources */ + value?: SharedPrivateLinkResource[]; + /** Request URL that can be used to query next page of private endpoint connections. Returned when the total number of requested private endpoint connections exceed maximum page size. */ + nextLink?: string; +} + /** The list skus operation response */ export interface SkuList { /** @@ -673,14 +695,6 @@ export interface SkuCapacity { readonly scaleType?: ScaleType; } -/** A list of shared private link resources */ -export interface SharedPrivateLinkResourceList { - /** The list of the shared private link resources */ - value?: SharedPrivateLinkResource[]; - /** Request URL that can be used to query next page of private endpoint connections. Returned when the total number of requested private endpoint connections exceed maximum page size. */ - nextLink?: string; -} - /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} @@ -897,11 +911,13 @@ export interface WebPubSubResource extends TrackedResource { */ regionEndpointEnabled?: string; /** - * Stop or start the resource. Default to "false". + * Stop or start the resource. Default to "False". * When it's true, the data plane of the resource is shutdown. * When it's false, the data plane of the resource is started. */ resourceStopped?: string; + /** SocketIO settings for the resource */ + socketIO?: WebPubSubSocketIOSettings; } /** A class represent a replica resource. */ @@ -960,7 +976,7 @@ export enum KnownWebPubSubSkuTier { /** Standard */ Standard = "Standard", /** Premium */ - Premium = "Premium" + Premium = "Premium", } /** @@ -994,7 +1010,7 @@ export enum KnownProvisioningState { /** Deleting */ Deleting = "Deleting", /** Moving */ - Moving = "Moving" + Moving = "Moving", } /** @@ -1023,7 +1039,7 @@ export enum KnownPrivateLinkServiceConnectionStatus { /** Rejected */ Rejected = "Rejected", /** Disconnected */ - Disconnected = "Disconnected" + Disconnected = "Disconnected", } /** @@ -1047,7 +1063,7 @@ export enum KnownCreatedByType { /** ManagedIdentity */ ManagedIdentity = "ManagedIdentity", /** Key */ - Key = "Key" + Key = "Key", } /** @@ -1073,7 +1089,7 @@ export enum KnownSharedPrivateLinkResourceStatus { /** Disconnected */ Disconnected = "Disconnected", /** Timeout */ - Timeout = "Timeout" + Timeout = "Timeout", } /** @@ -1094,7 +1110,7 @@ export enum KnownACLAction { /** Allow */ Allow = "Allow", /** Deny */ - Deny = "Deny" + Deny = "Deny", } /** @@ -1116,7 +1132,7 @@ export enum KnownWebPubSubRequestType { /** Restapi */ Restapi = "RESTAPI", /** Trace */ - Trace = "Trace" + Trace = "Trace", } /** @@ -1136,7 +1152,7 @@ export enum KnownServiceKind { /** WebPubSub */ WebPubSub = "WebPubSub", /** SocketIO */ - SocketIO = "SocketIO" + SocketIO = "SocketIO", } /** @@ -1156,7 +1172,7 @@ export enum KnownManagedIdentityType { /** SystemAssigned */ SystemAssigned = "SystemAssigned", /** UserAssigned */ - UserAssigned = "UserAssigned" + UserAssigned = "UserAssigned", } /** @@ -1175,7 +1191,7 @@ export enum KnownUpstreamAuthType { /** None */ None = "None", /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity" + ManagedIdentity = "ManagedIdentity", } /** @@ -1191,7 +1207,7 @@ export type UpstreamAuthType = string; /** Known values of {@link EventListenerFilterDiscriminator} that the service accepts. */ export enum KnownEventListenerFilterDiscriminator { /** EventName */ - EventName = "EventName" + EventName = "EventName", } /** @@ -1206,7 +1222,7 @@ export type EventListenerFilterDiscriminator = string; /** Known values of {@link EventListenerEndpointDiscriminator} that the service accepts. */ export enum KnownEventListenerEndpointDiscriminator { /** EventHub */ - EventHub = "EventHub" + EventHub = "EventHub", } /** @@ -1225,7 +1241,7 @@ export enum KnownKeyType { /** Secondary */ Secondary = "Secondary", /** Salt */ - Salt = "Salt" + Salt = "Salt", } /** @@ -1246,7 +1262,7 @@ export enum KnownScaleType { /** Manual */ Manual = "Manual", /** Automatic */ - Automatic = "Automatic" + Automatic = "Automatic", } /** @@ -1431,7 +1447,8 @@ export interface WebPubSubCustomCertificatesCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type WebPubSubCustomCertificatesCreateOrUpdateResponse = CustomCertificate; +export type WebPubSubCustomCertificatesCreateOrUpdateResponse = + CustomCertificate; /** Optional parameters. */ export interface WebPubSubCustomCertificatesDeleteOptionalParams @@ -1533,21 +1550,24 @@ export interface WebPubSubPrivateEndpointConnectionsListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type WebPubSubPrivateEndpointConnectionsListResponse = PrivateEndpointConnectionList; +export type WebPubSubPrivateEndpointConnectionsListResponse = + PrivateEndpointConnectionList; /** Optional parameters. */ export interface WebPubSubPrivateEndpointConnectionsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type WebPubSubPrivateEndpointConnectionsGetResponse = PrivateEndpointConnection; +export type WebPubSubPrivateEndpointConnectionsGetResponse = + PrivateEndpointConnection; /** Optional parameters. */ export interface WebPubSubPrivateEndpointConnectionsUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the update operation. */ -export type WebPubSubPrivateEndpointConnectionsUpdateResponse = PrivateEndpointConnection; +export type WebPubSubPrivateEndpointConnectionsUpdateResponse = + PrivateEndpointConnection; /** Optional parameters. */ export interface WebPubSubPrivateEndpointConnectionsDeleteOptionalParams @@ -1563,7 +1583,8 @@ export interface WebPubSubPrivateEndpointConnectionsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type WebPubSubPrivateEndpointConnectionsListNextResponse = PrivateEndpointConnectionList; +export type WebPubSubPrivateEndpointConnectionsListNextResponse = + PrivateEndpointConnectionList; /** Optional parameters. */ export interface WebPubSubPrivateLinkResourcesListOptionalParams @@ -1577,7 +1598,8 @@ export interface WebPubSubPrivateLinkResourcesListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type WebPubSubPrivateLinkResourcesListNextResponse = PrivateLinkResourceList; +export type WebPubSubPrivateLinkResourcesListNextResponse = + PrivateLinkResourceList; /** Optional parameters. */ export interface WebPubSubReplicasListOptionalParams @@ -1640,19 +1662,58 @@ export interface WebPubSubReplicasListNextOptionalParams /** Contains response data for the listNext operation. */ export type WebPubSubReplicasListNextResponse = ReplicaList; +/** Optional parameters. */ +export interface WebPubSubReplicaSharedPrivateLinkResourcesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type WebPubSubReplicaSharedPrivateLinkResourcesListResponse = + SharedPrivateLinkResourceList; + +/** Optional parameters. */ +export interface WebPubSubReplicaSharedPrivateLinkResourcesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type WebPubSubReplicaSharedPrivateLinkResourcesGetResponse = + SharedPrivateLinkResource; + +/** Optional parameters. */ +export interface WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateOptionalParams + 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 WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateResponse = + SharedPrivateLinkResource; + +/** Optional parameters. */ +export interface WebPubSubReplicaSharedPrivateLinkResourcesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type WebPubSubReplicaSharedPrivateLinkResourcesListNextResponse = + SharedPrivateLinkResourceList; + /** Optional parameters. */ export interface WebPubSubSharedPrivateLinkResourcesListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type WebPubSubSharedPrivateLinkResourcesListResponse = SharedPrivateLinkResourceList; +export type WebPubSubSharedPrivateLinkResourcesListResponse = + SharedPrivateLinkResourceList; /** Optional parameters. */ export interface WebPubSubSharedPrivateLinkResourcesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type WebPubSubSharedPrivateLinkResourcesGetResponse = SharedPrivateLinkResource; +export type WebPubSubSharedPrivateLinkResourcesGetResponse = + SharedPrivateLinkResource; /** Optional parameters. */ export interface WebPubSubSharedPrivateLinkResourcesCreateOrUpdateOptionalParams @@ -1664,7 +1725,8 @@ export interface WebPubSubSharedPrivateLinkResourcesCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type WebPubSubSharedPrivateLinkResourcesCreateOrUpdateResponse = SharedPrivateLinkResource; +export type WebPubSubSharedPrivateLinkResourcesCreateOrUpdateResponse = + SharedPrivateLinkResource; /** Optional parameters. */ export interface WebPubSubSharedPrivateLinkResourcesDeleteOptionalParams @@ -1680,7 +1742,8 @@ export interface WebPubSubSharedPrivateLinkResourcesListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type WebPubSubSharedPrivateLinkResourcesListNextResponse = SharedPrivateLinkResourceList; +export type WebPubSubSharedPrivateLinkResourcesListNextResponse = + SharedPrivateLinkResourceList; /** Optional parameters. */ export interface WebPubSubManagementClientOptionalParams diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/mappers.ts b/sdk/web-pubsub/arm-webpubsub/src/models/mappers.ts index 129949e13ed6..90b67d62ce44 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/models/mappers.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/models/mappers.ts @@ -20,19 +20,19 @@ export const OperationList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" - } - } - } + className: "Operation", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Operation: coreClient.CompositeMapper = { @@ -43,37 +43,37 @@ export const Operation: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, isDataAction: { serializedName: "isDataAction", type: { - name: "Boolean" - } + name: "Boolean", + }, }, display: { serializedName: "display", type: { name: "Composite", - className: "OperationDisplay" - } + className: "OperationDisplay", + }, }, origin: { serializedName: "origin", type: { - name: "String" - } + name: "String", + }, }, properties: { serializedName: "properties", type: { name: "Composite", - className: "OperationProperties" - } - } - } - } + className: "OperationProperties", + }, + }, + }, + }, }; export const OperationDisplay: coreClient.CompositeMapper = { @@ -84,29 +84,29 @@ export const OperationDisplay: coreClient.CompositeMapper = { provider: { serializedName: "provider", type: { - name: "String" - } + name: "String", + }, }, resource: { serializedName: "resource", type: { - name: "String" - } + name: "String", + }, }, operation: { serializedName: "operation", type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationProperties: coreClient.CompositeMapper = { @@ -118,11 +118,11 @@ export const OperationProperties: coreClient.CompositeMapper = { serializedName: "serviceSpecification", type: { name: "Composite", - className: "ServiceSpecification" - } - } - } - } + className: "ServiceSpecification", + }, + }, + }, + }, }; export const ServiceSpecification: coreClient.CompositeMapper = { @@ -137,10 +137,10 @@ export const ServiceSpecification: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "MetricSpecification" - } - } - } + className: "MetricSpecification", + }, + }, + }, }, logSpecifications: { serializedName: "logSpecifications", @@ -149,13 +149,13 @@ export const ServiceSpecification: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "LogSpecification" - } - } - } - } - } - } + className: "LogSpecification", + }, + }, + }, + }, + }, + }, }; export const MetricSpecification: coreClient.CompositeMapper = { @@ -166,44 +166,44 @@ export const MetricSpecification: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, displayName: { serializedName: "displayName", type: { - name: "String" - } + name: "String", + }, }, displayDescription: { serializedName: "displayDescription", type: { - name: "String" - } + name: "String", + }, }, unit: { serializedName: "unit", type: { - name: "String" - } + name: "String", + }, }, aggregationType: { serializedName: "aggregationType", type: { - name: "String" - } + name: "String", + }, }, fillGapWithZero: { serializedName: "fillGapWithZero", type: { - name: "String" - } + name: "String", + }, }, category: { serializedName: "category", type: { - name: "String" - } + name: "String", + }, }, dimensions: { serializedName: "dimensions", @@ -212,13 +212,13 @@ export const MetricSpecification: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Dimension" - } - } - } - } - } - } + className: "Dimension", + }, + }, + }, + }, + }, + }, }; export const Dimension: coreClient.CompositeMapper = { @@ -229,29 +229,29 @@ export const Dimension: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, displayName: { serializedName: "displayName", type: { - name: "String" - } + name: "String", + }, }, internalName: { serializedName: "internalName", type: { - name: "String" - } + name: "String", + }, }, toBeExportedForShoebox: { serializedName: "toBeExportedForShoebox", type: { - name: "Boolean" - } - } - } - } + name: "Boolean", + }, + }, + }, + }, }; export const LogSpecification: coreClient.CompositeMapper = { @@ -262,17 +262,17 @@ export const LogSpecification: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, displayName: { serializedName: "displayName", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ErrorResponse: coreClient.CompositeMapper = { @@ -284,11 +284,11 @@ export const ErrorResponse: coreClient.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "ErrorDetail" - } - } - } - } + className: "ErrorDetail", + }, + }, + }, + }, }; export const ErrorDetail: coreClient.CompositeMapper = { @@ -300,22 +300,22 @@ export const ErrorDetail: coreClient.CompositeMapper = { serializedName: "code", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, target: { serializedName: "target", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, details: { serializedName: "details", @@ -325,10 +325,10 @@ export const ErrorDetail: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorDetail" - } - } - } + className: "ErrorDetail", + }, + }, + }, }, additionalInfo: { serializedName: "additionalInfo", @@ -338,13 +338,13 @@ export const ErrorDetail: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorAdditionalInfo" - } - } - } - } - } - } + className: "ErrorAdditionalInfo", + }, + }, + }, + }, + }, + }, }; export const ErrorAdditionalInfo: coreClient.CompositeMapper = { @@ -356,19 +356,19 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, info: { serializedName: "info", readOnly: true, type: { name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } + value: { type: { name: "any" } }, + }, + }, + }, + }, }; export const NameAvailabilityParameters: coreClient.CompositeMapper = { @@ -380,18 +380,18 @@ export const NameAvailabilityParameters: coreClient.CompositeMapper = { serializedName: "type", required: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const NameAvailability: coreClient.CompositeMapper = { @@ -402,23 +402,23 @@ export const NameAvailability: coreClient.CompositeMapper = { nameAvailable: { serializedName: "nameAvailable", type: { - name: "Boolean" - } + name: "Boolean", + }, }, reason: { serializedName: "reason", type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SignalRServiceUsageList: coreClient.CompositeMapper = { @@ -433,19 +433,19 @@ export const SignalRServiceUsageList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SignalRServiceUsage" - } - } - } + className: "SignalRServiceUsage", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SignalRServiceUsage: coreClient.CompositeMapper = { @@ -456,36 +456,36 @@ export const SignalRServiceUsage: coreClient.CompositeMapper = { id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, currentValue: { serializedName: "currentValue", type: { - name: "Number" - } + name: "Number", + }, }, limit: { serializedName: "limit", type: { - name: "Number" - } + name: "Number", + }, }, name: { serializedName: "name", type: { name: "Composite", - className: "SignalRServiceUsageName" - } + className: "SignalRServiceUsageName", + }, }, unit: { serializedName: "unit", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SignalRServiceUsageName: coreClient.CompositeMapper = { @@ -496,17 +496,17 @@ export const SignalRServiceUsageName: coreClient.CompositeMapper = { value: { serializedName: "value", type: { - name: "String" - } + name: "String", + }, }, localizedValue: { serializedName: "localizedValue", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const WebPubSubResourceList: coreClient.CompositeMapper = { @@ -521,19 +521,19 @@ export const WebPubSubResourceList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "WebPubSubResource" - } - } - } + className: "WebPubSubResource", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ResourceSku: coreClient.CompositeMapper = { @@ -545,37 +545,37 @@ export const ResourceSku: coreClient.CompositeMapper = { serializedName: "name", required: true, type: { - name: "String" - } + name: "String", + }, }, tier: { serializedName: "tier", type: { - name: "String" - } + name: "String", + }, }, size: { serializedName: "size", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, family: { serializedName: "family", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, capacity: { serializedName: "capacity", type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const PrivateEndpoint: coreClient.CompositeMapper = { @@ -586,11 +586,11 @@ export const PrivateEndpoint: coreClient.CompositeMapper = { id: { serializedName: "id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { @@ -601,23 +601,23 @@ export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { status: { serializedName: "status", type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", type: { - name: "String" - } + name: "String", + }, }, actionsRequired: { serializedName: "actionsRequired", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Resource: coreClient.CompositeMapper = { @@ -629,32 +629,32 @@ export const Resource: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, systemData: { serializedName: "systemData", type: { name: "Composite", - className: "SystemData" - } - } - } - } + className: "SystemData", + }, + }, + }, + }, }; export const SystemData: coreClient.CompositeMapper = { @@ -665,41 +665,41 @@ export const SystemData: coreClient.CompositeMapper = { createdBy: { serializedName: "createdBy", type: { - name: "String" - } + name: "String", + }, }, createdByType: { serializedName: "createdByType", type: { - name: "String" - } + name: "String", + }, }, createdAt: { serializedName: "createdAt", type: { - name: "DateTime" - } + name: "DateTime", + }, }, lastModifiedBy: { serializedName: "lastModifiedBy", type: { - name: "String" - } + name: "String", + }, }, lastModifiedByType: { serializedName: "lastModifiedByType", type: { - name: "String" - } + name: "String", + }, }, lastModifiedAt: { serializedName: "lastModifiedAt", type: { - name: "DateTime" - } - } - } - } + name: "DateTime", + }, + }, + }, + }, }; export const WebPubSubTlsSettings: coreClient.CompositeMapper = { @@ -711,11 +711,11 @@ export const WebPubSubTlsSettings: coreClient.CompositeMapper = { defaultValue: false, serializedName: "clientCertEnabled", type: { - name: "Boolean" - } - } - } - } + name: "Boolean", + }, + }, + }, + }, }; export const LiveTraceConfiguration: coreClient.CompositeMapper = { @@ -727,8 +727,8 @@ export const LiveTraceConfiguration: coreClient.CompositeMapper = { defaultValue: "false", serializedName: "enabled", type: { - name: "String" - } + name: "String", + }, }, categories: { serializedName: "categories", @@ -737,13 +737,13 @@ export const LiveTraceConfiguration: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "LiveTraceCategory" - } - } - } - } - } - } + className: "LiveTraceCategory", + }, + }, + }, + }, + }, + }, }; export const LiveTraceCategory: coreClient.CompositeMapper = { @@ -754,17 +754,17 @@ export const LiveTraceCategory: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, enabled: { serializedName: "enabled", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ResourceLogConfiguration: coreClient.CompositeMapper = { @@ -779,13 +779,13 @@ export const ResourceLogConfiguration: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ResourceLogCategory" - } - } - } - } - } - } + className: "ResourceLogCategory", + }, + }, + }, + }, + }, + }, }; export const ResourceLogCategory: coreClient.CompositeMapper = { @@ -796,17 +796,17 @@ export const ResourceLogCategory: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, enabled: { serializedName: "enabled", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const WebPubSubNetworkACLs: coreClient.CompositeMapper = { @@ -817,15 +817,15 @@ export const WebPubSubNetworkACLs: coreClient.CompositeMapper = { defaultAction: { serializedName: "defaultAction", type: { - name: "String" - } + name: "String", + }, }, publicNetwork: { serializedName: "publicNetwork", type: { name: "Composite", - className: "NetworkACL" - } + className: "NetworkACL", + }, }, privateEndpoints: { serializedName: "privateEndpoints", @@ -834,14 +834,14 @@ export const WebPubSubNetworkACLs: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateEndpointACL" - } - } - } + className: "PrivateEndpointACL", + }, + }, + }, }, ipRules: { constraints: { - MaxItems: 30 + MaxItems: 30, }, serializedName: "ipRules", type: { @@ -849,13 +849,13 @@ export const WebPubSubNetworkACLs: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "IPRule" - } - } - } - } - } - } + className: "IPRule", + }, + }, + }, + }, + }, + }, }; export const NetworkACL: coreClient.CompositeMapper = { @@ -869,10 +869,10 @@ export const NetworkACL: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, deny: { serializedName: "deny", @@ -880,13 +880,13 @@ export const NetworkACL: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } + name: "String", + }, + }, + }, + }, + }, + }, }; export const IPRule: coreClient.CompositeMapper = { @@ -897,17 +897,32 @@ export const IPRule: coreClient.CompositeMapper = { value: { serializedName: "value", type: { - name: "String" - } + name: "String", + }, }, action: { serializedName: "action", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, +}; + +export const WebPubSubSocketIOSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebPubSubSocketIOSettings", + modelProperties: { + serviceMode: { + serializedName: "serviceMode", + type: { + name: "String", + }, + }, + }, + }, }; export const ManagedIdentity: coreClient.CompositeMapper = { @@ -918,8 +933,8 @@ export const ManagedIdentity: coreClient.CompositeMapper = { type: { serializedName: "type", type: { - name: "String" - } + name: "String", + }, }, userAssignedIdentities: { serializedName: "userAssignedIdentities", @@ -928,27 +943,27 @@ export const ManagedIdentity: coreClient.CompositeMapper = { value: { type: { name: "Composite", - className: "UserAssignedIdentityProperty" - } - } - } + className: "UserAssignedIdentityProperty", + }, + }, + }, }, principalId: { serializedName: "principalId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, tenantId: { serializedName: "tenantId", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const UserAssignedIdentityProperty: coreClient.CompositeMapper = { @@ -960,18 +975,18 @@ export const UserAssignedIdentityProperty: coreClient.CompositeMapper = { serializedName: "principalId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, clientId: { serializedName: "clientId", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CustomCertificateList: coreClient.CompositeMapper = { @@ -986,19 +1001,19 @@ export const CustomCertificateList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "CustomCertificate" - } - } - } + className: "CustomCertificate", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CustomDomainList: coreClient.CompositeMapper = { @@ -1013,19 +1028,19 @@ export const CustomDomainList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "CustomDomain" - } - } - } + className: "CustomDomain", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ResourceReference: coreClient.CompositeMapper = { @@ -1036,11 +1051,11 @@ export const ResourceReference: coreClient.CompositeMapper = { id: { serializedName: "id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const WebPubSubHubList: coreClient.CompositeMapper = { @@ -1055,20 +1070,20 @@ export const WebPubSubHubList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "WebPubSubHub" - } - } - } + className: "WebPubSubHub", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const WebPubSubHubProperties: coreClient.CompositeMapper = { @@ -1083,10 +1098,10 @@ export const WebPubSubHubProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "EventHandler" - } - } - } + className: "EventHandler", + }, + }, + }, }, eventListeners: { serializedName: "eventListeners", @@ -1095,20 +1110,31 @@ export const WebPubSubHubProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "EventListener" - } - } - } + className: "EventListener", + }, + }, + }, }, anonymousConnectPolicy: { defaultValue: "deny", serializedName: "anonymousConnectPolicy", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + webSocketKeepAliveIntervalInSeconds: { + defaultValue: 20, + constraints: { + InclusiveMaximum: 120, + InclusiveMinimum: 1, + }, + serializedName: "webSocketKeepAliveIntervalInSeconds", + type: { + name: "Number", + }, + }, + }, + }, }; export const EventHandler: coreClient.CompositeMapper = { @@ -1120,14 +1146,14 @@ export const EventHandler: coreClient.CompositeMapper = { serializedName: "urlTemplate", required: true, type: { - name: "String" - } + name: "String", + }, }, userEventPattern: { serializedName: "userEventPattern", type: { - name: "String" - } + name: "String", + }, }, systemEvents: { serializedName: "systemEvents", @@ -1135,20 +1161,20 @@ export const EventHandler: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, auth: { serializedName: "auth", type: { name: "Composite", - className: "UpstreamAuthSettings" - } - } - } - } + className: "UpstreamAuthSettings", + }, + }, + }, + }, }; export const UpstreamAuthSettings: coreClient.CompositeMapper = { @@ -1159,18 +1185,18 @@ export const UpstreamAuthSettings: coreClient.CompositeMapper = { type: { serializedName: "type", type: { - name: "String" - } + name: "String", + }, }, managedIdentity: { serializedName: "managedIdentity", type: { name: "Composite", - className: "ManagedIdentitySettings" - } - } - } - } + className: "ManagedIdentitySettings", + }, + }, + }, + }, }; export const ManagedIdentitySettings: coreClient.CompositeMapper = { @@ -1181,11 +1207,11 @@ export const ManagedIdentitySettings: coreClient.CompositeMapper = { resource: { serializedName: "resource", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const EventListener: coreClient.CompositeMapper = { @@ -1197,18 +1223,18 @@ export const EventListener: coreClient.CompositeMapper = { serializedName: "filter", type: { name: "Composite", - className: "EventListenerFilter" - } + className: "EventListenerFilter", + }, }, endpoint: { serializedName: "endpoint", type: { name: "Composite", - className: "EventListenerEndpoint" - } - } - } - } + className: "EventListenerEndpoint", + }, + }, + }, + }, }; export const EventListenerFilter: coreClient.CompositeMapper = { @@ -1218,18 +1244,18 @@ export const EventListenerFilter: coreClient.CompositeMapper = { uberParent: "EventListenerFilter", polymorphicDiscriminator: { serializedName: "type", - clientName: "type" + clientName: "type", }, modelProperties: { type: { serializedName: "type", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const EventListenerEndpoint: coreClient.CompositeMapper = { @@ -1239,18 +1265,18 @@ export const EventListenerEndpoint: coreClient.CompositeMapper = { uberParent: "EventListenerEndpoint", polymorphicDiscriminator: { serializedName: "type", - clientName: "type" + clientName: "type", }, modelProperties: { type: { serializedName: "type", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const WebPubSubKeys: coreClient.CompositeMapper = { @@ -1261,29 +1287,29 @@ export const WebPubSubKeys: coreClient.CompositeMapper = { primaryKey: { serializedName: "primaryKey", type: { - name: "String" - } + name: "String", + }, }, secondaryKey: { serializedName: "secondaryKey", type: { - name: "String" - } + name: "String", + }, }, primaryConnectionString: { serializedName: "primaryConnectionString", type: { - name: "String" - } + name: "String", + }, }, secondaryConnectionString: { serializedName: "secondaryConnectionString", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PrivateEndpointConnectionList: coreClient.CompositeMapper = { @@ -1298,19 +1324,19 @@ export const PrivateEndpointConnectionList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateEndpointConnection" - } - } - } + className: "PrivateEndpointConnection", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PrivateLinkResourceList: coreClient.CompositeMapper = { @@ -1325,19 +1351,19 @@ export const PrivateLinkResourceList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateLinkResource" - } - } - } + className: "PrivateLinkResource", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ShareablePrivateLinkResourceType: coreClient.CompositeMapper = { @@ -1348,46 +1374,47 @@ export const ShareablePrivateLinkResourceType: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, properties: { serializedName: "properties", type: { name: "Composite", - className: "ShareablePrivateLinkResourceProperties" - } - } - } - } -}; - -export const ShareablePrivateLinkResourceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ShareablePrivateLinkResourceProperties", - modelProperties: { - description: { - serializedName: "description", - type: { - name: "String" - } + className: "ShareablePrivateLinkResourceProperties", + }, }, - groupId: { - serializedName: "groupId", + }, + }, +}; + +export const ShareablePrivateLinkResourceProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ShareablePrivateLinkResourceProperties", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + groupId: { + serializedName: "groupId", + type: { + name: "String", + }, + }, type: { - name: "String" - } + serializedName: "type", + type: { + name: "String", + }, + }, }, - type: { - serializedName: "type", - type: { - name: "String" - } - } - } - } -}; + }, + }; export const RegenerateKeyParameters: coreClient.CompositeMapper = { type: { @@ -1397,11 +1424,11 @@ export const RegenerateKeyParameters: coreClient.CompositeMapper = { keyType: { serializedName: "keyType", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ReplicaList: coreClient.CompositeMapper = { @@ -1416,19 +1443,46 @@ export const ReplicaList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Replica" - } - } - } + className: "Replica", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const SharedPrivateLinkResourceList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SharedPrivateLinkResourceList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SharedPrivateLinkResource", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SkuList: coreClient.CompositeMapper = { @@ -1444,20 +1498,20 @@ export const SkuList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Sku" - } - } - } + className: "Sku", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Sku: coreClient.CompositeMapper = { @@ -1469,25 +1523,25 @@ export const Sku: coreClient.CompositeMapper = { serializedName: "resourceType", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, sku: { serializedName: "sku", type: { name: "Composite", - className: "ResourceSku" - } + className: "ResourceSku", + }, }, capacity: { serializedName: "capacity", type: { name: "Composite", - className: "SkuCapacity" - } - } - } - } + className: "SkuCapacity", + }, + }, + }, + }, }; export const SkuCapacity: coreClient.CompositeMapper = { @@ -1499,22 +1553,22 @@ export const SkuCapacity: coreClient.CompositeMapper = { serializedName: "minimum", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, maximum: { serializedName: "maximum", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, default: { serializedName: "default", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, allowedValues: { serializedName: "allowedValues", @@ -1523,47 +1577,20 @@ export const SkuCapacity: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "Number" - } - } - } + name: "Number", + }, + }, + }, }, scaleType: { serializedName: "scaleType", readOnly: true, type: { - name: "String" - } - } - } - } -}; - -export const SharedPrivateLinkResourceList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SharedPrivateLinkResourceList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SharedPrivateLinkResource" - } - } - } + name: "String", + }, }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } + }, + }, }; export const ProxyResource: coreClient.CompositeMapper = { @@ -1571,9 +1598,9 @@ export const ProxyResource: coreClient.CompositeMapper = { name: "Composite", className: "ProxyResource", modelProperties: { - ...Resource.type.modelProperties - } - } + ...Resource.type.modelProperties, + }, + }, }; export const TrackedResource: coreClient.CompositeMapper = { @@ -1586,18 +1613,18 @@ export const TrackedResource: coreClient.CompositeMapper = { serializedName: "tags", type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, location: { serializedName: "location", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PrivateEndpointACL: coreClient.CompositeMapper = { @@ -1610,11 +1637,11 @@ export const PrivateEndpointACL: coreClient.CompositeMapper = { serializedName: "name", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const EventNameFilter: coreClient.CompositeMapper = { @@ -1632,19 +1659,19 @@ export const EventNameFilter: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, userEventPattern: { serializedName: "userEventPattern", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const EventHubEndpoint: coreClient.CompositeMapper = { @@ -1661,18 +1688,18 @@ export const EventHubEndpoint: coreClient.CompositeMapper = { serializedName: "fullyQualifiedNamespace", required: true, type: { - name: "String" - } + name: "String", + }, }, eventHubName: { serializedName: "eventHubName", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PrivateEndpointConnection: coreClient.CompositeMapper = { @@ -1685,15 +1712,15 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, privateEndpoint: { serializedName: "properties.privateEndpoint", type: { name: "Composite", - className: "PrivateEndpoint" - } + className: "PrivateEndpoint", + }, }, groupIds: { serializedName: "properties.groupIds", @@ -1702,20 +1729,20 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, privateLinkServiceConnectionState: { serializedName: "properties.privateLinkServiceConnectionState", type: { name: "Composite", - className: "PrivateLinkServiceConnectionState" - } - } - } - } + className: "PrivateLinkServiceConnectionState", + }, + }, + }, + }, }; export const SharedPrivateLinkResource: coreClient.CompositeMapper = { @@ -1727,37 +1754,37 @@ export const SharedPrivateLinkResource: coreClient.CompositeMapper = { groupId: { serializedName: "properties.groupId", type: { - name: "String" - } + name: "String", + }, }, privateLinkResourceId: { serializedName: "properties.privateLinkResourceId", type: { - name: "String" - } + name: "String", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, requestMessage: { serializedName: "properties.requestMessage", type: { - name: "String" - } + name: "String", + }, }, status: { serializedName: "properties.status", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CustomCertificate: coreClient.CompositeMapper = { @@ -1770,31 +1797,31 @@ export const CustomCertificate: coreClient.CompositeMapper = { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, keyVaultBaseUri: { serializedName: "properties.keyVaultBaseUri", required: true, type: { - name: "String" - } + name: "String", + }, }, keyVaultSecretName: { serializedName: "properties.keyVaultSecretName", required: true, type: { - name: "String" - } + name: "String", + }, }, keyVaultSecretVersion: { serializedName: "properties.keyVaultSecretVersion", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CustomDomain: coreClient.CompositeMapper = { @@ -1807,25 +1834,25 @@ export const CustomDomain: coreClient.CompositeMapper = { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, domainName: { serializedName: "properties.domainName", required: true, type: { - name: "String" - } + name: "String", + }, }, customCertificate: { serializedName: "properties.customCertificate", type: { name: "Composite", - className: "ResourceReference" - } - } - } - } + className: "ResourceReference", + }, + }, + }, + }, }; export const WebPubSubHub: coreClient.CompositeMapper = { @@ -1838,11 +1865,11 @@ export const WebPubSubHub: coreClient.CompositeMapper = { serializedName: "properties", type: { name: "Composite", - className: "WebPubSubHubProperties" - } - } - } - } + className: "WebPubSubHubProperties", + }, + }, + }, + }, }; export const PrivateLinkResource: coreClient.CompositeMapper = { @@ -1854,8 +1881,8 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { groupId: { serializedName: "properties.groupId", type: { - name: "String" - } + name: "String", + }, }, requiredMembers: { serializedName: "properties.requiredMembers", @@ -1863,10 +1890,10 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, requiredZoneNames: { serializedName: "properties.requiredZoneNames", @@ -1874,10 +1901,10 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, shareablePrivateLinkResourceTypes: { serializedName: "properties.shareablePrivateLinkResourceTypes", @@ -1886,13 +1913,13 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ShareablePrivateLinkResourceType" - } - } - } - } - } - } + className: "ShareablePrivateLinkResourceType", + }, + }, + }, + }, + }, + }, }; export const WebPubSubResource: coreClient.CompositeMapper = { @@ -1905,63 +1932,63 @@ export const WebPubSubResource: coreClient.CompositeMapper = { serializedName: "sku", type: { name: "Composite", - className: "ResourceSku" - } + className: "ResourceSku", + }, }, kind: { serializedName: "kind", type: { - name: "String" - } + name: "String", + }, }, identity: { serializedName: "identity", type: { name: "Composite", - className: "ManagedIdentity" - } + className: "ManagedIdentity", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, externalIP: { serializedName: "properties.externalIP", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, hostName: { serializedName: "properties.hostName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, publicPort: { serializedName: "properties.publicPort", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, serverPort: { serializedName: "properties.serverPort", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, version: { serializedName: "properties.version", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, privateEndpointConnections: { serializedName: "properties.privateEndpointConnections", @@ -1971,10 +1998,10 @@ export const WebPubSubResource: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateEndpointConnection" - } - } - } + className: "PrivateEndpointConnection", + }, + }, + }, }, sharedPrivateLinkResources: { serializedName: "properties.sharedPrivateLinkResources", @@ -1984,83 +2011,90 @@ export const WebPubSubResource: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SharedPrivateLinkResource" - } - } - } + className: "SharedPrivateLinkResource", + }, + }, + }, }, tls: { serializedName: "properties.tls", type: { name: "Composite", - className: "WebPubSubTlsSettings" - } + className: "WebPubSubTlsSettings", + }, }, hostNamePrefix: { serializedName: "properties.hostNamePrefix", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, liveTraceConfiguration: { serializedName: "properties.liveTraceConfiguration", type: { name: "Composite", - className: "LiveTraceConfiguration" - } + className: "LiveTraceConfiguration", + }, }, resourceLogConfiguration: { serializedName: "properties.resourceLogConfiguration", type: { name: "Composite", - className: "ResourceLogConfiguration" - } + className: "ResourceLogConfiguration", + }, }, networkACLs: { serializedName: "properties.networkACLs", type: { name: "Composite", - className: "WebPubSubNetworkACLs" - } + className: "WebPubSubNetworkACLs", + }, }, publicNetworkAccess: { defaultValue: "Enabled", serializedName: "properties.publicNetworkAccess", type: { - name: "String" - } + name: "String", + }, }, disableLocalAuth: { defaultValue: false, serializedName: "properties.disableLocalAuth", type: { - name: "Boolean" - } + name: "Boolean", + }, }, disableAadAuth: { defaultValue: false, serializedName: "properties.disableAadAuth", type: { - name: "Boolean" - } + name: "Boolean", + }, }, regionEndpointEnabled: { defaultValue: "Enabled", serializedName: "properties.regionEndpointEnabled", type: { - name: "String" - } + name: "String", + }, }, resourceStopped: { defaultValue: "false", serializedName: "properties.resourceStopped", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + socketIO: { + serializedName: "properties.socketIO", + type: { + name: "Composite", + className: "WebPubSubSocketIOSettings", + }, + }, + }, + }, }; export const Replica: coreClient.CompositeMapper = { @@ -2073,32 +2107,32 @@ export const Replica: coreClient.CompositeMapper = { serializedName: "sku", type: { name: "Composite", - className: "ResourceSku" - } + className: "ResourceSku", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, regionEndpointEnabled: { defaultValue: "Enabled", serializedName: "properties.regionEndpointEnabled", type: { - name: "String" - } + name: "String", + }, }, resourceStopped: { defaultValue: "false", serializedName: "properties.resourceStopped", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const WebPubSubUpdateHeaders: coreClient.CompositeMapper = { @@ -2109,11 +2143,11 @@ export const WebPubSubUpdateHeaders: coreClient.CompositeMapper = { location: { serializedName: "location", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const WebPubSubRegenerateKeyHeaders: coreClient.CompositeMapper = { @@ -2124,11 +2158,11 @@ export const WebPubSubRegenerateKeyHeaders: coreClient.CompositeMapper = { location: { serializedName: "location", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const WebPubSubRestartHeaders: coreClient.CompositeMapper = { @@ -2139,11 +2173,11 @@ export const WebPubSubRestartHeaders: coreClient.CompositeMapper = { location: { serializedName: "location", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const WebPubSubReplicasUpdateHeaders: coreClient.CompositeMapper = { @@ -2154,11 +2188,11 @@ export const WebPubSubReplicasUpdateHeaders: coreClient.CompositeMapper = { location: { serializedName: "location", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const WebPubSubReplicasRestartHeaders: coreClient.CompositeMapper = { @@ -2169,16 +2203,16 @@ export const WebPubSubReplicasRestartHeaders: coreClient.CompositeMapper = { location: { serializedName: "location", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export let discriminators = { EventListenerFilter: EventListenerFilter, EventListenerEndpoint: EventListenerEndpoint, "EventListenerFilter.EventName": EventNameFilter, - "EventListenerEndpoint.EventHub": EventHubEndpoint + "EventListenerEndpoint.EventHub": EventHubEndpoint, }; diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/parameters.ts b/sdk/web-pubsub/arm-webpubsub/src/models/parameters.ts index 64a21cfb7d2b..c8c304075390 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/models/parameters.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/models/parameters.ts @@ -9,7 +9,7 @@ import { OperationParameter, OperationURLParameter, - OperationQueryParameter + OperationQueryParameter, } from "@azure/core-client"; import { NameAvailabilityParameters as NameAvailabilityParametersMapper, @@ -20,7 +20,7 @@ import { WebPubSubHub as WebPubSubHubMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, Replica as ReplicaMapper, - SharedPrivateLinkResource as SharedPrivateLinkResourceMapper + SharedPrivateLinkResource as SharedPrivateLinkResourceMapper, } from "../models/mappers"; export const accept: OperationParameter = { @@ -30,9 +30,9 @@ export const accept: OperationParameter = { isConstant: true, serializedName: "Accept", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const $host: OperationURLParameter = { @@ -41,22 +41,22 @@ export const $host: OperationURLParameter = { serializedName: "$host", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-08-01-preview", + defaultValue: "2024-03-01", isConstant: true, serializedName: "api-version", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const nextLink: OperationURLParameter = { @@ -65,10 +65,10 @@ export const nextLink: OperationURLParameter = { serializedName: "nextLink", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const contentType: OperationParameter = { @@ -78,14 +78,14 @@ export const contentType: OperationParameter = { isConstant: true, serializedName: "Content-Type", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters: OperationParameter = { parameterPath: "parameters", - mapper: NameAvailabilityParametersMapper + mapper: NameAvailabilityParametersMapper, }; export const location: OperationURLParameter = { @@ -94,9 +94,9 @@ export const location: OperationURLParameter = { serializedName: "location", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const subscriptionId: OperationURLParameter = { @@ -105,9 +105,9 @@ export const subscriptionId: OperationURLParameter = { serializedName: "subscriptionId", required: true, type: { - name: "Uuid" - } - } + name: "Uuid", + }, + }, }; export const resourceGroupName: OperationURLParameter = { @@ -115,14 +115,14 @@ export const resourceGroupName: OperationURLParameter = { mapper: { constraints: { MaxLength: 90, - MinLength: 1 + MinLength: 1, }, serializedName: "resourceGroupName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const resourceName: OperationURLParameter = { @@ -131,24 +131,24 @@ export const resourceName: OperationURLParameter = { constraints: { Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$"), MaxLength: 63, - MinLength: 3 + MinLength: 3, }, serializedName: "resourceName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters1: OperationParameter = { parameterPath: "parameters", - mapper: WebPubSubResourceMapper + mapper: WebPubSubResourceMapper, }; export const parameters2: OperationParameter = { parameterPath: "parameters", - mapper: RegenerateKeyParametersMapper + mapper: RegenerateKeyParametersMapper, }; export const replicaName: OperationURLParameter = { @@ -157,14 +157,14 @@ export const replicaName: OperationURLParameter = { constraints: { Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$"), MaxLength: 63, - MinLength: 3 + MinLength: 3, }, serializedName: "replicaName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const certificateName: OperationURLParameter = { @@ -173,14 +173,14 @@ export const certificateName: OperationURLParameter = { serializedName: "certificateName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters3: OperationParameter = { parameterPath: "parameters", - mapper: CustomCertificateMapper + mapper: CustomCertificateMapper, }; export const name: OperationURLParameter = { @@ -189,14 +189,14 @@ export const name: OperationURLParameter = { serializedName: "name", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters4: OperationParameter = { parameterPath: "parameters", - mapper: CustomDomainMapper + mapper: CustomDomainMapper, }; export const hubName: OperationURLParameter = { @@ -205,14 +205,14 @@ export const hubName: OperationURLParameter = { serializedName: "hubName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters5: OperationParameter = { parameterPath: "parameters", - mapper: WebPubSubHubMapper + mapper: WebPubSubHubMapper, }; export const privateEndpointConnectionName: OperationURLParameter = { @@ -221,33 +221,38 @@ export const privateEndpointConnectionName: OperationURLParameter = { serializedName: "privateEndpointConnectionName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters6: OperationParameter = { parameterPath: "parameters", - mapper: PrivateEndpointConnectionMapper + mapper: PrivateEndpointConnectionMapper, }; export const parameters7: OperationParameter = { parameterPath: "parameters", - mapper: ReplicaMapper + mapper: ReplicaMapper, }; export const sharedPrivateLinkResourceName: OperationURLParameter = { parameterPath: "sharedPrivateLinkResourceName", mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$"), + MaxLength: 63, + MinLength: 3, + }, serializedName: "sharedPrivateLinkResourceName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters8: OperationParameter = { parameterPath: "parameters", - mapper: SharedPrivateLinkResourceMapper + mapper: SharedPrivateLinkResourceMapper, }; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/index.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/index.ts index 9ed9e9b6ad7f..f05d34e49c45 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/index.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/index.ts @@ -15,4 +15,5 @@ export * from "./webPubSubHubs"; export * from "./webPubSubPrivateEndpointConnections"; export * from "./webPubSubPrivateLinkResources"; export * from "./webPubSubReplicas"; +export * from "./webPubSubReplicaSharedPrivateLinkResources"; export * from "./webPubSubSharedPrivateLinkResources"; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/operations.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/operations.ts index fc781a2dc1b7..4044930fa7bf 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/operations.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/operations.ts @@ -18,7 +18,7 @@ import { OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, - OperationsListNextResponse + OperationsListNextResponse, } from "../models"; /// @@ -39,7 +39,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ public list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -54,13 +54,13 @@ export class OperationsImpl implements Operations { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: OperationsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: OperationsListResponse; let continuationToken = settings?.continuationToken; @@ -81,7 +81,7 @@ export class OperationsImpl implements Operations { } private async *listPagingAll( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -93,7 +93,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ private _list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -105,11 +105,11 @@ export class OperationsImpl implements Operations { */ private _listNext( nextLink: string, - options?: OperationsListNextOptionalParams + options?: OperationsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -121,29 +121,29 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationList + bodyMapper: Mappers.OperationList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationList + bodyMapper: Mappers.OperationList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/usages.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/usages.ts index ac480859b87d..b8659496b1d0 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/usages.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/usages.ts @@ -18,7 +18,7 @@ import { UsagesListNextOptionalParams, UsagesListOptionalParams, UsagesListResponse, - UsagesListNextResponse + UsagesListNextResponse, } from "../models"; /// @@ -41,7 +41,7 @@ export class UsagesImpl implements Usages { */ public list( location: string, - options?: UsagesListOptionalParams + options?: UsagesListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(location, options); return { @@ -56,14 +56,14 @@ export class UsagesImpl implements Usages { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(location, options, settings); - } + }, }; } private async *listPagingPage( location: string, options?: UsagesListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: UsagesListResponse; let continuationToken = settings?.continuationToken; @@ -85,7 +85,7 @@ export class UsagesImpl implements Usages { private async *listPagingAll( location: string, - options?: UsagesListOptionalParams + options?: UsagesListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(location, options)) { yield* page; @@ -99,11 +99,11 @@ export class UsagesImpl implements Usages { */ private _list( location: string, - options?: UsagesListOptionalParams + options?: UsagesListOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, options }, - listOperationSpec + listOperationSpec, ); } @@ -116,11 +116,11 @@ export class UsagesImpl implements Usages { private _listNext( location: string, nextLink: string, - options?: UsagesListNextOptionalParams + options?: UsagesListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -128,43 +128,42 @@ export class UsagesImpl implements Usages { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/usages", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/usages", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SignalRServiceUsageList + bodyMapper: Mappers.SignalRServiceUsageList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.location, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SignalRServiceUsageList + bodyMapper: Mappers.SignalRServiceUsageList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.nextLink, Parameters.location, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSub.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSub.ts index 1345ecee8e82..560128ece30c 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSub.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSub.ts @@ -16,7 +16,7 @@ import { WebPubSubManagementClient } from "../webPubSubManagementClient"; import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -49,7 +49,7 @@ import { WebPubSubListSkusOptionalParams, WebPubSubListSkusResponse, WebPubSubListBySubscriptionNextResponse, - WebPubSubListByResourceGroupNextResponse + WebPubSubListByResourceGroupNextResponse, } from "../models"; /// @@ -70,7 +70,7 @@ export class WebPubSubImpl implements WebPubSub { * @param options The options parameters. */ public listBySubscription( - options?: WebPubSubListBySubscriptionOptionalParams + options?: WebPubSubListBySubscriptionOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listBySubscriptionPagingAll(options); return { @@ -85,13 +85,13 @@ export class WebPubSubImpl implements WebPubSub { throw new Error("maxPageSize is not supported by this operation."); } return this.listBySubscriptionPagingPage(options, settings); - } + }, }; } private async *listBySubscriptionPagingPage( options?: WebPubSubListBySubscriptionOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: WebPubSubListBySubscriptionResponse; let continuationToken = settings?.continuationToken; @@ -112,7 +112,7 @@ export class WebPubSubImpl implements WebPubSub { } private async *listBySubscriptionPagingAll( - options?: WebPubSubListBySubscriptionOptionalParams + options?: WebPubSubListBySubscriptionOptionalParams, ): AsyncIterableIterator { for await (const page of this.listBySubscriptionPagingPage(options)) { yield* page; @@ -126,7 +126,7 @@ export class WebPubSubImpl implements WebPubSub { */ public listByResourceGroup( resourceGroupName: string, - options?: WebPubSubListByResourceGroupOptionalParams + options?: WebPubSubListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); return { @@ -143,16 +143,16 @@ export class WebPubSubImpl implements WebPubSub { return this.listByResourceGroupPagingPage( resourceGroupName, options, - settings + settings, ); - } + }, }; } private async *listByResourceGroupPagingPage( resourceGroupName: string, options?: WebPubSubListByResourceGroupOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: WebPubSubListByResourceGroupResponse; let continuationToken = settings?.continuationToken; @@ -167,7 +167,7 @@ export class WebPubSubImpl implements WebPubSub { result = await this._listByResourceGroupNext( resourceGroupName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -178,11 +178,11 @@ export class WebPubSubImpl implements WebPubSub { private async *listByResourceGroupPagingAll( resourceGroupName: string, - options?: WebPubSubListByResourceGroupOptionalParams + options?: WebPubSubListByResourceGroupOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByResourceGroupPagingPage( resourceGroupName, - options + options, )) { yield* page; } @@ -197,11 +197,11 @@ export class WebPubSubImpl implements WebPubSub { checkNameAvailability( location: string, parameters: NameAvailabilityParameters, - options?: WebPubSubCheckNameAvailabilityOptionalParams + options?: WebPubSubCheckNameAvailabilityOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, parameters, options }, - checkNameAvailabilityOperationSpec + checkNameAvailabilityOperationSpec, ); } @@ -210,11 +210,11 @@ export class WebPubSubImpl implements WebPubSub { * @param options The options parameters. */ private _listBySubscription( - options?: WebPubSubListBySubscriptionOptionalParams + options?: WebPubSubListBySubscriptionOptionalParams, ): Promise { return this.client.sendOperationRequest( { options }, - listBySubscriptionOperationSpec + listBySubscriptionOperationSpec, ); } @@ -225,11 +225,11 @@ export class WebPubSubImpl implements WebPubSub { */ private _listByResourceGroup( resourceGroupName: string, - options?: WebPubSubListByResourceGroupOptionalParams + options?: WebPubSubListByResourceGroupOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, options }, - listByResourceGroupOperationSpec + listByResourceGroupOperationSpec, ); } @@ -242,11 +242,11 @@ export class WebPubSubImpl implements WebPubSub { get( resourceGroupName: string, resourceName: string, - options?: WebPubSubGetOptionalParams + options?: WebPubSubGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, options }, - getOperationSpec + getOperationSpec, ); } @@ -261,7 +261,7 @@ export class WebPubSubImpl implements WebPubSub { resourceGroupName: string, resourceName: string, parameters: WebPubSubResource, - options?: WebPubSubCreateOrUpdateOptionalParams + options?: WebPubSubCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -270,21 +270,20 @@ export class WebPubSubImpl implements WebPubSub { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -293,8 +292,8 @@ export class WebPubSubImpl implements WebPubSub { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -302,15 +301,15 @@ export class WebPubSubImpl implements WebPubSub { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, resourceName, parameters, options }, - spec: createOrUpdateOperationSpec + spec: createOrUpdateOperationSpec, }); const poller = await createHttpPoller< WebPubSubCreateOrUpdateResponse, @@ -318,7 +317,7 @@ export class WebPubSubImpl implements WebPubSub { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -335,13 +334,13 @@ export class WebPubSubImpl implements WebPubSub { resourceGroupName: string, resourceName: string, parameters: WebPubSubResource, - options?: WebPubSubCreateOrUpdateOptionalParams + options?: WebPubSubCreateOrUpdateOptionalParams, ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, resourceName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -355,25 +354,24 @@ export class WebPubSubImpl implements WebPubSub { async beginDelete( resourceGroupName: string, resourceName: string, - options?: WebPubSubDeleteOptionalParams + options?: WebPubSubDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -382,8 +380,8 @@ export class WebPubSubImpl implements WebPubSub { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -391,20 +389,20 @@ export class WebPubSubImpl implements WebPubSub { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, resourceName, options }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" + resourceLocationConfig: "location", }); await poller.poll(); return poller; @@ -419,12 +417,12 @@ export class WebPubSubImpl implements WebPubSub { async beginDeleteAndWait( resourceGroupName: string, resourceName: string, - options?: WebPubSubDeleteOptionalParams + options?: WebPubSubDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, resourceName, - options + options, ); return poller.pollUntilDone(); } @@ -440,7 +438,7 @@ export class WebPubSubImpl implements WebPubSub { resourceGroupName: string, resourceName: string, parameters: WebPubSubResource, - options?: WebPubSubUpdateOptionalParams + options?: WebPubSubUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -449,21 +447,20 @@ export class WebPubSubImpl implements WebPubSub { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -472,8 +469,8 @@ export class WebPubSubImpl implements WebPubSub { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -481,15 +478,15 @@ export class WebPubSubImpl implements WebPubSub { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, resourceName, parameters, options }, - spec: updateOperationSpec + spec: updateOperationSpec, }); const poller = await createHttpPoller< WebPubSubUpdateResponse, @@ -497,7 +494,7 @@ export class WebPubSubImpl implements WebPubSub { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" + resourceLocationConfig: "location", }); await poller.poll(); return poller; @@ -514,13 +511,13 @@ export class WebPubSubImpl implements WebPubSub { resourceGroupName: string, resourceName: string, parameters: WebPubSubResource, - options?: WebPubSubUpdateOptionalParams + options?: WebPubSubUpdateOptionalParams, ): Promise { const poller = await this.beginUpdate( resourceGroupName, resourceName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -534,11 +531,11 @@ export class WebPubSubImpl implements WebPubSub { listKeys( resourceGroupName: string, resourceName: string, - options?: WebPubSubListKeysOptionalParams + options?: WebPubSubListKeysOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, options }, - listKeysOperationSpec + listKeysOperationSpec, ); } @@ -554,7 +551,7 @@ export class WebPubSubImpl implements WebPubSub { resourceGroupName: string, resourceName: string, parameters: RegenerateKeyParameters, - options?: WebPubSubRegenerateKeyOptionalParams + options?: WebPubSubRegenerateKeyOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -563,21 +560,20 @@ export class WebPubSubImpl implements WebPubSub { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -586,8 +582,8 @@ export class WebPubSubImpl implements WebPubSub { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -595,15 +591,15 @@ export class WebPubSubImpl implements WebPubSub { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, resourceName, parameters, options }, - spec: regenerateKeyOperationSpec + spec: regenerateKeyOperationSpec, }); const poller = await createHttpPoller< WebPubSubRegenerateKeyResponse, @@ -611,7 +607,7 @@ export class WebPubSubImpl implements WebPubSub { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" + resourceLocationConfig: "location", }); await poller.poll(); return poller; @@ -629,13 +625,13 @@ export class WebPubSubImpl implements WebPubSub { resourceGroupName: string, resourceName: string, parameters: RegenerateKeyParameters, - options?: WebPubSubRegenerateKeyOptionalParams + options?: WebPubSubRegenerateKeyOptionalParams, ): Promise { const poller = await this.beginRegenerateKey( resourceGroupName, resourceName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -651,11 +647,11 @@ export class WebPubSubImpl implements WebPubSub { resourceGroupName: string, resourceName: string, replicaName: string, - options?: WebPubSubListReplicaSkusOptionalParams + options?: WebPubSubListReplicaSkusOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, replicaName, options }, - listReplicaSkusOperationSpec + listReplicaSkusOperationSpec, ); } @@ -668,7 +664,7 @@ export class WebPubSubImpl implements WebPubSub { async beginRestart( resourceGroupName: string, resourceName: string, - options?: WebPubSubRestartOptionalParams + options?: WebPubSubRestartOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -677,21 +673,20 @@ export class WebPubSubImpl implements WebPubSub { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -700,8 +695,8 @@ export class WebPubSubImpl implements WebPubSub { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -709,15 +704,15 @@ export class WebPubSubImpl implements WebPubSub { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, resourceName, options }, - spec: restartOperationSpec + spec: restartOperationSpec, }); const poller = await createHttpPoller< WebPubSubRestartResponse, @@ -725,7 +720,7 @@ export class WebPubSubImpl implements WebPubSub { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" + resourceLocationConfig: "location", }); await poller.poll(); return poller; @@ -740,12 +735,12 @@ export class WebPubSubImpl implements WebPubSub { async beginRestartAndWait( resourceGroupName: string, resourceName: string, - options?: WebPubSubRestartOptionalParams + options?: WebPubSubRestartOptionalParams, ): Promise { const poller = await this.beginRestart( resourceGroupName, resourceName, - options + options, ); return poller.pollUntilDone(); } @@ -759,11 +754,11 @@ export class WebPubSubImpl implements WebPubSub { listSkus( resourceGroupName: string, resourceName: string, - options?: WebPubSubListSkusOptionalParams + options?: WebPubSubListSkusOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, options }, - listSkusOperationSpec + listSkusOperationSpec, ); } @@ -774,11 +769,11 @@ export class WebPubSubImpl implements WebPubSub { */ private _listBySubscriptionNext( nextLink: string, - options?: WebPubSubListBySubscriptionNextOptionalParams + options?: WebPubSubListBySubscriptionNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listBySubscriptionNextOperationSpec + listBySubscriptionNextOperationSpec, ); } @@ -791,11 +786,11 @@ export class WebPubSubImpl implements WebPubSub { private _listByResourceGroupNext( resourceGroupName: string, nextLink: string, - options?: WebPubSubListByResourceGroupNextOptionalParams + options?: WebPubSubListByResourceGroupNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec + listByResourceGroupNextOperationSpec, ); } } @@ -803,108 +798,103 @@ export class WebPubSubImpl implements WebPubSub { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.NameAvailability + bodyMapper: Mappers.NameAvailability, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.parameters, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.location, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/webPubSub", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/webPubSub", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.WebPubSubResourceList + bodyMapper: Mappers.WebPubSubResourceList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.WebPubSubResourceList + bodyMapper: Mappers.WebPubSubResourceList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.WebPubSubResource + bodyMapper: Mappers.WebPubSubResource, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.WebPubSubResource + bodyMapper: Mappers.WebPubSubResource, }, 201: { - bodyMapper: Mappers.WebPubSubResource + bodyMapper: Mappers.WebPubSubResource, }, 202: { - bodyMapper: Mappers.WebPubSubResource + bodyMapper: Mappers.WebPubSubResource, }, 204: { - bodyMapper: Mappers.WebPubSubResource + bodyMapper: Mappers.WebPubSubResource, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.parameters1, queryParameters: [Parameters.apiVersion], @@ -912,15 +902,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}", httpMethod: "DELETE", responses: { 200: {}, @@ -928,39 +917,38 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}", httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.WebPubSubResource + bodyMapper: Mappers.WebPubSubResource, }, 201: { - bodyMapper: Mappers.WebPubSubResource + bodyMapper: Mappers.WebPubSubResource, }, 202: { - bodyMapper: Mappers.WebPubSubResource + bodyMapper: Mappers.WebPubSubResource, }, 204: { - bodyMapper: Mappers.WebPubSubResource + bodyMapper: Mappers.WebPubSubResource, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.parameters1, queryParameters: [Parameters.apiVersion], @@ -968,54 +956,52 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listKeysOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/listKeys", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/listKeys", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.WebPubSubKeys + bodyMapper: Mappers.WebPubSubKeys, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const regenerateKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/regenerateKey", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/regenerateKey", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.WebPubSubKeys + bodyMapper: Mappers.WebPubSubKeys, }, 201: { - bodyMapper: Mappers.WebPubSubKeys + bodyMapper: Mappers.WebPubSubKeys, }, 202: { - bodyMapper: Mappers.WebPubSubKeys + bodyMapper: Mappers.WebPubSubKeys, }, 204: { - bodyMapper: Mappers.WebPubSubKeys + bodyMapper: Mappers.WebPubSubKeys, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.parameters2, queryParameters: [Parameters.apiVersion], @@ -1023,23 +1009,22 @@ const regenerateKeyOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listReplicaSkusOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/skus", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/skus", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SkuList + bodyMapper: Mappers.SkuList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -1047,100 +1032,98 @@ const listReplicaSkusOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.replicaName + Parameters.replicaName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const restartOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/restart", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/restart", httpMethod: "POST", responses: { 200: { - headersMapper: Mappers.WebPubSubRestartHeaders + headersMapper: Mappers.WebPubSubRestartHeaders, }, 201: { - headersMapper: Mappers.WebPubSubRestartHeaders + headersMapper: Mappers.WebPubSubRestartHeaders, }, 202: { - headersMapper: Mappers.WebPubSubRestartHeaders + headersMapper: Mappers.WebPubSubRestartHeaders, }, 204: { - headersMapper: Mappers.WebPubSubRestartHeaders + headersMapper: Mappers.WebPubSubRestartHeaders, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listSkusOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/skus", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/skus", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SkuList + bodyMapper: Mappers.SkuList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.WebPubSubResourceList + bodyMapper: Mappers.WebPubSubResourceList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.nextLink, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.WebPubSubResourceList + bodyMapper: Mappers.WebPubSubResourceList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.nextLink, Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomCertificates.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomCertificates.ts index af8d6d50a43d..4eba09f5d3fc 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomCertificates.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomCertificates.ts @@ -16,7 +16,7 @@ import { WebPubSubManagementClient } from "../webPubSubManagementClient"; import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -29,13 +29,14 @@ import { WebPubSubCustomCertificatesCreateOrUpdateOptionalParams, WebPubSubCustomCertificatesCreateOrUpdateResponse, WebPubSubCustomCertificatesDeleteOptionalParams, - WebPubSubCustomCertificatesListNextResponse + WebPubSubCustomCertificatesListNextResponse, } from "../models"; /// /** Class containing WebPubSubCustomCertificates operations. */ export class WebPubSubCustomCertificatesImpl - implements WebPubSubCustomCertificates { + implements WebPubSubCustomCertificates +{ private readonly client: WebPubSubManagementClient; /** @@ -55,7 +56,7 @@ export class WebPubSubCustomCertificatesImpl public list( resourceGroupName: string, resourceName: string, - options?: WebPubSubCustomCertificatesListOptionalParams + options?: WebPubSubCustomCertificatesListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(resourceGroupName, resourceName, options); return { @@ -73,9 +74,9 @@ export class WebPubSubCustomCertificatesImpl resourceGroupName, resourceName, options, - settings + settings, ); - } + }, }; } @@ -83,7 +84,7 @@ export class WebPubSubCustomCertificatesImpl resourceGroupName: string, resourceName: string, options?: WebPubSubCustomCertificatesListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: WebPubSubCustomCertificatesListResponse; let continuationToken = settings?.continuationToken; @@ -99,7 +100,7 @@ export class WebPubSubCustomCertificatesImpl resourceGroupName, resourceName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -111,12 +112,12 @@ export class WebPubSubCustomCertificatesImpl private async *listPagingAll( resourceGroupName: string, resourceName: string, - options?: WebPubSubCustomCertificatesListOptionalParams + options?: WebPubSubCustomCertificatesListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage( resourceGroupName, resourceName, - options + options, )) { yield* page; } @@ -131,11 +132,11 @@ export class WebPubSubCustomCertificatesImpl private _list( resourceGroupName: string, resourceName: string, - options?: WebPubSubCustomCertificatesListOptionalParams + options?: WebPubSubCustomCertificatesListOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, options }, - listOperationSpec + listOperationSpec, ); } @@ -150,11 +151,11 @@ export class WebPubSubCustomCertificatesImpl resourceGroupName: string, resourceName: string, certificateName: string, - options?: WebPubSubCustomCertificatesGetOptionalParams + options?: WebPubSubCustomCertificatesGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, certificateName, options }, - getOperationSpec + getOperationSpec, ); } @@ -171,7 +172,7 @@ export class WebPubSubCustomCertificatesImpl resourceName: string, certificateName: string, parameters: CustomCertificate, - options?: WebPubSubCustomCertificatesCreateOrUpdateOptionalParams + options?: WebPubSubCustomCertificatesCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -180,21 +181,20 @@ export class WebPubSubCustomCertificatesImpl > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -203,8 +203,8 @@ export class WebPubSubCustomCertificatesImpl ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -212,8 +212,8 @@ export class WebPubSubCustomCertificatesImpl rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -224,9 +224,9 @@ export class WebPubSubCustomCertificatesImpl resourceName, certificateName, parameters, - options + options, }, - spec: createOrUpdateOperationSpec + spec: createOrUpdateOperationSpec, }); const poller = await createHttpPoller< WebPubSubCustomCertificatesCreateOrUpdateResponse, @@ -234,7 +234,7 @@ export class WebPubSubCustomCertificatesImpl >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -253,14 +253,14 @@ export class WebPubSubCustomCertificatesImpl resourceName: string, certificateName: string, parameters: CustomCertificate, - options?: WebPubSubCustomCertificatesCreateOrUpdateOptionalParams + options?: WebPubSubCustomCertificatesCreateOrUpdateOptionalParams, ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, resourceName, certificateName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -276,11 +276,11 @@ export class WebPubSubCustomCertificatesImpl resourceGroupName: string, resourceName: string, certificateName: string, - options?: WebPubSubCustomCertificatesDeleteOptionalParams + options?: WebPubSubCustomCertificatesDeleteOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, certificateName, options }, - deleteOperationSpec + deleteOperationSpec, ); } @@ -295,11 +295,11 @@ export class WebPubSubCustomCertificatesImpl resourceGroupName: string, resourceName: string, nextLink: string, - options?: WebPubSubCustomCertificatesListNextOptionalParams + options?: WebPubSubCustomCertificatesListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -307,38 +307,36 @@ export class WebPubSubCustomCertificatesImpl const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CustomCertificateList + bodyMapper: Mappers.CustomCertificateList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates/{certificateName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates/{certificateName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CustomCertificate + bodyMapper: Mappers.CustomCertificate, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -346,31 +344,30 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.certificateName + Parameters.certificateName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates/{certificateName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates/{certificateName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.CustomCertificate + bodyMapper: Mappers.CustomCertificate, }, 201: { - bodyMapper: Mappers.CustomCertificate + bodyMapper: Mappers.CustomCertificate, }, 202: { - bodyMapper: Mappers.CustomCertificate + bodyMapper: Mappers.CustomCertificate, }, 204: { - bodyMapper: Mappers.CustomCertificate + bodyMapper: Mappers.CustomCertificate, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.parameters3, queryParameters: [Parameters.apiVersion], @@ -379,22 +376,21 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.certificateName + Parameters.certificateName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates/{certificateName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates/{certificateName}", httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -402,29 +398,29 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.certificateName + Parameters.certificateName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CustomCertificateList + bodyMapper: Mappers.CustomCertificateList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.nextLink, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomDomains.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomDomains.ts index 6422056e0a06..a21084c4edb9 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomDomains.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubCustomDomains.ts @@ -16,7 +16,7 @@ import { WebPubSubManagementClient } from "../webPubSubManagementClient"; import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -29,7 +29,7 @@ import { WebPubSubCustomDomainsCreateOrUpdateOptionalParams, WebPubSubCustomDomainsCreateOrUpdateResponse, WebPubSubCustomDomainsDeleteOptionalParams, - WebPubSubCustomDomainsListNextResponse + WebPubSubCustomDomainsListNextResponse, } from "../models"; /// @@ -54,7 +54,7 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { public list( resourceGroupName: string, resourceName: string, - options?: WebPubSubCustomDomainsListOptionalParams + options?: WebPubSubCustomDomainsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(resourceGroupName, resourceName, options); return { @@ -72,9 +72,9 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { resourceGroupName, resourceName, options, - settings + settings, ); - } + }, }; } @@ -82,7 +82,7 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { resourceGroupName: string, resourceName: string, options?: WebPubSubCustomDomainsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: WebPubSubCustomDomainsListResponse; let continuationToken = settings?.continuationToken; @@ -98,7 +98,7 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { resourceGroupName, resourceName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -110,12 +110,12 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { private async *listPagingAll( resourceGroupName: string, resourceName: string, - options?: WebPubSubCustomDomainsListOptionalParams + options?: WebPubSubCustomDomainsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage( resourceGroupName, resourceName, - options + options, )) { yield* page; } @@ -130,11 +130,11 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { private _list( resourceGroupName: string, resourceName: string, - options?: WebPubSubCustomDomainsListOptionalParams + options?: WebPubSubCustomDomainsListOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, options }, - listOperationSpec + listOperationSpec, ); } @@ -149,11 +149,11 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { resourceGroupName: string, resourceName: string, name: string, - options?: WebPubSubCustomDomainsGetOptionalParams + options?: WebPubSubCustomDomainsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, name, options }, - getOperationSpec + getOperationSpec, ); } @@ -170,7 +170,7 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { resourceName: string, name: string, parameters: CustomDomain, - options?: WebPubSubCustomDomainsCreateOrUpdateOptionalParams + options?: WebPubSubCustomDomainsCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -179,21 +179,20 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -202,8 +201,8 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -211,15 +210,15 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, resourceName, name, parameters, options }, - spec: createOrUpdateOperationSpec + spec: createOrUpdateOperationSpec, }); const poller = await createHttpPoller< WebPubSubCustomDomainsCreateOrUpdateResponse, @@ -227,7 +226,7 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -246,14 +245,14 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { resourceName: string, name: string, parameters: CustomDomain, - options?: WebPubSubCustomDomainsCreateOrUpdateOptionalParams + options?: WebPubSubCustomDomainsCreateOrUpdateOptionalParams, ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, resourceName, name, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -269,25 +268,24 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { resourceGroupName: string, resourceName: string, name: string, - options?: WebPubSubCustomDomainsDeleteOptionalParams + options?: WebPubSubCustomDomainsDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -296,8 +294,8 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -305,20 +303,20 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, resourceName, name, options }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" + resourceLocationConfig: "location", }); await poller.poll(); return poller; @@ -335,13 +333,13 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { resourceGroupName: string, resourceName: string, name: string, - options?: WebPubSubCustomDomainsDeleteOptionalParams + options?: WebPubSubCustomDomainsDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, resourceName, name, - options + options, ); return poller.pollUntilDone(); } @@ -357,11 +355,11 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { resourceGroupName: string, resourceName: string, nextLink: string, - options?: WebPubSubCustomDomainsListNextOptionalParams + options?: WebPubSubCustomDomainsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -369,38 +367,36 @@ export class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CustomDomainList + bodyMapper: Mappers.CustomDomainList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains/{name}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains/{name}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CustomDomain + bodyMapper: Mappers.CustomDomain, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -408,31 +404,30 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.name + Parameters.name, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains/{name}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains/{name}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.CustomDomain + bodyMapper: Mappers.CustomDomain, }, 201: { - bodyMapper: Mappers.CustomDomain + bodyMapper: Mappers.CustomDomain, }, 202: { - bodyMapper: Mappers.CustomDomain + bodyMapper: Mappers.CustomDomain, }, 204: { - bodyMapper: Mappers.CustomDomain + bodyMapper: Mappers.CustomDomain, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.parameters4, queryParameters: [Parameters.apiVersion], @@ -441,15 +436,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.name + Parameters.name, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains/{name}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains/{name}", httpMethod: "DELETE", responses: { 200: {}, @@ -457,8 +451,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -466,29 +460,29 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.name + Parameters.name, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CustomDomainList + bodyMapper: Mappers.CustomDomainList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.nextLink, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubHubs.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubHubs.ts index 4468015ac036..7d2e9f848e32 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubHubs.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubHubs.ts @@ -16,7 +16,7 @@ import { WebPubSubManagementClient } from "../webPubSubManagementClient"; import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -29,7 +29,7 @@ import { WebPubSubHubsCreateOrUpdateOptionalParams, WebPubSubHubsCreateOrUpdateResponse, WebPubSubHubsDeleteOptionalParams, - WebPubSubHubsListNextResponse + WebPubSubHubsListNextResponse, } from "../models"; /// @@ -54,7 +54,7 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { public list( resourceGroupName: string, resourceName: string, - options?: WebPubSubHubsListOptionalParams + options?: WebPubSubHubsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(resourceGroupName, resourceName, options); return { @@ -72,9 +72,9 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { resourceGroupName, resourceName, options, - settings + settings, ); - } + }, }; } @@ -82,7 +82,7 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { resourceGroupName: string, resourceName: string, options?: WebPubSubHubsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: WebPubSubHubsListResponse; let continuationToken = settings?.continuationToken; @@ -98,7 +98,7 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { resourceGroupName, resourceName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -110,12 +110,12 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { private async *listPagingAll( resourceGroupName: string, resourceName: string, - options?: WebPubSubHubsListOptionalParams + options?: WebPubSubHubsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage( resourceGroupName, resourceName, - options + options, )) { yield* page; } @@ -130,11 +130,11 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { private _list( resourceGroupName: string, resourceName: string, - options?: WebPubSubHubsListOptionalParams + options?: WebPubSubHubsListOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, options }, - listOperationSpec + listOperationSpec, ); } @@ -149,11 +149,11 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { hubName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubHubsGetOptionalParams + options?: WebPubSubHubsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { hubName, resourceGroupName, resourceName, options }, - getOperationSpec + getOperationSpec, ); } @@ -170,7 +170,7 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { resourceGroupName: string, resourceName: string, parameters: WebPubSubHub, - options?: WebPubSubHubsCreateOrUpdateOptionalParams + options?: WebPubSubHubsCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -179,21 +179,20 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -202,8 +201,8 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -211,15 +210,15 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { hubName, resourceGroupName, resourceName, parameters, options }, - spec: createOrUpdateOperationSpec + spec: createOrUpdateOperationSpec, }); const poller = await createHttpPoller< WebPubSubHubsCreateOrUpdateResponse, @@ -227,7 +226,7 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -246,14 +245,14 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { resourceGroupName: string, resourceName: string, parameters: WebPubSubHub, - options?: WebPubSubHubsCreateOrUpdateOptionalParams + options?: WebPubSubHubsCreateOrUpdateOptionalParams, ): Promise { const poller = await this.beginCreateOrUpdate( hubName, resourceGroupName, resourceName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -269,25 +268,24 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { hubName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubHubsDeleteOptionalParams + options?: WebPubSubHubsDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -296,8 +294,8 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -305,20 +303,20 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { hubName, resourceGroupName, resourceName, options }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" + resourceLocationConfig: "location", }); await poller.poll(); return poller; @@ -335,13 +333,13 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { hubName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubHubsDeleteOptionalParams + options?: WebPubSubHubsDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( hubName, resourceGroupName, resourceName, - options + options, ); return poller.pollUntilDone(); } @@ -357,11 +355,11 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { resourceGroupName: string, resourceName: string, nextLink: string, - options?: WebPubSubHubsListNextOptionalParams + options?: WebPubSubHubsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -369,38 +367,36 @@ export class WebPubSubHubsImpl implements WebPubSubHubs { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.WebPubSubHubList + bodyMapper: Mappers.WebPubSubHubList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.WebPubSubHub + bodyMapper: Mappers.WebPubSubHub, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -408,31 +404,30 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.hubName + Parameters.hubName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.WebPubSubHub + bodyMapper: Mappers.WebPubSubHub, }, 201: { - bodyMapper: Mappers.WebPubSubHub + bodyMapper: Mappers.WebPubSubHub, }, 202: { - bodyMapper: Mappers.WebPubSubHub + bodyMapper: Mappers.WebPubSubHub, }, 204: { - bodyMapper: Mappers.WebPubSubHub + bodyMapper: Mappers.WebPubSubHub, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.parameters5, queryParameters: [Parameters.apiVersion], @@ -441,15 +436,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.hubName + Parameters.hubName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}", httpMethod: "DELETE", responses: { 200: {}, @@ -457,8 +451,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -466,29 +460,29 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.hubName + Parameters.hubName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.WebPubSubHubList + bodyMapper: Mappers.WebPubSubHubList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.nextLink, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateEndpointConnections.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateEndpointConnections.ts index 67d0232e972b..2109511cc1cb 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateEndpointConnections.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateEndpointConnections.ts @@ -16,7 +16,7 @@ import { WebPubSubManagementClient } from "../webPubSubManagementClient"; import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -29,13 +29,14 @@ import { WebPubSubPrivateEndpointConnectionsUpdateOptionalParams, WebPubSubPrivateEndpointConnectionsUpdateResponse, WebPubSubPrivateEndpointConnectionsDeleteOptionalParams, - WebPubSubPrivateEndpointConnectionsListNextResponse + WebPubSubPrivateEndpointConnectionsListNextResponse, } from "../models"; /// /** Class containing WebPubSubPrivateEndpointConnections operations. */ export class WebPubSubPrivateEndpointConnectionsImpl - implements WebPubSubPrivateEndpointConnections { + implements WebPubSubPrivateEndpointConnections +{ private readonly client: WebPubSubManagementClient; /** @@ -55,7 +56,7 @@ export class WebPubSubPrivateEndpointConnectionsImpl public list( resourceGroupName: string, resourceName: string, - options?: WebPubSubPrivateEndpointConnectionsListOptionalParams + options?: WebPubSubPrivateEndpointConnectionsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(resourceGroupName, resourceName, options); return { @@ -73,9 +74,9 @@ export class WebPubSubPrivateEndpointConnectionsImpl resourceGroupName, resourceName, options, - settings + settings, ); - } + }, }; } @@ -83,7 +84,7 @@ export class WebPubSubPrivateEndpointConnectionsImpl resourceGroupName: string, resourceName: string, options?: WebPubSubPrivateEndpointConnectionsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: WebPubSubPrivateEndpointConnectionsListResponse; let continuationToken = settings?.continuationToken; @@ -99,7 +100,7 @@ export class WebPubSubPrivateEndpointConnectionsImpl resourceGroupName, resourceName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -111,12 +112,12 @@ export class WebPubSubPrivateEndpointConnectionsImpl private async *listPagingAll( resourceGroupName: string, resourceName: string, - options?: WebPubSubPrivateEndpointConnectionsListOptionalParams + options?: WebPubSubPrivateEndpointConnectionsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage( resourceGroupName, resourceName, - options + options, )) { yield* page; } @@ -131,11 +132,11 @@ export class WebPubSubPrivateEndpointConnectionsImpl private _list( resourceGroupName: string, resourceName: string, - options?: WebPubSubPrivateEndpointConnectionsListOptionalParams + options?: WebPubSubPrivateEndpointConnectionsListOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, options }, - listOperationSpec + listOperationSpec, ); } @@ -151,16 +152,16 @@ export class WebPubSubPrivateEndpointConnectionsImpl privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubPrivateEndpointConnectionsGetOptionalParams + options?: WebPubSubPrivateEndpointConnectionsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { privateEndpointConnectionName, resourceGroupName, resourceName, - options + options, }, - getOperationSpec + getOperationSpec, ); } @@ -178,7 +179,7 @@ export class WebPubSubPrivateEndpointConnectionsImpl resourceGroupName: string, resourceName: string, parameters: PrivateEndpointConnection, - options?: WebPubSubPrivateEndpointConnectionsUpdateOptionalParams + options?: WebPubSubPrivateEndpointConnectionsUpdateOptionalParams, ): Promise { return this.client.sendOperationRequest( { @@ -186,9 +187,9 @@ export class WebPubSubPrivateEndpointConnectionsImpl resourceGroupName, resourceName, parameters, - options + options, }, - updateOperationSpec + updateOperationSpec, ); } @@ -204,25 +205,24 @@ export class WebPubSubPrivateEndpointConnectionsImpl privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubPrivateEndpointConnectionsDeleteOptionalParams + options?: WebPubSubPrivateEndpointConnectionsDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -231,8 +231,8 @@ export class WebPubSubPrivateEndpointConnectionsImpl ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -240,8 +240,8 @@ export class WebPubSubPrivateEndpointConnectionsImpl rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -251,14 +251,14 @@ export class WebPubSubPrivateEndpointConnectionsImpl privateEndpointConnectionName, resourceGroupName, resourceName, - options + options, }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" + resourceLocationConfig: "location", }); await poller.poll(); return poller; @@ -276,13 +276,13 @@ export class WebPubSubPrivateEndpointConnectionsImpl privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubPrivateEndpointConnectionsDeleteOptionalParams + options?: WebPubSubPrivateEndpointConnectionsDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( privateEndpointConnectionName, resourceGroupName, resourceName, - options + options, ); return poller.pollUntilDone(); } @@ -298,11 +298,11 @@ export class WebPubSubPrivateEndpointConnectionsImpl resourceGroupName: string, resourceName: string, nextLink: string, - options?: WebPubSubPrivateEndpointConnectionsListNextOptionalParams + options?: WebPubSubPrivateEndpointConnectionsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -310,38 +310,36 @@ export class WebPubSubPrivateEndpointConnectionsImpl const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnectionList + bodyMapper: Mappers.PrivateEndpointConnectionList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -349,22 +347,21 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.privateEndpointConnectionName + Parameters.privateEndpointConnectionName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion], @@ -373,15 +370,14 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.privateEndpointConnectionName + Parameters.privateEndpointConnectionName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "DELETE", responses: { 200: {}, @@ -389,8 +385,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -398,29 +394,29 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.privateEndpointConnectionName + Parameters.privateEndpointConnectionName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnectionList + bodyMapper: Mappers.PrivateEndpointConnectionList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.nextLink, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateLinkResources.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateLinkResources.ts index b5f8327d4ecb..d6e1ccdfd891 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateLinkResources.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateLinkResources.ts @@ -18,13 +18,14 @@ import { WebPubSubPrivateLinkResourcesListNextOptionalParams, WebPubSubPrivateLinkResourcesListOptionalParams, WebPubSubPrivateLinkResourcesListResponse, - WebPubSubPrivateLinkResourcesListNextResponse + WebPubSubPrivateLinkResourcesListNextResponse, } from "../models"; /// /** Class containing WebPubSubPrivateLinkResources operations. */ export class WebPubSubPrivateLinkResourcesImpl - implements WebPubSubPrivateLinkResources { + implements WebPubSubPrivateLinkResources +{ private readonly client: WebPubSubManagementClient; /** @@ -44,7 +45,7 @@ export class WebPubSubPrivateLinkResourcesImpl public list( resourceGroupName: string, resourceName: string, - options?: WebPubSubPrivateLinkResourcesListOptionalParams + options?: WebPubSubPrivateLinkResourcesListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(resourceGroupName, resourceName, options); return { @@ -62,9 +63,9 @@ export class WebPubSubPrivateLinkResourcesImpl resourceGroupName, resourceName, options, - settings + settings, ); - } + }, }; } @@ -72,7 +73,7 @@ export class WebPubSubPrivateLinkResourcesImpl resourceGroupName: string, resourceName: string, options?: WebPubSubPrivateLinkResourcesListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: WebPubSubPrivateLinkResourcesListResponse; let continuationToken = settings?.continuationToken; @@ -88,7 +89,7 @@ export class WebPubSubPrivateLinkResourcesImpl resourceGroupName, resourceName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -100,12 +101,12 @@ export class WebPubSubPrivateLinkResourcesImpl private async *listPagingAll( resourceGroupName: string, resourceName: string, - options?: WebPubSubPrivateLinkResourcesListOptionalParams + options?: WebPubSubPrivateLinkResourcesListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage( resourceGroupName, resourceName, - options + options, )) { yield* page; } @@ -120,11 +121,11 @@ export class WebPubSubPrivateLinkResourcesImpl private _list( resourceGroupName: string, resourceName: string, - options?: WebPubSubPrivateLinkResourcesListOptionalParams + options?: WebPubSubPrivateLinkResourcesListOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, options }, - listOperationSpec + listOperationSpec, ); } @@ -139,11 +140,11 @@ export class WebPubSubPrivateLinkResourcesImpl resourceGroupName: string, resourceName: string, nextLink: string, - options?: WebPubSubPrivateLinkResourcesListNextOptionalParams + options?: WebPubSubPrivateLinkResourcesListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -151,45 +152,44 @@ export class WebPubSubPrivateLinkResourcesImpl const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateLinkResources", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateLinkResources", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateLinkResourceList + bodyMapper: Mappers.PrivateLinkResourceList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateLinkResourceList + bodyMapper: Mappers.PrivateLinkResourceList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.nextLink, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubReplicaSharedPrivateLinkResources.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubReplicaSharedPrivateLinkResources.ts new file mode 100644 index 000000000000..486730e81ea1 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubReplicaSharedPrivateLinkResources.ts @@ -0,0 +1,424 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { WebPubSubReplicaSharedPrivateLinkResources } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { WebPubSubManagementClient } from "../webPubSubManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + SharedPrivateLinkResource, + WebPubSubReplicaSharedPrivateLinkResourcesListNextOptionalParams, + WebPubSubReplicaSharedPrivateLinkResourcesListOptionalParams, + WebPubSubReplicaSharedPrivateLinkResourcesListResponse, + WebPubSubReplicaSharedPrivateLinkResourcesGetOptionalParams, + WebPubSubReplicaSharedPrivateLinkResourcesGetResponse, + WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateOptionalParams, + WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateResponse, + WebPubSubReplicaSharedPrivateLinkResourcesListNextResponse, +} from "../models"; + +/// +/** Class containing WebPubSubReplicaSharedPrivateLinkResources operations. */ +export class WebPubSubReplicaSharedPrivateLinkResourcesImpl + implements WebPubSubReplicaSharedPrivateLinkResources +{ + private readonly client: WebPubSubManagementClient; + + /** + * Initialize a new instance of the class WebPubSubReplicaSharedPrivateLinkResources class. + * @param client Reference to the service client + */ + constructor(client: WebPubSubManagementClient) { + this.client = client; + } + + /** + * List shared private link resources + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + resourceName: string, + replicaName: string, + options?: WebPubSubReplicaSharedPrivateLinkResourcesListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + resourceName, + replicaName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + resourceName, + replicaName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + resourceName: string, + replicaName: string, + options?: WebPubSubReplicaSharedPrivateLinkResourcesListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: WebPubSubReplicaSharedPrivateLinkResourcesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + resourceName, + replicaName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + resourceName, + replicaName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + resourceName: string, + replicaName: string, + options?: WebPubSubReplicaSharedPrivateLinkResourcesListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + resourceName, + replicaName, + options, + )) { + yield* page; + } + } + + /** + * List shared private link resources + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + resourceName: string, + replicaName: string, + options?: WebPubSubReplicaSharedPrivateLinkResourcesListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, replicaName, options }, + listOperationSpec, + ); + } + + /** + * Get the specified shared private link resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param sharedPrivateLinkResourceName The name of the shared private link resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + replicaName: string, + sharedPrivateLinkResourceName: string, + options?: WebPubSubReplicaSharedPrivateLinkResourcesGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + replicaName, + sharedPrivateLinkResourceName, + options, + }, + getOperationSpec, + ); + } + + /** + * Create or update a shared private link resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link resource + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + replicaName: string, + sharedPrivateLinkResourceName: string, + parameters: SharedPrivateLinkResource, + options?: WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + resourceName, + replicaName, + sharedPrivateLinkResourceName, + parameters, + options, + }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Create or update a shared private link resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link resource + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + replicaName: string, + sharedPrivateLinkResourceName: string, + parameters: SharedPrivateLinkResource, + options?: WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + resourceName, + replicaName, + sharedPrivateLinkResourceName, + parameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + resourceName: string, + replicaName: string, + nextLink: string, + options?: WebPubSubReplicaSharedPrivateLinkResourcesListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, replicaName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/sharedPrivateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SharedPrivateLinkResourceList, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.replicaName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SharedPrivateLinkResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.replicaName, + Parameters.sharedPrivateLinkResourceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SharedPrivateLinkResource, + }, + 201: { + bodyMapper: Mappers.SharedPrivateLinkResource, + }, + 202: { + bodyMapper: Mappers.SharedPrivateLinkResource, + }, + 204: { + bodyMapper: Mappers.SharedPrivateLinkResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.parameters8, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.replicaName, + Parameters.sharedPrivateLinkResourceName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SharedPrivateLinkResourceList, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.replicaName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubReplicas.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubReplicas.ts index 94888042b8e6..758427cb7b25 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubReplicas.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubReplicas.ts @@ -16,7 +16,7 @@ import { WebPubSubManagementClient } from "../webPubSubManagementClient"; import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -33,7 +33,7 @@ import { WebPubSubReplicasUpdateResponse, WebPubSubReplicasRestartOptionalParams, WebPubSubReplicasRestartResponse, - WebPubSubReplicasListNextResponse + WebPubSubReplicasListNextResponse, } from "../models"; /// @@ -58,7 +58,7 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { public list( resourceGroupName: string, resourceName: string, - options?: WebPubSubReplicasListOptionalParams + options?: WebPubSubReplicasListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(resourceGroupName, resourceName, options); return { @@ -76,9 +76,9 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { resourceGroupName, resourceName, options, - settings + settings, ); - } + }, }; } @@ -86,7 +86,7 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { resourceGroupName: string, resourceName: string, options?: WebPubSubReplicasListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: WebPubSubReplicasListResponse; let continuationToken = settings?.continuationToken; @@ -102,7 +102,7 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { resourceGroupName, resourceName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -114,12 +114,12 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { private async *listPagingAll( resourceGroupName: string, resourceName: string, - options?: WebPubSubReplicasListOptionalParams + options?: WebPubSubReplicasListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage( resourceGroupName, resourceName, - options + options, )) { yield* page; } @@ -134,11 +134,11 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { private _list( resourceGroupName: string, resourceName: string, - options?: WebPubSubReplicasListOptionalParams + options?: WebPubSubReplicasListOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, options }, - listOperationSpec + listOperationSpec, ); } @@ -153,11 +153,11 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { resourceGroupName: string, resourceName: string, replicaName: string, - options?: WebPubSubReplicasGetOptionalParams + options?: WebPubSubReplicasGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, replicaName, options }, - getOperationSpec + getOperationSpec, ); } @@ -174,7 +174,7 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { resourceName: string, replicaName: string, parameters: Replica, - options?: WebPubSubReplicasCreateOrUpdateOptionalParams + options?: WebPubSubReplicasCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -183,21 +183,20 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -206,8 +205,8 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -215,8 +214,8 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -227,9 +226,9 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { resourceName, replicaName, parameters, - options + options, }, - spec: createOrUpdateOperationSpec + spec: createOrUpdateOperationSpec, }); const poller = await createHttpPoller< WebPubSubReplicasCreateOrUpdateResponse, @@ -237,7 +236,7 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -256,14 +255,14 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { resourceName: string, replicaName: string, parameters: Replica, - options?: WebPubSubReplicasCreateOrUpdateOptionalParams + options?: WebPubSubReplicasCreateOrUpdateOptionalParams, ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, resourceName, replicaName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -279,11 +278,11 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { resourceGroupName: string, resourceName: string, replicaName: string, - options?: WebPubSubReplicasDeleteOptionalParams + options?: WebPubSubReplicasDeleteOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, replicaName, options }, - deleteOperationSpec + deleteOperationSpec, ); } @@ -300,7 +299,7 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { resourceName: string, replicaName: string, parameters: Replica, - options?: WebPubSubReplicasUpdateOptionalParams + options?: WebPubSubReplicasUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -309,21 +308,20 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -332,8 +330,8 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -341,8 +339,8 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -353,9 +351,9 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { resourceName, replicaName, parameters, - options + options, }, - spec: updateOperationSpec + spec: updateOperationSpec, }); const poller = await createHttpPoller< WebPubSubReplicasUpdateResponse, @@ -363,7 +361,7 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" + resourceLocationConfig: "location", }); await poller.poll(); return poller; @@ -382,14 +380,14 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { resourceName: string, replicaName: string, parameters: Replica, - options?: WebPubSubReplicasUpdateOptionalParams + options?: WebPubSubReplicasUpdateOptionalParams, ): Promise { const poller = await this.beginUpdate( resourceGroupName, resourceName, replicaName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -405,7 +403,7 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { resourceGroupName: string, resourceName: string, replicaName: string, - options?: WebPubSubReplicasRestartOptionalParams + options?: WebPubSubReplicasRestartOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -414,21 +412,20 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -437,8 +434,8 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -446,15 +443,15 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, resourceName, replicaName, options }, - spec: restartOperationSpec + spec: restartOperationSpec, }); const poller = await createHttpPoller< WebPubSubReplicasRestartResponse, @@ -462,7 +459,7 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" + resourceLocationConfig: "location", }); await poller.poll(); return poller; @@ -479,13 +476,13 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { resourceGroupName: string, resourceName: string, replicaName: string, - options?: WebPubSubReplicasRestartOptionalParams + options?: WebPubSubReplicasRestartOptionalParams, ): Promise { const poller = await this.beginRestart( resourceGroupName, resourceName, replicaName, - options + options, ); return poller.pollUntilDone(); } @@ -501,11 +498,11 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { resourceGroupName: string, resourceName: string, nextLink: string, - options?: WebPubSubReplicasListNextOptionalParams + options?: WebPubSubReplicasListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -513,38 +510,36 @@ export class WebPubSubReplicasImpl implements WebPubSubReplicas { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReplicaList + bodyMapper: Mappers.ReplicaList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Replica + bodyMapper: Mappers.Replica, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -552,31 +547,30 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.replicaName + Parameters.replicaName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.Replica + bodyMapper: Mappers.Replica, }, 201: { - bodyMapper: Mappers.Replica + bodyMapper: Mappers.Replica, }, 202: { - bodyMapper: Mappers.Replica + bodyMapper: Mappers.Replica, }, 204: { - bodyMapper: Mappers.Replica + bodyMapper: Mappers.Replica, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.parameters7, queryParameters: [Parameters.apiVersion], @@ -585,22 +579,21 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.replicaName + Parameters.replicaName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}", httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -608,31 +601,30 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.replicaName + Parameters.replicaName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}", httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.Replica + bodyMapper: Mappers.Replica, }, 201: { - bodyMapper: Mappers.Replica + bodyMapper: Mappers.Replica, }, 202: { - bodyMapper: Mappers.Replica + bodyMapper: Mappers.Replica, }, 204: { - bodyMapper: Mappers.Replica + bodyMapper: Mappers.Replica, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.parameters7, queryParameters: [Parameters.apiVersion], @@ -641,32 +633,31 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.replicaName + Parameters.replicaName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const restartOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/restart", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/restart", httpMethod: "POST", responses: { 200: { - headersMapper: Mappers.WebPubSubReplicasRestartHeaders + headersMapper: Mappers.WebPubSubReplicasRestartHeaders, }, 201: { - headersMapper: Mappers.WebPubSubReplicasRestartHeaders + headersMapper: Mappers.WebPubSubReplicasRestartHeaders, }, 202: { - headersMapper: Mappers.WebPubSubReplicasRestartHeaders + headersMapper: Mappers.WebPubSubReplicasRestartHeaders, }, 204: { - headersMapper: Mappers.WebPubSubReplicasRestartHeaders + headersMapper: Mappers.WebPubSubReplicasRestartHeaders, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -674,29 +665,29 @@ const restartOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.replicaName + Parameters.replicaName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReplicaList + bodyMapper: Mappers.ReplicaList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.nextLink, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubSharedPrivateLinkResources.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubSharedPrivateLinkResources.ts index 5dd7ead43aa7..19b4525687ee 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubSharedPrivateLinkResources.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubSharedPrivateLinkResources.ts @@ -16,7 +16,7 @@ import { WebPubSubManagementClient } from "../webPubSubManagementClient"; import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -29,13 +29,14 @@ import { WebPubSubSharedPrivateLinkResourcesCreateOrUpdateOptionalParams, WebPubSubSharedPrivateLinkResourcesCreateOrUpdateResponse, WebPubSubSharedPrivateLinkResourcesDeleteOptionalParams, - WebPubSubSharedPrivateLinkResourcesListNextResponse + WebPubSubSharedPrivateLinkResourcesListNextResponse, } from "../models"; /// /** Class containing WebPubSubSharedPrivateLinkResources operations. */ export class WebPubSubSharedPrivateLinkResourcesImpl - implements WebPubSubSharedPrivateLinkResources { + implements WebPubSubSharedPrivateLinkResources +{ private readonly client: WebPubSubManagementClient; /** @@ -55,7 +56,7 @@ export class WebPubSubSharedPrivateLinkResourcesImpl public list( resourceGroupName: string, resourceName: string, - options?: WebPubSubSharedPrivateLinkResourcesListOptionalParams + options?: WebPubSubSharedPrivateLinkResourcesListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(resourceGroupName, resourceName, options); return { @@ -73,9 +74,9 @@ export class WebPubSubSharedPrivateLinkResourcesImpl resourceGroupName, resourceName, options, - settings + settings, ); - } + }, }; } @@ -83,7 +84,7 @@ export class WebPubSubSharedPrivateLinkResourcesImpl resourceGroupName: string, resourceName: string, options?: WebPubSubSharedPrivateLinkResourcesListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: WebPubSubSharedPrivateLinkResourcesListResponse; let continuationToken = settings?.continuationToken; @@ -99,7 +100,7 @@ export class WebPubSubSharedPrivateLinkResourcesImpl resourceGroupName, resourceName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -111,12 +112,12 @@ export class WebPubSubSharedPrivateLinkResourcesImpl private async *listPagingAll( resourceGroupName: string, resourceName: string, - options?: WebPubSubSharedPrivateLinkResourcesListOptionalParams + options?: WebPubSubSharedPrivateLinkResourcesListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage( resourceGroupName, resourceName, - options + options, )) { yield* page; } @@ -131,17 +132,17 @@ export class WebPubSubSharedPrivateLinkResourcesImpl private _list( resourceGroupName: string, resourceName: string, - options?: WebPubSubSharedPrivateLinkResourcesListOptionalParams + options?: WebPubSubSharedPrivateLinkResourcesListOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, options }, - listOperationSpec + listOperationSpec, ); } /** * Get the specified shared private link resource - * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param sharedPrivateLinkResourceName The name of the shared private link resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. @@ -150,22 +151,22 @@ export class WebPubSubSharedPrivateLinkResourcesImpl sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubSharedPrivateLinkResourcesGetOptionalParams + options?: WebPubSubSharedPrivateLinkResourcesGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { sharedPrivateLinkResourceName, resourceGroupName, resourceName, - options + options, }, - getOperationSpec + getOperationSpec, ); } /** * Create or update a shared private link resource - * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param sharedPrivateLinkResourceName The name of the shared private link resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource @@ -176,7 +177,7 @@ export class WebPubSubSharedPrivateLinkResourcesImpl resourceGroupName: string, resourceName: string, parameters: SharedPrivateLinkResource, - options?: WebPubSubSharedPrivateLinkResourcesCreateOrUpdateOptionalParams + options?: WebPubSubSharedPrivateLinkResourcesCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -185,21 +186,20 @@ export class WebPubSubSharedPrivateLinkResourcesImpl > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -208,8 +208,8 @@ export class WebPubSubSharedPrivateLinkResourcesImpl ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -217,8 +217,8 @@ export class WebPubSubSharedPrivateLinkResourcesImpl rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -229,9 +229,9 @@ export class WebPubSubSharedPrivateLinkResourcesImpl resourceGroupName, resourceName, parameters, - options + options, }, - spec: createOrUpdateOperationSpec + spec: createOrUpdateOperationSpec, }); const poller = await createHttpPoller< WebPubSubSharedPrivateLinkResourcesCreateOrUpdateResponse, @@ -239,7 +239,7 @@ export class WebPubSubSharedPrivateLinkResourcesImpl >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -247,7 +247,7 @@ export class WebPubSubSharedPrivateLinkResourcesImpl /** * Create or update a shared private link resource - * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param sharedPrivateLinkResourceName The name of the shared private link resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource @@ -258,21 +258,21 @@ export class WebPubSubSharedPrivateLinkResourcesImpl resourceGroupName: string, resourceName: string, parameters: SharedPrivateLinkResource, - options?: WebPubSubSharedPrivateLinkResourcesCreateOrUpdateOptionalParams + options?: WebPubSubSharedPrivateLinkResourcesCreateOrUpdateOptionalParams, ): Promise { const poller = await this.beginCreateOrUpdate( sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters, - options + options, ); return poller.pollUntilDone(); } /** * Delete the specified shared private link resource - * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param sharedPrivateLinkResourceName The name of the shared private link resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. @@ -281,25 +281,24 @@ export class WebPubSubSharedPrivateLinkResourcesImpl sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubSharedPrivateLinkResourcesDeleteOptionalParams + options?: WebPubSubSharedPrivateLinkResourcesDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -308,8 +307,8 @@ export class WebPubSubSharedPrivateLinkResourcesImpl ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -317,8 +316,8 @@ export class WebPubSubSharedPrivateLinkResourcesImpl rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -328,14 +327,14 @@ export class WebPubSubSharedPrivateLinkResourcesImpl sharedPrivateLinkResourceName, resourceGroupName, resourceName, - options + options, }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" + resourceLocationConfig: "location", }); await poller.poll(); return poller; @@ -343,7 +342,7 @@ export class WebPubSubSharedPrivateLinkResourcesImpl /** * Delete the specified shared private link resource - * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param sharedPrivateLinkResourceName The name of the shared private link resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. @@ -352,13 +351,13 @@ export class WebPubSubSharedPrivateLinkResourcesImpl sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubSharedPrivateLinkResourcesDeleteOptionalParams + options?: WebPubSubSharedPrivateLinkResourcesDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( sharedPrivateLinkResourceName, resourceGroupName, resourceName, - options + options, ); return poller.pollUntilDone(); } @@ -374,11 +373,11 @@ export class WebPubSubSharedPrivateLinkResourcesImpl resourceGroupName: string, resourceName: string, nextLink: string, - options?: WebPubSubSharedPrivateLinkResourcesListNextOptionalParams + options?: WebPubSubSharedPrivateLinkResourcesListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -386,38 +385,36 @@ export class WebPubSubSharedPrivateLinkResourcesImpl const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SharedPrivateLinkResourceList + bodyMapper: Mappers.SharedPrivateLinkResourceList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SharedPrivateLinkResource + bodyMapper: Mappers.SharedPrivateLinkResource, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -425,31 +422,30 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.sharedPrivateLinkResourceName + Parameters.sharedPrivateLinkResourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.SharedPrivateLinkResource + bodyMapper: Mappers.SharedPrivateLinkResource, }, 201: { - bodyMapper: Mappers.SharedPrivateLinkResource + bodyMapper: Mappers.SharedPrivateLinkResource, }, 202: { - bodyMapper: Mappers.SharedPrivateLinkResource + bodyMapper: Mappers.SharedPrivateLinkResource, }, 204: { - bodyMapper: Mappers.SharedPrivateLinkResource + bodyMapper: Mappers.SharedPrivateLinkResource, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], @@ -458,15 +454,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.sharedPrivateLinkResourceName + Parameters.sharedPrivateLinkResourceName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", httpMethod: "DELETE", responses: { 200: {}, @@ -474,8 +469,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -483,29 +478,29 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.sharedPrivateLinkResourceName + Parameters.sharedPrivateLinkResourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SharedPrivateLinkResourceList + bodyMapper: Mappers.SharedPrivateLinkResourceList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.nextLink, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.resourceName + Parameters.resourceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/index.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/index.ts index 9ed9e9b6ad7f..f05d34e49c45 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/index.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/index.ts @@ -15,4 +15,5 @@ export * from "./webPubSubHubs"; export * from "./webPubSubPrivateEndpointConnections"; export * from "./webPubSubPrivateLinkResources"; export * from "./webPubSubReplicas"; +export * from "./webPubSubReplicaSharedPrivateLinkResources"; export * from "./webPubSubSharedPrivateLinkResources"; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/operations.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/operations.ts index df52586abc39..c5e2c17bfb93 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/operations.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/operations.ts @@ -17,6 +17,6 @@ export interface Operations { * @param options The options parameters. */ list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/usages.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/usages.ts index e7c4264b6f2d..e10536727a18 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/usages.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/usages.ts @@ -19,6 +19,6 @@ export interface Usages { */ list( location: string, - options?: UsagesListOptionalParams + options?: UsagesListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSub.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSub.ts index 09620b218ebc..a3e00dc9b6cc 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSub.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSub.ts @@ -32,7 +32,7 @@ import { WebPubSubRestartOptionalParams, WebPubSubRestartResponse, WebPubSubListSkusOptionalParams, - WebPubSubListSkusResponse + WebPubSubListSkusResponse, } from "../models"; /// @@ -43,7 +43,7 @@ export interface WebPubSub { * @param options The options parameters. */ listBySubscription( - options?: WebPubSubListBySubscriptionOptionalParams + options?: WebPubSubListBySubscriptionOptionalParams, ): PagedAsyncIterableIterator; /** * Handles requests to list all resources in a resource group. @@ -52,7 +52,7 @@ export interface WebPubSub { */ listByResourceGroup( resourceGroupName: string, - options?: WebPubSubListByResourceGroupOptionalParams + options?: WebPubSubListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator; /** * Checks that the resource name is valid and is not already in use. @@ -63,7 +63,7 @@ export interface WebPubSub { checkNameAvailability( location: string, parameters: NameAvailabilityParameters, - options?: WebPubSubCheckNameAvailabilityOptionalParams + options?: WebPubSubCheckNameAvailabilityOptionalParams, ): Promise; /** * Get the resource and its properties. @@ -74,7 +74,7 @@ export interface WebPubSub { get( resourceGroupName: string, resourceName: string, - options?: WebPubSubGetOptionalParams + options?: WebPubSubGetOptionalParams, ): Promise; /** * Create or update a resource. @@ -87,7 +87,7 @@ export interface WebPubSub { resourceGroupName: string, resourceName: string, parameters: WebPubSubResource, - options?: WebPubSubCreateOrUpdateOptionalParams + options?: WebPubSubCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -105,7 +105,7 @@ export interface WebPubSub { resourceGroupName: string, resourceName: string, parameters: WebPubSubResource, - options?: WebPubSubCreateOrUpdateOptionalParams + options?: WebPubSubCreateOrUpdateOptionalParams, ): Promise; /** * Operation to delete a resource. @@ -116,7 +116,7 @@ export interface WebPubSub { beginDelete( resourceGroupName: string, resourceName: string, - options?: WebPubSubDeleteOptionalParams + options?: WebPubSubDeleteOptionalParams, ): Promise, void>>; /** * Operation to delete a resource. @@ -127,7 +127,7 @@ export interface WebPubSub { beginDeleteAndWait( resourceGroupName: string, resourceName: string, - options?: WebPubSubDeleteOptionalParams + options?: WebPubSubDeleteOptionalParams, ): Promise; /** * Operation to update an exiting resource. @@ -140,7 +140,7 @@ export interface WebPubSub { resourceGroupName: string, resourceName: string, parameters: WebPubSubResource, - options?: WebPubSubUpdateOptionalParams + options?: WebPubSubUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -158,7 +158,7 @@ export interface WebPubSub { resourceGroupName: string, resourceName: string, parameters: WebPubSubResource, - options?: WebPubSubUpdateOptionalParams + options?: WebPubSubUpdateOptionalParams, ): Promise; /** * Get the access keys of the resource. @@ -169,7 +169,7 @@ export interface WebPubSub { listKeys( resourceGroupName: string, resourceName: string, - options?: WebPubSubListKeysOptionalParams + options?: WebPubSubListKeysOptionalParams, ): Promise; /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the @@ -183,7 +183,7 @@ export interface WebPubSub { resourceGroupName: string, resourceName: string, parameters: RegenerateKeyParameters, - options?: WebPubSubRegenerateKeyOptionalParams + options?: WebPubSubRegenerateKeyOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -202,7 +202,7 @@ export interface WebPubSub { resourceGroupName: string, resourceName: string, parameters: RegenerateKeyParameters, - options?: WebPubSubRegenerateKeyOptionalParams + options?: WebPubSubRegenerateKeyOptionalParams, ): Promise; /** * List all available skus of the replica resource. @@ -215,7 +215,7 @@ export interface WebPubSub { resourceGroupName: string, resourceName: string, replicaName: string, - options?: WebPubSubListReplicaSkusOptionalParams + options?: WebPubSubListReplicaSkusOptionalParams, ): Promise; /** * Operation to restart a resource. @@ -226,7 +226,7 @@ export interface WebPubSub { beginRestart( resourceGroupName: string, resourceName: string, - options?: WebPubSubRestartOptionalParams + options?: WebPubSubRestartOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -242,7 +242,7 @@ export interface WebPubSub { beginRestartAndWait( resourceGroupName: string, resourceName: string, - options?: WebPubSubRestartOptionalParams + options?: WebPubSubRestartOptionalParams, ): Promise; /** * List all available skus of the resource. @@ -253,6 +253,6 @@ export interface WebPubSub { listSkus( resourceGroupName: string, resourceName: string, - options?: WebPubSubListSkusOptionalParams + options?: WebPubSubListSkusOptionalParams, ): Promise; } diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomCertificates.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomCertificates.ts index a2f44e9d2fbb..a85b1765a4ee 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomCertificates.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomCertificates.ts @@ -15,7 +15,7 @@ import { WebPubSubCustomCertificatesGetResponse, WebPubSubCustomCertificatesCreateOrUpdateOptionalParams, WebPubSubCustomCertificatesCreateOrUpdateResponse, - WebPubSubCustomCertificatesDeleteOptionalParams + WebPubSubCustomCertificatesDeleteOptionalParams, } from "../models"; /// @@ -30,7 +30,7 @@ export interface WebPubSubCustomCertificates { list( resourceGroupName: string, resourceName: string, - options?: WebPubSubCustomCertificatesListOptionalParams + options?: WebPubSubCustomCertificatesListOptionalParams, ): PagedAsyncIterableIterator; /** * Get a custom certificate. @@ -43,7 +43,7 @@ export interface WebPubSubCustomCertificates { resourceGroupName: string, resourceName: string, certificateName: string, - options?: WebPubSubCustomCertificatesGetOptionalParams + options?: WebPubSubCustomCertificatesGetOptionalParams, ): Promise; /** * Create or update a custom certificate. @@ -58,7 +58,7 @@ export interface WebPubSubCustomCertificates { resourceName: string, certificateName: string, parameters: CustomCertificate, - options?: WebPubSubCustomCertificatesCreateOrUpdateOptionalParams + options?: WebPubSubCustomCertificatesCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -78,7 +78,7 @@ export interface WebPubSubCustomCertificates { resourceName: string, certificateName: string, parameters: CustomCertificate, - options?: WebPubSubCustomCertificatesCreateOrUpdateOptionalParams + options?: WebPubSubCustomCertificatesCreateOrUpdateOptionalParams, ): Promise; /** * Delete a custom certificate. @@ -91,6 +91,6 @@ export interface WebPubSubCustomCertificates { resourceGroupName: string, resourceName: string, certificateName: string, - options?: WebPubSubCustomCertificatesDeleteOptionalParams + options?: WebPubSubCustomCertificatesDeleteOptionalParams, ): Promise; } diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomDomains.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomDomains.ts index 35ed68a92114..7216d482bc38 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomDomains.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubCustomDomains.ts @@ -15,7 +15,7 @@ import { WebPubSubCustomDomainsGetResponse, WebPubSubCustomDomainsCreateOrUpdateOptionalParams, WebPubSubCustomDomainsCreateOrUpdateResponse, - WebPubSubCustomDomainsDeleteOptionalParams + WebPubSubCustomDomainsDeleteOptionalParams, } from "../models"; /// @@ -30,7 +30,7 @@ export interface WebPubSubCustomDomains { list( resourceGroupName: string, resourceName: string, - options?: WebPubSubCustomDomainsListOptionalParams + options?: WebPubSubCustomDomainsListOptionalParams, ): PagedAsyncIterableIterator; /** * Get a custom domain. @@ -43,7 +43,7 @@ export interface WebPubSubCustomDomains { resourceGroupName: string, resourceName: string, name: string, - options?: WebPubSubCustomDomainsGetOptionalParams + options?: WebPubSubCustomDomainsGetOptionalParams, ): Promise; /** * Create or update a custom domain. @@ -58,7 +58,7 @@ export interface WebPubSubCustomDomains { resourceName: string, name: string, parameters: CustomDomain, - options?: WebPubSubCustomDomainsCreateOrUpdateOptionalParams + options?: WebPubSubCustomDomainsCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -78,7 +78,7 @@ export interface WebPubSubCustomDomains { resourceName: string, name: string, parameters: CustomDomain, - options?: WebPubSubCustomDomainsCreateOrUpdateOptionalParams + options?: WebPubSubCustomDomainsCreateOrUpdateOptionalParams, ): Promise; /** * Delete a custom domain. @@ -91,7 +91,7 @@ export interface WebPubSubCustomDomains { resourceGroupName: string, resourceName: string, name: string, - options?: WebPubSubCustomDomainsDeleteOptionalParams + options?: WebPubSubCustomDomainsDeleteOptionalParams, ): Promise, void>>; /** * Delete a custom domain. @@ -104,6 +104,6 @@ export interface WebPubSubCustomDomains { resourceGroupName: string, resourceName: string, name: string, - options?: WebPubSubCustomDomainsDeleteOptionalParams + options?: WebPubSubCustomDomainsDeleteOptionalParams, ): Promise; } diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubHubs.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubHubs.ts index ebaad087b76d..678a1928e6f2 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubHubs.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubHubs.ts @@ -15,7 +15,7 @@ import { WebPubSubHubsGetResponse, WebPubSubHubsCreateOrUpdateOptionalParams, WebPubSubHubsCreateOrUpdateResponse, - WebPubSubHubsDeleteOptionalParams + WebPubSubHubsDeleteOptionalParams, } from "../models"; /// @@ -30,7 +30,7 @@ export interface WebPubSubHubs { list( resourceGroupName: string, resourceName: string, - options?: WebPubSubHubsListOptionalParams + options?: WebPubSubHubsListOptionalParams, ): PagedAsyncIterableIterator; /** * Get a hub setting. @@ -43,7 +43,7 @@ export interface WebPubSubHubs { hubName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubHubsGetOptionalParams + options?: WebPubSubHubsGetOptionalParams, ): Promise; /** * Create or update a hub setting. @@ -58,7 +58,7 @@ export interface WebPubSubHubs { resourceGroupName: string, resourceName: string, parameters: WebPubSubHub, - options?: WebPubSubHubsCreateOrUpdateOptionalParams + options?: WebPubSubHubsCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -78,7 +78,7 @@ export interface WebPubSubHubs { resourceGroupName: string, resourceName: string, parameters: WebPubSubHub, - options?: WebPubSubHubsCreateOrUpdateOptionalParams + options?: WebPubSubHubsCreateOrUpdateOptionalParams, ): Promise; /** * Delete a hub setting. @@ -91,7 +91,7 @@ export interface WebPubSubHubs { hubName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubHubsDeleteOptionalParams + options?: WebPubSubHubsDeleteOptionalParams, ): Promise, void>>; /** * Delete a hub setting. @@ -104,6 +104,6 @@ export interface WebPubSubHubs { hubName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubHubsDeleteOptionalParams + options?: WebPubSubHubsDeleteOptionalParams, ): Promise; } diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateEndpointConnections.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateEndpointConnections.ts index 4e4fe34cc981..7e9408b5de8c 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateEndpointConnections.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateEndpointConnections.ts @@ -15,7 +15,7 @@ import { WebPubSubPrivateEndpointConnectionsGetResponse, WebPubSubPrivateEndpointConnectionsUpdateOptionalParams, WebPubSubPrivateEndpointConnectionsUpdateResponse, - WebPubSubPrivateEndpointConnectionsDeleteOptionalParams + WebPubSubPrivateEndpointConnectionsDeleteOptionalParams, } from "../models"; /// @@ -30,7 +30,7 @@ export interface WebPubSubPrivateEndpointConnections { list( resourceGroupName: string, resourceName: string, - options?: WebPubSubPrivateEndpointConnectionsListOptionalParams + options?: WebPubSubPrivateEndpointConnectionsListOptionalParams, ): PagedAsyncIterableIterator; /** * Get the specified private endpoint connection @@ -44,7 +44,7 @@ export interface WebPubSubPrivateEndpointConnections { privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubPrivateEndpointConnectionsGetOptionalParams + options?: WebPubSubPrivateEndpointConnectionsGetOptionalParams, ): Promise; /** * Update the state of specified private endpoint connection @@ -60,7 +60,7 @@ export interface WebPubSubPrivateEndpointConnections { resourceGroupName: string, resourceName: string, parameters: PrivateEndpointConnection, - options?: WebPubSubPrivateEndpointConnectionsUpdateOptionalParams + options?: WebPubSubPrivateEndpointConnectionsUpdateOptionalParams, ): Promise; /** * Delete the specified private endpoint connection @@ -74,7 +74,7 @@ export interface WebPubSubPrivateEndpointConnections { privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubPrivateEndpointConnectionsDeleteOptionalParams + options?: WebPubSubPrivateEndpointConnectionsDeleteOptionalParams, ): Promise, void>>; /** * Delete the specified private endpoint connection @@ -88,6 +88,6 @@ export interface WebPubSubPrivateEndpointConnections { privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubPrivateEndpointConnectionsDeleteOptionalParams + options?: WebPubSubPrivateEndpointConnectionsDeleteOptionalParams, ): Promise; } diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateLinkResources.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateLinkResources.ts index 3896be6ace18..c046608913eb 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateLinkResources.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubPrivateLinkResources.ts @@ -9,7 +9,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PrivateLinkResource, - WebPubSubPrivateLinkResourcesListOptionalParams + WebPubSubPrivateLinkResourcesListOptionalParams, } from "../models"; /// @@ -24,6 +24,6 @@ export interface WebPubSubPrivateLinkResources { list( resourceGroupName: string, resourceName: string, - options?: WebPubSubPrivateLinkResourcesListOptionalParams + options?: WebPubSubPrivateLinkResourcesListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubReplicaSharedPrivateLinkResources.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubReplicaSharedPrivateLinkResources.ts new file mode 100644 index 000000000000..8054f63242b7 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubReplicaSharedPrivateLinkResources.ts @@ -0,0 +1,90 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + SharedPrivateLinkResource, + WebPubSubReplicaSharedPrivateLinkResourcesListOptionalParams, + WebPubSubReplicaSharedPrivateLinkResourcesGetOptionalParams, + WebPubSubReplicaSharedPrivateLinkResourcesGetResponse, + WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateOptionalParams, + WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateResponse, +} from "../models"; + +/// +/** Interface representing a WebPubSubReplicaSharedPrivateLinkResources. */ +export interface WebPubSubReplicaSharedPrivateLinkResources { + /** + * List shared private link resources + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + resourceName: string, + replicaName: string, + options?: WebPubSubReplicaSharedPrivateLinkResourcesListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get the specified shared private link resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param sharedPrivateLinkResourceName The name of the shared private link resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + replicaName: string, + sharedPrivateLinkResourceName: string, + options?: WebPubSubReplicaSharedPrivateLinkResourcesGetOptionalParams, + ): Promise; + /** + * Create or update a shared private link resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link resource + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + replicaName: string, + sharedPrivateLinkResourceName: string, + parameters: SharedPrivateLinkResource, + options?: WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateResponse + > + >; + /** + * Create or update a shared private link resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link resource + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + replicaName: string, + sharedPrivateLinkResourceName: string, + parameters: SharedPrivateLinkResource, + options?: WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateOptionalParams, + ): Promise; +} diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubReplicas.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubReplicas.ts index c8aa7da1a792..c8fc2d6a18c1 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubReplicas.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubReplicas.ts @@ -19,7 +19,7 @@ import { WebPubSubReplicasUpdateOptionalParams, WebPubSubReplicasUpdateResponse, WebPubSubReplicasRestartOptionalParams, - WebPubSubReplicasRestartResponse + WebPubSubReplicasRestartResponse, } from "../models"; /// @@ -34,7 +34,7 @@ export interface WebPubSubReplicas { list( resourceGroupName: string, resourceName: string, - options?: WebPubSubReplicasListOptionalParams + options?: WebPubSubReplicasListOptionalParams, ): PagedAsyncIterableIterator; /** * Get the replica and its properties. @@ -47,7 +47,7 @@ export interface WebPubSubReplicas { resourceGroupName: string, resourceName: string, replicaName: string, - options?: WebPubSubReplicasGetOptionalParams + options?: WebPubSubReplicasGetOptionalParams, ): Promise; /** * Create or update a replica. @@ -62,7 +62,7 @@ export interface WebPubSubReplicas { resourceName: string, replicaName: string, parameters: Replica, - options?: WebPubSubReplicasCreateOrUpdateOptionalParams + options?: WebPubSubReplicasCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -82,7 +82,7 @@ export interface WebPubSubReplicas { resourceName: string, replicaName: string, parameters: Replica, - options?: WebPubSubReplicasCreateOrUpdateOptionalParams + options?: WebPubSubReplicasCreateOrUpdateOptionalParams, ): Promise; /** * Operation to delete a replica. @@ -95,7 +95,7 @@ export interface WebPubSubReplicas { resourceGroupName: string, resourceName: string, replicaName: string, - options?: WebPubSubReplicasDeleteOptionalParams + options?: WebPubSubReplicasDeleteOptionalParams, ): Promise; /** * Operation to update an exiting replica. @@ -110,7 +110,7 @@ export interface WebPubSubReplicas { resourceName: string, replicaName: string, parameters: Replica, - options?: WebPubSubReplicasUpdateOptionalParams + options?: WebPubSubReplicasUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -130,7 +130,7 @@ export interface WebPubSubReplicas { resourceName: string, replicaName: string, parameters: Replica, - options?: WebPubSubReplicasUpdateOptionalParams + options?: WebPubSubReplicasUpdateOptionalParams, ): Promise; /** * Operation to restart a replica. @@ -143,7 +143,7 @@ export interface WebPubSubReplicas { resourceGroupName: string, resourceName: string, replicaName: string, - options?: WebPubSubReplicasRestartOptionalParams + options?: WebPubSubReplicasRestartOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -161,6 +161,6 @@ export interface WebPubSubReplicas { resourceGroupName: string, resourceName: string, replicaName: string, - options?: WebPubSubReplicasRestartOptionalParams + options?: WebPubSubReplicasRestartOptionalParams, ): Promise; } diff --git a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubSharedPrivateLinkResources.ts b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubSharedPrivateLinkResources.ts index 8b4a5948a23f..0aea108288c4 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubSharedPrivateLinkResources.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/operationsInterfaces/webPubSubSharedPrivateLinkResources.ts @@ -15,7 +15,7 @@ import { WebPubSubSharedPrivateLinkResourcesGetResponse, WebPubSubSharedPrivateLinkResourcesCreateOrUpdateOptionalParams, WebPubSubSharedPrivateLinkResourcesCreateOrUpdateResponse, - WebPubSubSharedPrivateLinkResourcesDeleteOptionalParams + WebPubSubSharedPrivateLinkResourcesDeleteOptionalParams, } from "../models"; /// @@ -30,11 +30,11 @@ export interface WebPubSubSharedPrivateLinkResources { list( resourceGroupName: string, resourceName: string, - options?: WebPubSubSharedPrivateLinkResourcesListOptionalParams + options?: WebPubSubSharedPrivateLinkResourcesListOptionalParams, ): PagedAsyncIterableIterator; /** * Get the specified shared private link resource - * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param sharedPrivateLinkResourceName The name of the shared private link resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. @@ -43,11 +43,11 @@ export interface WebPubSubSharedPrivateLinkResources { sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubSharedPrivateLinkResourcesGetOptionalParams + options?: WebPubSubSharedPrivateLinkResourcesGetOptionalParams, ): Promise; /** * Create or update a shared private link resource - * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param sharedPrivateLinkResourceName The name of the shared private link resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource @@ -58,7 +58,7 @@ export interface WebPubSubSharedPrivateLinkResources { resourceGroupName: string, resourceName: string, parameters: SharedPrivateLinkResource, - options?: WebPubSubSharedPrivateLinkResourcesCreateOrUpdateOptionalParams + options?: WebPubSubSharedPrivateLinkResourcesCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -67,7 +67,7 @@ export interface WebPubSubSharedPrivateLinkResources { >; /** * Create or update a shared private link resource - * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param sharedPrivateLinkResourceName The name of the shared private link resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource @@ -78,11 +78,11 @@ export interface WebPubSubSharedPrivateLinkResources { resourceGroupName: string, resourceName: string, parameters: SharedPrivateLinkResource, - options?: WebPubSubSharedPrivateLinkResourcesCreateOrUpdateOptionalParams + options?: WebPubSubSharedPrivateLinkResourcesCreateOrUpdateOptionalParams, ): Promise; /** * Delete the specified shared private link resource - * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param sharedPrivateLinkResourceName The name of the shared private link resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. @@ -91,11 +91,11 @@ export interface WebPubSubSharedPrivateLinkResources { sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubSharedPrivateLinkResourcesDeleteOptionalParams + options?: WebPubSubSharedPrivateLinkResourcesDeleteOptionalParams, ): Promise, void>>; /** * Delete the specified shared private link resource - * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param sharedPrivateLinkResourceName The name of the shared private link resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param options The options parameters. @@ -104,6 +104,6 @@ export interface WebPubSubSharedPrivateLinkResources { sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, - options?: WebPubSubSharedPrivateLinkResourcesDeleteOptionalParams + options?: WebPubSubSharedPrivateLinkResourcesDeleteOptionalParams, ): Promise; } diff --git a/sdk/web-pubsub/arm-webpubsub/src/pagingHelper.ts b/sdk/web-pubsub/arm-webpubsub/src/pagingHelper.ts index 269a2b9814b5..205cccc26592 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/pagingHelper.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/pagingHelper.ts @@ -28,7 +28,7 @@ export function getContinuationToken(page: unknown): string | undefined { export function setContinuationToken( page: unknown, - continuationToken: string | undefined + continuationToken: string | undefined, ): void { if (typeof page !== "object" || page === null || !continuationToken) { return; diff --git a/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClient.ts b/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClient.ts index ec5c7fa34228..3dbe1fcb954d 100644 --- a/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClient.ts +++ b/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClient.ts @@ -11,7 +11,7 @@ import * as coreRestPipeline from "@azure/core-rest-pipeline"; import { PipelineRequest, PipelineResponse, - SendRequest + SendRequest, } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { @@ -24,7 +24,8 @@ import { WebPubSubPrivateEndpointConnectionsImpl, WebPubSubPrivateLinkResourcesImpl, WebPubSubReplicasImpl, - WebPubSubSharedPrivateLinkResourcesImpl + WebPubSubReplicaSharedPrivateLinkResourcesImpl, + WebPubSubSharedPrivateLinkResourcesImpl, } from "./operations"; import { Operations, @@ -36,7 +37,8 @@ import { WebPubSubPrivateEndpointConnections, WebPubSubPrivateLinkResources, WebPubSubReplicas, - WebPubSubSharedPrivateLinkResources + WebPubSubReplicaSharedPrivateLinkResources, + WebPubSubSharedPrivateLinkResources, } from "./operationsInterfaces"; import { WebPubSubManagementClientOptionalParams } from "./models"; @@ -54,7 +56,7 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, - options?: WebPubSubManagementClientOptionalParams + options?: WebPubSubManagementClientOptionalParams, ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); @@ -69,10 +71,10 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { } const defaults: WebPubSubManagementClientOptionalParams = { requestContentType: "application/json; charset=utf-8", - credential: credentials + credential: credentials, }; - const packageDetails = `azsdk-js-arm-webpubsub/2.0.0-beta.2`; + const packageDetails = `azsdk-js-arm-webpubsub/2.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -82,20 +84,21 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { ...defaults, ...options, userAgentOptions: { - userAgentPrefix + userAgentPrefix, }, endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + options.endpoint ?? options.baseUri ?? "https://management.azure.com", }; super(optionsWithDefaults); let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = + options.pipeline.getOrderedPolicies(); bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName + coreRestPipeline.bearerTokenAuthenticationPolicyName, ); } if ( @@ -105,7 +108,7 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { !bearerTokenAuthenticationPolicyFound ) { this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName + name: coreRestPipeline.bearerTokenAuthenticationPolicyName, }); this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ @@ -115,9 +118,9 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) + coreClient.authorizeRequestOnClaimChallenge, + }, + }), ); } // Parameter assignments @@ -125,25 +128,25 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-08-01-preview"; + this.apiVersion = options.apiVersion || "2024-03-01"; this.operations = new OperationsImpl(this); this.webPubSub = new WebPubSubImpl(this); this.usages = new UsagesImpl(this); this.webPubSubCustomCertificates = new WebPubSubCustomCertificatesImpl( - this + this, ); this.webPubSubCustomDomains = new WebPubSubCustomDomainsImpl(this); this.webPubSubHubs = new WebPubSubHubsImpl(this); - this.webPubSubPrivateEndpointConnections = new WebPubSubPrivateEndpointConnectionsImpl( - this - ); + this.webPubSubPrivateEndpointConnections = + new WebPubSubPrivateEndpointConnectionsImpl(this); this.webPubSubPrivateLinkResources = new WebPubSubPrivateLinkResourcesImpl( - this + this, ); this.webPubSubReplicas = new WebPubSubReplicasImpl(this); - this.webPubSubSharedPrivateLinkResources = new WebPubSubSharedPrivateLinkResourcesImpl( - this - ); + this.webPubSubReplicaSharedPrivateLinkResources = + new WebPubSubReplicaSharedPrivateLinkResourcesImpl(this); + this.webPubSubSharedPrivateLinkResources = + new WebPubSubSharedPrivateLinkResourcesImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -156,7 +159,7 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { name: "CustomApiVersionPolicy", async sendRequest( request: PipelineRequest, - next: SendRequest + next: SendRequest, ): Promise { const param = request.url.split("?"); if (param.length > 1) { @@ -170,7 +173,7 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { request.url = param[0] + "?" + newParams.join("&"); } return next(request); - } + }, }; this.pipeline.addPolicy(apiVersionPolicy); } @@ -184,5 +187,6 @@ export class WebPubSubManagementClient extends coreClient.ServiceClient { webPubSubPrivateEndpointConnections: WebPubSubPrivateEndpointConnections; webPubSubPrivateLinkResources: WebPubSubPrivateLinkResources; webPubSubReplicas: WebPubSubReplicas; + webPubSubReplicaSharedPrivateLinkResources: WebPubSubReplicaSharedPrivateLinkResources; webPubSubSharedPrivateLinkResources: WebPubSubSharedPrivateLinkResources; } diff --git a/sdk/web-pubsub/arm-webpubsub/test/sampleTest.ts b/sdk/web-pubsub/arm-webpubsub/test/sampleTest.ts new file mode 100644 index 000000000000..d64be981b694 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env, +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function (this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("sample test", async function () { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/web-pubsub/arm-webpubsub/tsconfig.json b/sdk/web-pubsub/arm-webpubsub/tsconfig.json index d4e1110ff459..3e6ae96443f3 100644 --- a/sdk/web-pubsub/arm-webpubsub/tsconfig.json +++ b/sdk/web-pubsub/arm-webpubsub/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-webpubsub": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"