diff --git a/sdk/web-pubsub/arm-webpubsub/LICENSE.txt b/sdk/web-pubsub/arm-webpubsub/LICENSE.txt new file mode 100644 index 000000000000..2d3163745319 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/web-pubsub/arm-webpubsub/README.md b/sdk/web-pubsub/arm-webpubsub/README.md new file mode 100644 index 000000000000..9fba07f1c18d --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/README.md @@ -0,0 +1,106 @@ +## Azure WebPubSubManagementClient SDK for JavaScript + +This package contains an isomorphic SDK (runs both in node.js and in browsers) for WebPubSubManagementClient. + +### Currently supported environments + +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. + +### Prerequisites + +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-webpubsub` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-webpubsub @azure/identity +``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + +### How to use + +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. + +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. + +##### Sample code + +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { WebPubSubManagementClient } = require("@azure/arm-webpubsub"); +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new WebPubSubManagementClient(creds, subscriptionId); +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log("An error occurred:"); + console.error(err); +}); +``` + +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. + +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. + +##### Sample code + +- index.html + +```html + + + + @azure/arm-webpubsub sample + + + + + + + +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/web-pubsub/arm-webpubsub/README.png) diff --git a/sdk/web-pubsub/arm-webpubsub/package.json b/sdk/web-pubsub/arm-webpubsub/package.json new file mode 100644 index 000000000000..5dd81800c52f --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/package.json @@ -0,0 +1,59 @@ +{ + "name": "@azure/arm-webpubsub", + "author": "Microsoft Corporation", + "description": "WebPubSubManagementClient Library with typescript type definitions for node.js and browser.", + "version": "1.0.0-beta.1", + "dependencies": { + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", + "tslib": "^1.10.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/arm-webpubsub.js", + "module": "./esm/webPubSubManagementClient.js", + "types": "./esm/webPubSubManagementClient.d.ts", + "devDependencies": { + "typescript": "^3.6.0", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/web-pubsub/arm-webpubsub", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "esm/**/*.js", + "esm/**/*.js.map", + "esm/**/*.d.ts", + "esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "rollup.config.js", + "tsconfig.json" + ], + "scripts": { + "build": "tsc && rollup -c rollup.config.js && npm run minify", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-webpubsub.js.map'\" -o ./dist/arm-webpubsub.min.js ./dist/arm-webpubsub.js", + "prepack": "npm install && npm run build" + }, + "sideEffects": false, + "autoPublish": true +} diff --git a/sdk/web-pubsub/arm-webpubsub/rollup.config.js b/sdk/web-pubsub/arm-webpubsub/rollup.config.js new file mode 100644 index 000000000000..e68d49bc5648 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/rollup.config.js @@ -0,0 +1,37 @@ +import rollup from "rollup"; +import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + +/** + * @type {rollup.RollupFileOptions} + */ +const config = { + input: "./esm/webPubSubManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], + output: { + file: "./dist/arm-webpubsub.js", + format: "umd", + name: "Azure.ArmWebpubsub", + sourcemap: true, + globals: { + "@azure/ms-rest-js": "msRest", + "@azure/ms-rest-azure-js": "msRestAzure" + }, + banner: `/* + * 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. + */` + }, + plugins: [ + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() + ] +}; + +export default config; diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/index.ts b/sdk/web-pubsub/arm-webpubsub/src/models/index.ts new file mode 100644 index 000000000000..bcc89b13c02a --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/models/index.ts @@ -0,0 +1,1815 @@ +/* + * 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 { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export { BaseResource, CloudError }; + +/** + * Specifications of the Dimension of metrics. + */ +export interface Dimension { + /** + * The public facing name of the dimension. + */ + name?: string; + /** + * Localized friendly display name of the dimension. + */ + displayName?: string; + /** + * Name of the dimension as it appears in MDM. + */ + internalName?: string; + /** + * A Boolean flag indicating whether this dimension should be included for the shoebox export + * scenario. + */ + toBeExportedForShoebox?: boolean; +} + +/** + * Managed identity settings for upstream. + */ +export interface ManagedIdentitySettings { + /** + * The Resource indicating the App ID URI of the target resource. + * It also appears in the aud (audience) claim of the issued token. + */ + resource?: string; +} + +/** + * Upstream auth settings. If not set, no auth is used for upstream messages. + */ +export interface UpstreamAuthSettings { + /** + * Possible values include: 'None', 'ManagedIdentity' + */ + type?: UpstreamAuthType; + managedIdentity?: ManagedIdentitySettings; +} + +/** + * Properties of event handler. + */ +export interface EventHandler { + /** + * Gets or sets the EventHandler URL template. You can use a predefined parameter {hub} and + * {event} inside the template, the value of the EventHandler URL is dynamically calculated when + * the client request comes in. + * For example, UrlTemplate can be `http://example.com/api/{hub}/{event}`. The host part can't + * contains parameters. + */ + urlTemplate: string; + /** + * Gets or sets the matching pattern for event names. + * There are 3 kind of patterns supported: + * 1. "*", it to matches any event name + * 2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" + * and "event2" + * 3. The single event name, for example, "event1", it matches "event1" + */ + userEventPattern?: string; + /** + * Gets ot sets the list of system events. + */ + systemEvents?: string[]; + auth?: UpstreamAuthSettings; +} + +/** + * Live trace category configuration of a Microsoft.SignalRService resource. + */ +export interface LiveTraceCategory { + /** + * Gets or sets the live trace category's name. + * Available values: ConnectivityLogs, MessagingLogs. + * Case insensitive. + */ + name?: string; + /** + * Indicates whether or the live trace category is enabled. + * Available values: true, false. + * Case insensitive. + */ + enabled?: string; +} + +/** + * Live trace configuration of a Microsoft.SignalRService resource. + */ +export interface LiveTraceConfiguration { + /** + * Indicates whether or not enable live trace. + * When it's set to true, live trace client can connect to the service. + * Otherwise, live trace client can't connect to the service, so that you are unable to receive + * any log, no matter what you configure in "categories". + * Available values: true, false. + * Case insensitive. Default value: 'false'. + */ + enabled?: string; + /** + * Gets or sets the list of category configurations. + */ + categories?: LiveTraceCategory[]; +} + +/** + * Specifications of the Logs for Azure Monitoring. + */ +export interface LogSpecification { + /** + * Name of the log. + */ + name?: string; + /** + * Localized friendly display name of the log. + */ + displayName?: string; +} + +/** + * Properties of user assigned identity. + */ +export interface UserAssignedIdentityProperty { + /** + * Get the principal id for the user assigned identity + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * Get the client id for the user assigned identity + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clientId?: string; +} + +/** + * A class represent managed identities used for request and response + */ +export interface ManagedIdentity { + /** + * Possible values include: 'None', 'SystemAssigned', 'UserAssigned' + */ + type?: ManagedIdentityType; + /** + * Get or set the user assigned identities + */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentityProperty }; + /** + * Get the principal id for the system assigned identity. + * Only be used in response. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * Get the tenant id for the system assigned identity. + * Only be used in response + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; +} + +/** + * Specifications of the Metrics for Azure Monitoring. + */ +export interface MetricSpecification { + /** + * Name of the metric. + */ + name?: string; + /** + * Localized friendly display name of the metric. + */ + displayName?: string; + /** + * Localized friendly description of the metric. + */ + displayDescription?: string; + /** + * The unit that makes sense for the metric. + */ + unit?: string; + /** + * Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. + */ + aggregationType?: string; + /** + * Optional. If set to true, then zero will be returned for time duration where no metric is + * emitted/published. + * Ex. a metric that returns the number of times a particular error code was emitted. The error + * code may not appear + * often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where + * nothing was emitted. + */ + fillGapWithZero?: string; + /** + * The name of the metric category that the metric belongs to. A metric can only belong to a + * single category. + */ + category?: string; + /** + * The dimensions of the metrics. + */ + dimensions?: Dimension[]; +} + +/** + * Result of the request to check name availability. It contains a flag and possible reason of + * failure. + */ +export interface NameAvailability { + /** + * Indicates whether the name is available or not. + */ + nameAvailable?: boolean; + /** + * The reason of the availability. Required if name is not available. + */ + reason?: string; + /** + * The message of the operation. + */ + message?: string; +} + +/** + * Data POST-ed to the nameAvailability action + */ +export interface NameAvailabilityParameters { + /** + * The resource type. Can be "Microsoft.SignalRService/SignalR" or + * "Microsoft.SignalRService/webPubSub" + */ + type: string; + /** + * The resource name to validate. e.g."my-resource-name" + */ + name: string; +} + +/** + * Network ACL + */ +export interface NetworkACL { + /** + * Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, + * RESTAPI. + */ + allow?: WebPubSubRequestType[]; + /** + * Denied request types. The value can be one or more of: ClientConnection, ServerConnection, + * RESTAPI. + */ + deny?: WebPubSubRequestType[]; +} + +/** + * The object that describes a operation. + */ +export interface OperationDisplay { + /** + * Friendly name of the resource provider + */ + provider?: string; + /** + * Resource type on which the operation is performed. + */ + resource?: string; + /** + * The localized friendly name for the operation. + */ + operation?: string; + /** + * The localized friendly description for the operation + */ + description?: string; +} + +/** + * An object that describes a specification. + */ +export interface ServiceSpecification { + /** + * Specifications of the Metrics for Azure Monitoring. + */ + metricSpecifications?: MetricSpecification[]; + /** + * Specifications of the Logs for Azure Monitoring. + */ + logSpecifications?: LogSpecification[]; +} + +/** + * Extra Operation properties. + */ +export interface OperationProperties { + serviceSpecification?: ServiceSpecification; +} + +/** + * REST API operation supported by resource provider. + */ +export interface Operation { + /** + * Name of the operation with format: {provider}/{resource}/{operation} + */ + name?: string; + /** + * If the operation is a data action. (for data plane rbac) + */ + isDataAction?: boolean; + display?: OperationDisplay; + /** + * Optional. The intended executor of the operation; governs the display of the operation in the + * RBAC UX and the audit logs UX. + */ + origin?: string; + properties?: OperationProperties; +} + +/** + * Private endpoint + */ +export interface PrivateEndpoint { + /** + * Full qualified Id of the private endpoint + */ + id?: string; +} + +/** + * ACL for a private endpoint + */ +export interface PrivateEndpointACL extends NetworkACL { + /** + * Name of the private endpoint connection + */ + name: string; +} + +/** + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { + /** + * The identity that created the resource. + */ + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + createdByType?: CreatedByType; + /** + * The timestamp of resource creation (UTC). + */ + createdAt?: Date; + /** + * The identity that last modified the resource. + */ + lastModifiedBy?: string; + /** + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The timestamp of resource last modification (UTC) + */ + lastModifiedAt?: Date; +} + +/** + * Connection state of the private endpoint connection + */ +export interface PrivateLinkServiceConnectionState { + /** + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + */ + status?: PrivateLinkServiceConnectionStatus; + /** + * The reason for approval/rejection of the connection. + */ + description?: string; + /** + * A message indicating if changes on the service provider require any updates on the consumer. + */ + actionsRequired?: string; +} + +/** + * The core properties of ARM resources. + */ +export interface Resource extends BaseResource { + /** + * Fully qualified resource Id for the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource - e.g. "Microsoft.SignalRService/SignalR" + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags + */ +export interface ProxyResource extends Resource { +} + +/** + * A private endpoint connection to an azure resource + */ +export interface PrivateEndpointConnection extends ProxyResource { + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; + /** + * Possible values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating', + * 'Updating', 'Deleting', 'Moving' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + privateEndpoint?: PrivateEndpoint; + /** + * Group IDs + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupIds?: string[]; + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; +} + +/** + * Describes the properties of a resource type that has been onboarded to private link service + */ +export interface ShareablePrivateLinkResourceProperties { + /** + * The description of the resource type that has been onboarded to private link service + */ + description?: string; + /** + * The resource provider group id for the resource that has been onboarded to private link + * service + */ + groupId?: string; + /** + * The resource provider type for the resource that has been onboarded to private link service + */ + type?: string; +} + +/** + * Describes a resource type that has been onboarded to private link service + */ +export interface ShareablePrivateLinkResourceType { + /** + * The name of the resource type that has been onboarded to private link service + */ + name?: string; + properties?: ShareablePrivateLinkResourceProperties; +} + +/** + * Private link resource + */ +export interface PrivateLinkResource extends ProxyResource { + /** + * Group Id of the private link resource + */ + groupId?: string; + /** + * Required members of the private link resource + */ + requiredMembers?: string[]; + /** + * Required private DNS zone names + */ + requiredZoneNames?: string[]; + /** + * The list of resources that are onboarded to private link service + */ + shareablePrivateLinkResourceTypes?: ShareablePrivateLinkResourceType[]; +} + +/** + * Parameters describes the request to regenerate access keys + */ +export interface RegenerateKeyParameters { + /** + * Possible values include: 'Primary', 'Secondary', 'Salt' + */ + keyType?: KeyType; +} + +/** + * Resource log category configuration of a Microsoft.SignalRService resource. + */ +export interface ResourceLogCategory { + /** + * Gets or sets the resource log category's name. + * Available values: ConnectivityLogs, MessagingLogs. + * Case insensitive. + */ + name?: string; + /** + * Indicates whether or the resource log category is enabled. + * Available values: true, false. + * Case insensitive. + */ + enabled?: string; +} + +/** + * Resource log configuration of a Microsoft.SignalRService resource. + */ +export interface ResourceLogConfiguration { + /** + * Gets or sets the list of category configurations. + */ + categories?: ResourceLogCategory[]; +} + +/** + * The billing information of the resource. + */ +export interface ResourceSku { + /** + * The name of the SKU. Required. + * + * Allowed values: Standard_S1, Free_F1 + */ + name: string; + /** + * Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + */ + tier?: WebPubSubSkuTier; + /** + * Not used. Retained for future use. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly size?: string; + /** + * Not used. Retained for future use. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly family?: string; + /** + * Optional, integer. The unit count of the resource. 1 by default. + * + * If present, following values are allowed: + * Free: 1 + * Standard: 1,2,5,10,20,50,100 + */ + capacity?: number; +} + +/** + * Describes a Shared Private Link Resource + */ +export interface SharedPrivateLinkResource extends ProxyResource { + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; + /** + * The group id from the provider of resource the shared private link resource is for + */ + groupId: string; + /** + * The resource id of the resource the shared private link resource is for + */ + privateLinkResourceId: string; + /** + * Possible values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating', + * 'Updating', 'Deleting', 'Moving' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * The request message for requesting approval of the shared private link resource + */ + requestMessage?: string; + /** + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: SharedPrivateLinkResourceStatus; +} + +/** + * Localizable String object containing the name and a localized value. + */ +export interface SignalRServiceUsageName { + /** + * The identifier of the usage. + */ + value?: string; + /** + * Localized name of the usage. + */ + localizedValue?: string; +} + +/** + * Object that describes a specific usage of the resources. + */ +export interface SignalRServiceUsage { + /** + * Fully qualified ARM resource id + */ + id?: string; + /** + * Current value for the usage quota. + */ + currentValue?: number; + /** + * The maximum permitted value for the usage quota. If there is no limit, this value will be -1. + */ + limit?: number; + name?: SignalRServiceUsageName; + /** + * Representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, + * Percent, CountPerSecond, BytesPerSecond. + */ + unit?: string; +} + +/** + * Describes scaling information of a sku. + */ +export interface SkuCapacity { + /** + * The lowest permitted capacity for this resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly minimum?: number; + /** + * The highest permitted capacity for this resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly maximum?: number; + /** + * The default capacity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly default?: number; + /** + * Allows capacity value list. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly allowedValues?: number[]; + /** + * Possible values include: 'None', 'Manual', 'Automatic' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly scaleType?: ScaleType; +} + +/** + * Describes an available sku." + */ +export interface Sku { + /** + * The resource type that this object applies to + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceType?: string; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sku?: ResourceSku; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly capacity?: SkuCapacity; +} + +/** + * The list skus operation response + */ +export interface SkuList { + /** + * The list of skus available for the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: Sku[]; + /** + * The URL the client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * The resource model definition for a ARM tracked top level resource. + */ +export interface TrackedResource extends Resource { + /** + * The GEO location of the resource. e.g. West US | East US | North Central US | South Central + * US. + */ + location?: string; + /** + * Tags of the service which is a list of key value pairs that describe the resource. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Properties of a hub. + */ +export interface WebPubSubHubProperties { + /** + * Event handler of a hub. + */ + eventHandlers?: EventHandler[]; + /** + * The settings for configuring if anonymous connections are allowed for this hub: "allow" or + * "deny". Default to "deny". Default value: 'deny'. + */ + anonymousConnectPolicy?: string; +} + +/** + * A hub setting + */ +export interface WebPubSubHub extends ProxyResource { + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; + properties: WebPubSubHubProperties; +} + +/** + * A class represents the access keys of the resource. + */ +export interface WebPubSubKeys { + /** + * The primary access key. + */ + primaryKey?: string; + /** + * The secondary access key. + */ + secondaryKey?: string; + /** + * Connection string constructed via the primaryKey + */ + primaryConnectionString?: string; + /** + * Connection string constructed via the secondaryKey + */ + secondaryConnectionString?: string; +} + +/** + * Network ACLs for the resource + */ +export interface WebPubSubNetworkACLs { + /** + * Possible values include: 'Allow', 'Deny' + */ + defaultAction?: ACLAction; + publicNetwork?: NetworkACL; + /** + * ACLs for requests from private endpoints + */ + privateEndpoints?: PrivateEndpointACL[]; +} + +/** + * TLS settings for the resource + */ +export interface WebPubSubTlsSettings { + /** + * Request client certificate during TLS handshake if enabled. Default value: true. + */ + clientCertEnabled?: boolean; +} + +/** + * A class represent a resource. + */ +export interface WebPubSubResource extends TrackedResource { + sku?: ResourceSku; + /** + * Possible values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating', + * 'Updating', 'Deleting', 'Moving' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * The publicly accessible IP of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly externalIP?: string; + /** + * FQDN of the service instance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hostName?: string; + /** + * The publicly accessible port of the resource which is designed for browser/client side usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly publicPort?: number; + /** + * The publicly accessible port of the resource which is designed for customer server side usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serverPort?: number; + /** + * Version of the resource. Probably you need the same or higher version of client SDKs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly version?: string; + /** + * Private endpoint connections to the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * The list of shared private link resources. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sharedPrivateLinkResources?: SharedPrivateLinkResource[]; + tls?: WebPubSubTlsSettings; + /** + * Deprecated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hostNamePrefix?: string; + liveTraceConfiguration?: LiveTraceConfiguration; + resourceLogConfiguration?: ResourceLogConfiguration; + networkACLs?: WebPubSubNetworkACLs; + /** + * Enable or disable public network access. Default to "Enabled". + * When it's Enabled, network ACLs still apply. + * When it's Disabled, public network access is always disabled no matter what you set in network + * ACLs. Default value: 'Enabled'. + */ + publicNetworkAccess?: string; + /** + * DisableLocalAuth + * Enable or disable local auth with AccessKey + * When set as true, connection with AccessKey=xxx won't work. Default value: false. + */ + disableLocalAuth?: boolean; + /** + * DisableLocalAuth + * Enable or disable aad auth + * When set as true, connection with AuthType=aad won't work. Default value: false. + */ + disableAadAuth?: boolean; + identity?: ManagedIdentity; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; +} + +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; +} + +/** + * The error detail. + */ +export interface ErrorDetail { + /** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.). + * @summary Error response + */ +export interface ErrorResponse { + /** + * The error object. + */ + error?: ErrorDetail; +} + +/** + * An interface representing WebPubSubManagementClientOptions. + */ +export interface WebPubSubManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * Result of the request to list REST API operations. It contains a list of operations. + * @extends Array + */ +export interface OperationList extends Array { + /** + * The URL the client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + */ + nextLink?: string; +} + +/** + * @interface + * Object that includes an array of resources and a possible link for next set. + * @extends Array + */ +export interface WebPubSubResourceList extends Array { + /** + * The URL the client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + */ + nextLink?: string; +} + +/** + * @interface + * Object that includes an array of the resource usages and a possible link for next set. + * @extends Array + */ +export interface SignalRServiceUsageList extends Array { + /** + * The URL the client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + */ + nextLink?: string; +} + +/** + * @interface + * Hub setting list + * @extends Array + */ +export interface WebPubSubHubList extends Array { + /** + * The URL the client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of private endpoint connections + * @extends Array + */ +export interface PrivateEndpointConnectionList extends Array { + /** + * 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; +} + +/** + * @interface + * Contains a list of PrivateLinkResource and a possible link to query more results + * @extends Array + */ +export interface PrivateLinkResourceList extends Array { + /** + * The URL the client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + */ + nextLink?: string; +} + +/** + * @interface + * A list of shared private link resources + * @extends Array + */ +export interface SharedPrivateLinkResourceList extends Array { + /** + * 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; +} + +/** + * Defines values for ACLAction. + * Possible values include: 'Allow', 'Deny' + * @readonly + * @enum {string} + */ +export type ACLAction = 'Allow' | 'Deny'; + +/** + * Defines values for UpstreamAuthType. + * Possible values include: 'None', 'ManagedIdentity' + * @readonly + * @enum {string} + */ +export type UpstreamAuthType = 'None' | 'ManagedIdentity'; + +/** + * Defines values for KeyType. + * Possible values include: 'Primary', 'Secondary', 'Salt' + * @readonly + * @enum {string} + */ +export type KeyType = 'Primary' | 'Secondary' | 'Salt'; + +/** + * Defines values for ManagedIdentityType. + * Possible values include: 'None', 'SystemAssigned', 'UserAssigned' + * @readonly + * @enum {string} + */ +export type ManagedIdentityType = 'None' | 'SystemAssigned' | 'UserAssigned'; + +/** + * Defines values for WebPubSubRequestType. + * Possible values include: 'ClientConnection', 'ServerConnection', 'RESTAPI', 'Trace' + * @readonly + * @enum {string} + */ +export type WebPubSubRequestType = 'ClientConnection' | 'ServerConnection' | 'RESTAPI' | 'Trace'; + +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating', + * 'Updating', 'Deleting', 'Moving' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Unknown' | 'Succeeded' | 'Failed' | 'Canceled' | 'Running' | 'Creating' | 'Updating' | 'Deleting' | 'Moving'; + +/** + * Defines values for PrivateLinkServiceConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type PrivateLinkServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected'; + +/** + * Defines values for WebPubSubSkuTier. + * Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * @readonly + * @enum {string} + */ +export type WebPubSubSkuTier = 'Free' | 'Basic' | 'Standard' | 'Premium'; + +/** + * Defines values for ScaleType. + * Possible values include: 'None', 'Manual', 'Automatic' + * @readonly + * @enum {string} + */ +export type ScaleType = 'None' | 'Manual' | 'Automatic'; + +/** + * Defines values for SharedPrivateLinkResourceStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout' + * @readonly + * @enum {string} + */ +export type SharedPrivateLinkResourceStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected' | 'Timeout'; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationList; + }; +}; + +/** + * Contains response data for the checkNameAvailability operation. + */ +export type WebPubSubCheckNameAvailabilityResponse = NameAvailability & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: NameAvailability; + }; +}; + +/** + * Contains response data for the listBySubscription operation. + */ +export type WebPubSubListBySubscriptionResponse = WebPubSubResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubResourceList; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type WebPubSubListByResourceGroupResponse = WebPubSubResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubResourceList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type WebPubSubGetResponse = WebPubSubResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubResource; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type WebPubSubCreateOrUpdateResponse = WebPubSubResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubResource; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type WebPubSubUpdateResponse = WebPubSubResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubResource; + }; +}; + +/** + * Contains response data for the listKeys operation. + */ +export type WebPubSubListKeysResponse = WebPubSubKeys & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubKeys; + }; +}; + +/** + * Contains response data for the regenerateKey operation. + */ +export type WebPubSubRegenerateKeyResponse = WebPubSubKeys & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubKeys; + }; +}; + +/** + * Contains response data for the listSkus operation. + */ +export type WebPubSubListSkusResponse = SkuList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SkuList; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type WebPubSubBeginCreateOrUpdateResponse = WebPubSubResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubResource; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type WebPubSubBeginUpdateResponse = WebPubSubResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubResource; + }; +}; + +/** + * Contains response data for the beginRegenerateKey operation. + */ +export type WebPubSubBeginRegenerateKeyResponse = WebPubSubKeys & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubKeys; + }; +}; + +/** + * Contains response data for the listBySubscriptionNext operation. + */ +export type WebPubSubListBySubscriptionNextResponse = WebPubSubResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubResourceList; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type WebPubSubListByResourceGroupNextResponse = WebPubSubResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubResourceList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type UsagesListResponse = SignalRServiceUsageList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SignalRServiceUsageList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type UsagesListNextResponse = SignalRServiceUsageList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SignalRServiceUsageList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type WebPubSubHubsListResponse = WebPubSubHubList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubHubList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type WebPubSubHubsGetResponse = WebPubSubHub & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubHub; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type WebPubSubHubsCreateOrUpdateResponse = WebPubSubHub & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubHub; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type WebPubSubHubsBeginCreateOrUpdateResponse = WebPubSubHub & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubHub; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type WebPubSubHubsListNextResponse = WebPubSubHubList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebPubSubHubList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type WebPubSubPrivateEndpointConnectionsListResponse = PrivateEndpointConnectionList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnectionList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type WebPubSubPrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type WebPubSubPrivateEndpointConnectionsUpdateResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type WebPubSubPrivateEndpointConnectionsListNextResponse = PrivateEndpointConnectionList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnectionList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type WebPubSubPrivateLinkResourcesListResponse = PrivateLinkResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateLinkResourceList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type WebPubSubPrivateLinkResourcesListNextResponse = PrivateLinkResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateLinkResourceList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type WebPubSubSharedPrivateLinkResourcesListResponse = SharedPrivateLinkResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SharedPrivateLinkResourceList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type WebPubSubSharedPrivateLinkResourcesGetResponse = SharedPrivateLinkResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SharedPrivateLinkResource; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type WebPubSubSharedPrivateLinkResourcesCreateOrUpdateResponse = SharedPrivateLinkResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SharedPrivateLinkResource; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type WebPubSubSharedPrivateLinkResourcesBeginCreateOrUpdateResponse = SharedPrivateLinkResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SharedPrivateLinkResource; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type WebPubSubSharedPrivateLinkResourcesListNextResponse = SharedPrivateLinkResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SharedPrivateLinkResourceList; + }; +}; diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/mappers.ts b/sdk/web-pubsub/arm-webpubsub/src/models/mappers.ts new file mode 100644 index 000000000000..d17a52d3fca4 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/models/mappers.ts @@ -0,0 +1,1799 @@ +/* + * 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 { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const Dimension: msRest.CompositeMapper = { + serializedName: "Dimension", + type: { + name: "Composite", + className: "Dimension", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + internalName: { + serializedName: "internalName", + type: { + name: "String" + } + }, + toBeExportedForShoebox: { + serializedName: "toBeExportedForShoebox", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ManagedIdentitySettings: msRest.CompositeMapper = { + serializedName: "ManagedIdentitySettings", + type: { + name: "Composite", + className: "ManagedIdentitySettings", + modelProperties: { + resource: { + serializedName: "resource", + type: { + name: "String" + } + } + } + } +}; + +export const UpstreamAuthSettings: msRest.CompositeMapper = { + serializedName: "UpstreamAuthSettings", + type: { + name: "Composite", + className: "UpstreamAuthSettings", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + managedIdentity: { + serializedName: "managedIdentity", + type: { + name: "Composite", + className: "ManagedIdentitySettings" + } + } + } + } +}; + +export const EventHandler: msRest.CompositeMapper = { + serializedName: "EventHandler", + type: { + name: "Composite", + className: "EventHandler", + modelProperties: { + urlTemplate: { + required: true, + serializedName: "urlTemplate", + type: { + name: "String" + } + }, + userEventPattern: { + serializedName: "userEventPattern", + type: { + name: "String" + } + }, + systemEvents: { + serializedName: "systemEvents", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + auth: { + serializedName: "auth", + type: { + name: "Composite", + className: "UpstreamAuthSettings" + } + } + } + } +}; + +export const LiveTraceCategory: msRest.CompositeMapper = { + serializedName: "LiveTraceCategory", + type: { + name: "Composite", + className: "LiveTraceCategory", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + enabled: { + serializedName: "enabled", + type: { + name: "String" + } + } + } + } +}; + +export const LiveTraceConfiguration: msRest.CompositeMapper = { + serializedName: "LiveTraceConfiguration", + type: { + name: "Composite", + className: "LiveTraceConfiguration", + modelProperties: { + enabled: { + serializedName: "enabled", + defaultValue: 'false', + type: { + name: "String" + } + }, + categories: { + serializedName: "categories", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LiveTraceCategory" + } + } + } + } + } + } +}; + +export const LogSpecification: msRest.CompositeMapper = { + serializedName: "LogSpecification", + type: { + name: "Composite", + className: "LogSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + } + } + } +}; + +export const UserAssignedIdentityProperty: msRest.CompositeMapper = { + serializedName: "UserAssignedIdentityProperty", + type: { + name: "Composite", + className: "UserAssignedIdentityProperty", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + clientId: { + readOnly: true, + serializedName: "clientId", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedIdentity: msRest.CompositeMapper = { + serializedName: "ManagedIdentity", + type: { + name: "Composite", + className: "ManagedIdentity", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "UserAssignedIdentityProperty" + } + } + } + }, + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + } + } + } +}; + +export const MetricSpecification: msRest.CompositeMapper = { + serializedName: "MetricSpecification", + type: { + name: "Composite", + className: "MetricSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + displayDescription: { + serializedName: "displayDescription", + type: { + name: "String" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + aggregationType: { + serializedName: "aggregationType", + type: { + name: "String" + } + }, + fillGapWithZero: { + serializedName: "fillGapWithZero", + type: { + name: "String" + } + }, + category: { + serializedName: "category", + type: { + name: "String" + } + }, + dimensions: { + serializedName: "dimensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Dimension" + } + } + } + } + } + } +}; + +export const NameAvailability: msRest.CompositeMapper = { + serializedName: "NameAvailability", + type: { + name: "Composite", + className: "NameAvailability", + modelProperties: { + nameAvailable: { + serializedName: "nameAvailable", + type: { + name: "Boolean" + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const NameAvailabilityParameters: msRest.CompositeMapper = { + serializedName: "NameAvailabilityParameters", + type: { + name: "Composite", + className: "NameAvailabilityParameters", + modelProperties: { + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + }, + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkACL: msRest.CompositeMapper = { + serializedName: "NetworkACL", + type: { + name: "Composite", + className: "NetworkACL", + modelProperties: { + allow: { + serializedName: "allow", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + deny: { + serializedName: "deny", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceSpecification: msRest.CompositeMapper = { + serializedName: "ServiceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification", + modelProperties: { + metricSpecifications: { + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricSpecification" + } + } + } + }, + logSpecifications: { + serializedName: "logSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LogSpecification" + } + } + } + } + } + } +}; + +export const OperationProperties: msRest.CompositeMapper = { + serializedName: "OperationProperties", + type: { + name: "Composite", + className: "OperationProperties", + modelProperties: { + serviceSpecification: { + serializedName: "serviceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "OperationProperties" + } + } + } + } +}; + +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointACL: msRest.CompositeMapper = { + serializedName: "PrivateEndpointACL", + type: { + name: "Composite", + className: "PrivateEndpointACL", + modelProperties: { + ...NetworkACL.type.modelProperties, + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + groupIds: { + readOnly: true, + serializedName: "properties.groupIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + } + } + } +}; + +export const ShareablePrivateLinkResourceProperties: msRest.CompositeMapper = { + serializedName: "ShareablePrivateLinkResourceProperties", + type: { + name: "Composite", + className: "ShareablePrivateLinkResourceProperties", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String" + } + }, + groupId: { + serializedName: "groupId", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ShareablePrivateLinkResourceType: msRest.CompositeMapper = { + serializedName: "ShareablePrivateLinkResourceType", + type: { + name: "Composite", + className: "ShareablePrivateLinkResourceType", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ShareablePrivateLinkResourceProperties" + } + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + groupId: { + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + shareablePrivateLinkResourceTypes: { + serializedName: "properties.shareablePrivateLinkResourceTypes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ShareablePrivateLinkResourceType" + } + } + } + } + } + } +}; + +export const RegenerateKeyParameters: msRest.CompositeMapper = { + serializedName: "RegenerateKeyParameters", + type: { + name: "Composite", + className: "RegenerateKeyParameters", + modelProperties: { + keyType: { + serializedName: "keyType", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceLogCategory: msRest.CompositeMapper = { + serializedName: "ResourceLogCategory", + type: { + name: "Composite", + className: "ResourceLogCategory", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + enabled: { + serializedName: "enabled", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceLogConfiguration: msRest.CompositeMapper = { + serializedName: "ResourceLogConfiguration", + type: { + name: "Composite", + className: "ResourceLogConfiguration", + modelProperties: { + categories: { + serializedName: "categories", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceLogCategory" + } + } + } + } + } + } +}; + +export const ResourceSku: msRest.CompositeMapper = { + serializedName: "ResourceSku", + type: { + name: "Composite", + className: "ResourceSku", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + type: { + name: "String" + } + }, + size: { + readOnly: true, + serializedName: "size", + type: { + name: "String" + } + }, + family: { + readOnly: true, + serializedName: "family", + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Number" + } + } + } + } +}; + +export const SharedPrivateLinkResource: msRest.CompositeMapper = { + serializedName: "SharedPrivateLinkResource", + type: { + name: "Composite", + className: "SharedPrivateLinkResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + groupId: { + required: true, + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + privateLinkResourceId: { + required: true, + serializedName: "properties.privateLinkResourceId", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + requestMessage: { + serializedName: "properties.requestMessage", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + } + } + } +}; + +export const SignalRServiceUsageName: msRest.CompositeMapper = { + serializedName: "SignalRServiceUsageName", + type: { + name: "Composite", + className: "SignalRServiceUsageName", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "String" + } + }, + localizedValue: { + serializedName: "localizedValue", + type: { + name: "String" + } + } + } + } +}; + +export const SignalRServiceUsage: msRest.CompositeMapper = { + serializedName: "SignalRServiceUsage", + type: { + name: "Composite", + className: "SignalRServiceUsage", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + currentValue: { + serializedName: "currentValue", + type: { + name: "Number" + } + }, + limit: { + serializedName: "limit", + type: { + name: "Number" + } + }, + name: { + serializedName: "name", + type: { + name: "Composite", + className: "SignalRServiceUsageName" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + } + } + } +}; + +export const SkuCapacity: msRest.CompositeMapper = { + serializedName: "SkuCapacity", + type: { + name: "Composite", + className: "SkuCapacity", + modelProperties: { + minimum: { + readOnly: true, + serializedName: "minimum", + type: { + name: "Number" + } + }, + maximum: { + readOnly: true, + serializedName: "maximum", + type: { + name: "Number" + } + }, + default: { + readOnly: true, + serializedName: "default", + type: { + name: "Number" + } + }, + allowedValues: { + readOnly: true, + serializedName: "allowedValues", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } + }, + scaleType: { + readOnly: true, + serializedName: "scaleType", + type: { + name: "String" + } + } + } + } +}; + +export const Sku: msRest.CompositeMapper = { + serializedName: "Sku", + type: { + name: "Composite", + className: "Sku", + modelProperties: { + resourceType: { + readOnly: true, + serializedName: "resourceType", + type: { + name: "String" + } + }, + sku: { + readOnly: true, + serializedName: "sku", + type: { + name: "Composite", + className: "ResourceSku" + } + }, + capacity: { + readOnly: true, + serializedName: "capacity", + type: { + name: "Composite", + className: "SkuCapacity" + } + } + } + } +}; + +export const SkuList: msRest.CompositeMapper = { + serializedName: "SkuList", + type: { + name: "Composite", + className: "SkuList", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Sku" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const WebPubSubHubProperties: msRest.CompositeMapper = { + serializedName: "WebPubSubHubProperties", + type: { + name: "Composite", + className: "WebPubSubHubProperties", + modelProperties: { + eventHandlers: { + serializedName: "eventHandlers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EventHandler" + } + } + } + }, + anonymousConnectPolicy: { + serializedName: "anonymousConnectPolicy", + defaultValue: 'deny', + type: { + name: "String" + } + } + } + } +}; + +export const WebPubSubHub: msRest.CompositeMapper = { + serializedName: "WebPubSubHub", + type: { + name: "Composite", + className: "WebPubSubHub", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "WebPubSubHubProperties" + } + } + } + } +}; + +export const WebPubSubKeys: msRest.CompositeMapper = { + serializedName: "WebPubSubKeys", + type: { + name: "Composite", + className: "WebPubSubKeys", + modelProperties: { + primaryKey: { + serializedName: "primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + serializedName: "secondaryKey", + type: { + name: "String" + } + }, + primaryConnectionString: { + serializedName: "primaryConnectionString", + type: { + name: "String" + } + }, + secondaryConnectionString: { + serializedName: "secondaryConnectionString", + type: { + name: "String" + } + } + } + } +}; + +export const WebPubSubNetworkACLs: msRest.CompositeMapper = { + serializedName: "WebPubSubNetworkACLs", + type: { + name: "Composite", + className: "WebPubSubNetworkACLs", + modelProperties: { + defaultAction: { + serializedName: "defaultAction", + type: { + name: "String" + } + }, + publicNetwork: { + serializedName: "publicNetwork", + type: { + name: "Composite", + className: "NetworkACL" + } + }, + privateEndpoints: { + serializedName: "privateEndpoints", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointACL" + } + } + } + } + } + } +}; + +export const WebPubSubTlsSettings: msRest.CompositeMapper = { + serializedName: "WebPubSubTlsSettings", + type: { + name: "Composite", + className: "WebPubSubTlsSettings", + modelProperties: { + clientCertEnabled: { + serializedName: "clientCertEnabled", + defaultValue: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const WebPubSubResource: msRest.CompositeMapper = { + serializedName: "WebPubSubResource", + type: { + name: "Composite", + className: "WebPubSubResource", + modelProperties: { + ...TrackedResource.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "ResourceSku" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + externalIP: { + readOnly: true, + serializedName: "properties.externalIP", + type: { + name: "String" + } + }, + hostName: { + readOnly: true, + serializedName: "properties.hostName", + type: { + name: "String" + } + }, + publicPort: { + readOnly: true, + serializedName: "properties.publicPort", + type: { + name: "Number" + } + }, + serverPort: { + readOnly: true, + serializedName: "properties.serverPort", + type: { + name: "Number" + } + }, + version: { + readOnly: true, + serializedName: "properties.version", + type: { + name: "String" + } + }, + privateEndpointConnections: { + readOnly: true, + serializedName: "properties.privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + sharedPrivateLinkResources: { + readOnly: true, + serializedName: "properties.sharedPrivateLinkResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SharedPrivateLinkResource" + } + } + } + }, + tls: { + serializedName: "properties.tls", + type: { + name: "Composite", + className: "WebPubSubTlsSettings" + } + }, + hostNamePrefix: { + readOnly: true, + serializedName: "properties.hostNamePrefix", + type: { + name: "String" + } + }, + liveTraceConfiguration: { + serializedName: "properties.liveTraceConfiguration", + type: { + name: "Composite", + className: "LiveTraceConfiguration" + } + }, + resourceLogConfiguration: { + serializedName: "properties.resourceLogConfiguration", + type: { + name: "Composite", + className: "ResourceLogConfiguration" + } + }, + networkACLs: { + serializedName: "properties.networkACLs", + type: { + name: "Composite", + className: "WebPubSubNetworkACLs" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + defaultValue: 'Enabled', + type: { + name: "String" + } + }, + disableLocalAuth: { + serializedName: "properties.disableLocalAuth", + defaultValue: false, + type: { + name: "Boolean" + } + }, + disableAadAuth: { + serializedName: "properties.disableAadAuth", + defaultValue: false, + type: { + name: "Boolean" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedIdentity" + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" + } + } + } + } +}; + +export const ErrorDetail: msRest.CompositeMapper = { + serializedName: "ErrorDetail", + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const OperationList: msRest.CompositeMapper = { + serializedName: "OperationList", + type: { + name: "Composite", + className: "OperationList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const WebPubSubResourceList: msRest.CompositeMapper = { + serializedName: "WebPubSubResourceList", + type: { + name: "Composite", + className: "WebPubSubResourceList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WebPubSubResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SignalRServiceUsageList: msRest.CompositeMapper = { + serializedName: "SignalRServiceUsageList", + type: { + name: "Composite", + className: "SignalRServiceUsageList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SignalRServiceUsage" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const WebPubSubHubList: msRest.CompositeMapper = { + serializedName: "WebPubSubHubList", + type: { + name: "Composite", + className: "WebPubSubHubList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WebPubSubHub" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionList: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionList", + type: { + name: "Composite", + className: "PrivateEndpointConnectionList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourceList: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceList", + type: { + name: "Composite", + className: "PrivateLinkResourceList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SharedPrivateLinkResourceList: msRest.CompositeMapper = { + serializedName: "SharedPrivateLinkResourceList", + type: { + name: "Composite", + className: "SharedPrivateLinkResourceList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SharedPrivateLinkResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/operationsMappers.ts b/sdk/web-pubsub/arm-webpubsub/src/models/operationsMappers.ts new file mode 100644 index 000000000000..f63b68699e14 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/models/operationsMappers.ts @@ -0,0 +1,21 @@ +/* + * 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. + */ + +export { + Dimension, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + LogSpecification, + MetricSpecification, + Operation, + OperationDisplay, + OperationList, + OperationProperties, + ServiceSpecification +} from "../models/mappers"; diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/parameters.ts b/sdk/web-pubsub/arm-webpubsub/src/models/parameters.ts new file mode 100644 index 000000000000..927818537ebc --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/models/parameters.ts @@ -0,0 +1,112 @@ +/* + * 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 * as msRest from "@azure/ms-rest-js"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const apiVersion: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; +export const hubName: msRest.OperationURLParameter = { + parameterPath: "hubName", + mapper: { + required: true, + serializedName: "hubName", + type: { + name: "String" + } + } +}; +export const location: msRest.OperationURLParameter = { + parameterPath: "location", + mapper: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + type: { + name: "String" + } + } +}; +export const resourceName: msRest.OperationURLParameter = { + parameterPath: "resourceName", + mapper: { + required: true, + serializedName: "resourceName", + type: { + name: "String" + } + } +}; +export const sharedPrivateLinkResourceName: msRest.OperationURLParameter = { + parameterPath: "sharedPrivateLinkResourceName", + mapper: { + required: true, + serializedName: "sharedPrivateLinkResourceName", + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/usagesMappers.ts b/sdk/web-pubsub/arm-webpubsub/src/models/usagesMappers.ts new file mode 100644 index 000000000000..f07e3b0819e7 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/models/usagesMappers.ts @@ -0,0 +1,16 @@ +/* + * 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. + */ + +export { + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + SignalRServiceUsage, + SignalRServiceUsageList, + SignalRServiceUsageName +} from "../models/mappers"; diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/webPubSubHubsMappers.ts b/sdk/web-pubsub/arm-webpubsub/src/models/webPubSubHubsMappers.ts new file mode 100644 index 000000000000..6cb86bf0afef --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/models/webPubSubHubsMappers.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. + */ + +export { + BaseResource, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + EventHandler, + LiveTraceCategory, + LiveTraceConfiguration, + ManagedIdentity, + ManagedIdentitySettings, + NetworkACL, + PrivateEndpoint, + PrivateEndpointACL, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + Resource, + ResourceLogCategory, + ResourceLogConfiguration, + ResourceSku, + ShareablePrivateLinkResourceProperties, + ShareablePrivateLinkResourceType, + SharedPrivateLinkResource, + SystemData, + TrackedResource, + UpstreamAuthSettings, + UserAssignedIdentityProperty, + WebPubSubHub, + WebPubSubHubList, + WebPubSubHubProperties, + WebPubSubNetworkACLs, + WebPubSubResource, + WebPubSubTlsSettings +} from "../models/mappers"; diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/webPubSubMappers.ts b/sdk/web-pubsub/arm-webpubsub/src/models/webPubSubMappers.ts new file mode 100644 index 000000000000..165a071677c7 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/models/webPubSubMappers.ts @@ -0,0 +1,50 @@ +/* + * 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. + */ + +export { + BaseResource, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + EventHandler, + LiveTraceCategory, + LiveTraceConfiguration, + ManagedIdentity, + ManagedIdentitySettings, + NameAvailability, + NameAvailabilityParameters, + NetworkACL, + PrivateEndpoint, + PrivateEndpointACL, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + RegenerateKeyParameters, + Resource, + ResourceLogCategory, + ResourceLogConfiguration, + ResourceSku, + ShareablePrivateLinkResourceProperties, + ShareablePrivateLinkResourceType, + SharedPrivateLinkResource, + Sku, + SkuCapacity, + SkuList, + SystemData, + TrackedResource, + UpstreamAuthSettings, + UserAssignedIdentityProperty, + WebPubSubHub, + WebPubSubHubProperties, + WebPubSubKeys, + WebPubSubNetworkACLs, + WebPubSubResource, + WebPubSubResourceList, + WebPubSubTlsSettings +} from "../models/mappers"; diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/webPubSubPrivateEndpointConnectionsMappers.ts b/sdk/web-pubsub/arm-webpubsub/src/models/webPubSubPrivateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..5dfac81ff862 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/models/webPubSubPrivateEndpointConnectionsMappers.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. + */ + +export { + BaseResource, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + EventHandler, + LiveTraceCategory, + LiveTraceConfiguration, + ManagedIdentity, + ManagedIdentitySettings, + NetworkACL, + PrivateEndpoint, + PrivateEndpointACL, + PrivateEndpointConnection, + PrivateEndpointConnectionList, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + Resource, + ResourceLogCategory, + ResourceLogConfiguration, + ResourceSku, + ShareablePrivateLinkResourceProperties, + ShareablePrivateLinkResourceType, + SharedPrivateLinkResource, + SystemData, + TrackedResource, + UpstreamAuthSettings, + UserAssignedIdentityProperty, + WebPubSubHub, + WebPubSubHubProperties, + WebPubSubNetworkACLs, + WebPubSubResource, + WebPubSubTlsSettings +} from "../models/mappers"; diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/webPubSubPrivateLinkResourcesMappers.ts b/sdk/web-pubsub/arm-webpubsub/src/models/webPubSubPrivateLinkResourcesMappers.ts new file mode 100644 index 000000000000..50db9ad2acfb --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/models/webPubSubPrivateLinkResourcesMappers.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. + */ + +export { + BaseResource, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + EventHandler, + LiveTraceCategory, + LiveTraceConfiguration, + ManagedIdentity, + ManagedIdentitySettings, + NetworkACL, + PrivateEndpoint, + PrivateEndpointACL, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkResourceList, + PrivateLinkServiceConnectionState, + ProxyResource, + Resource, + ResourceLogCategory, + ResourceLogConfiguration, + ResourceSku, + ShareablePrivateLinkResourceProperties, + ShareablePrivateLinkResourceType, + SharedPrivateLinkResource, + SystemData, + TrackedResource, + UpstreamAuthSettings, + UserAssignedIdentityProperty, + WebPubSubHub, + WebPubSubHubProperties, + WebPubSubNetworkACLs, + WebPubSubResource, + WebPubSubTlsSettings +} from "../models/mappers"; diff --git a/sdk/web-pubsub/arm-webpubsub/src/models/webPubSubSharedPrivateLinkResourcesMappers.ts b/sdk/web-pubsub/arm-webpubsub/src/models/webPubSubSharedPrivateLinkResourcesMappers.ts new file mode 100644 index 000000000000..7ed75798f249 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/models/webPubSubSharedPrivateLinkResourcesMappers.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. + */ + +export { + BaseResource, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + EventHandler, + LiveTraceCategory, + LiveTraceConfiguration, + ManagedIdentity, + ManagedIdentitySettings, + NetworkACL, + PrivateEndpoint, + PrivateEndpointACL, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + Resource, + ResourceLogCategory, + ResourceLogConfiguration, + ResourceSku, + ShareablePrivateLinkResourceProperties, + ShareablePrivateLinkResourceType, + SharedPrivateLinkResource, + SharedPrivateLinkResourceList, + SystemData, + TrackedResource, + UpstreamAuthSettings, + UserAssignedIdentityProperty, + WebPubSubHub, + WebPubSubHubProperties, + WebPubSubNetworkACLs, + WebPubSubResource, + WebPubSubTlsSettings +} from "../models/mappers"; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/index.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/index.ts new file mode 100644 index 000000000000..788c6bb10ad4 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/index.ts @@ -0,0 +1,16 @@ +/* + * 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. + */ + +export * from "./operations"; +export * from "./webPubSub"; +export * from "./usages"; +export * from "./webPubSubHubs"; +export * from "./webPubSubPrivateEndpointConnections"; +export * from "./webPubSubPrivateLinkResources"; +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 new file mode 100644 index 000000000000..b9fd933da9d3 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/operations.ts @@ -0,0 +1,125 @@ +/* + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { WebPubSubManagementClientContext } from "../webPubSubManagementClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: WebPubSubManagementClientContext; + + /** + * Create a Operations. + * @param {WebPubSubManagementClientContext} client Reference to the service client. + */ + constructor(client: WebPubSubManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the available REST API operations of the Microsoft.SignalRService provider. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all of the available REST API operations of the Microsoft.SignalRService provider. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.SignalRService/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/usages.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/usages.ts new file mode 100644 index 000000000000..fde59ebe5cd3 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/usages.ts @@ -0,0 +1,133 @@ +/* + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/usagesMappers"; +import * as Parameters from "../models/parameters"; +import { WebPubSubManagementClientContext } from "../webPubSubManagementClientContext"; + +/** Class representing a Usages. */ +export class Usages { + private readonly client: WebPubSubManagementClientContext; + + /** + * Create a Usages. + * @param {WebPubSubManagementClientContext} client Reference to the service client. + */ + constructor(client: WebPubSubManagementClientContext) { + this.client = client; + } + + /** + * List resource usage quotas by location. + * @param location the location like "eastus" + * @param [options] The optional parameters + * @returns Promise + */ + list(location: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location the location like "eastus" + * @param callback The callback + */ + list(location: string, callback: msRest.ServiceCallback): void; + /** + * @param location the location like "eastus" + * @param options The optional parameters + * @param callback The callback + */ + list(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * List resource usage quotas by location. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/usages", + urlParameters: [ + Parameters.location, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SignalRServiceUsageList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SignalRServiceUsageList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSub.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSub.ts new file mode 100644 index 000000000000..ab71157c7910 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSub.ts @@ -0,0 +1,800 @@ +/* + * 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 * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/webPubSubMappers"; +import * as Parameters from "../models/parameters"; +import { WebPubSubManagementClientContext } from "../webPubSubManagementClientContext"; + +/** Class representing a WebPubSub. */ +export class WebPubSub { + private readonly client: WebPubSubManagementClientContext; + + /** + * Create a WebPubSub. + * @param {WebPubSubManagementClientContext} client Reference to the service client. + */ + constructor(client: WebPubSubManagementClientContext) { + this.client = client; + } + + /** + * Checks that the resource name is valid and is not already in use. + * @param location the region + * @param parameters Parameters supplied to the operation. + * @param [options] The optional parameters + * @returns Promise + */ + checkNameAvailability(location: string, parameters: Models.NameAvailabilityParameters, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location the region + * @param parameters Parameters supplied to the operation. + * @param callback The callback + */ + checkNameAvailability(location: string, parameters: Models.NameAvailabilityParameters, callback: msRest.ServiceCallback): void; + /** + * @param location the region + * @param parameters Parameters supplied to the operation. + * @param options The optional parameters + * @param callback The callback + */ + checkNameAvailability(location: string, parameters: Models.NameAvailabilityParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkNameAvailability(location: string, parameters: Models.NameAvailabilityParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + parameters, + options + }, + checkNameAvailabilityOperationSpec, + callback) as Promise; + } + + /** + * Handles requests to list all resources in a subscription. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Handles requests to list all resources in a resource group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Get the resource and its properties. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create or update a resource. + * @param parameters Parameters for the create or update operation + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(parameters: Models.WebPubSubResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(parameters,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Operation to delete a resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Operation to update an exiting resource. + * @param parameters Parameters for the update operation + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + update(parameters: Models.WebPubSubResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(parameters,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Get the access keys of the resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + listKeys(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param callback The callback + */ + listKeys(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + listKeys(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listKeys(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listKeysOperationSpec, + callback) as Promise; + } + + /** + * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at + * the same time. + * @param parameters Parameter that describes the Regenerate Key Operation. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + regenerateKey(parameters: Models.RegenerateKeyParameters, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRegenerateKey(parameters,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Operation to restart a resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + restart(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRestart(resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * List all available skus of the resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + listSkus(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param callback The callback + */ + listSkus(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + listSkus(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSkus(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listSkusOperationSpec, + callback) as Promise; + } + + /** + * Create or update a resource. + * @param parameters Parameters for the create or update operation + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(parameters: Models.WebPubSubResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + parameters, + resourceGroupName, + resourceName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Operation to delete a resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Operation to update an exiting resource. + * @param parameters Parameters for the update operation + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(parameters: Models.WebPubSubResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + parameters, + resourceGroupName, + resourceName, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at + * the same time. + * @param parameters Parameter that describes the Regenerate Key Operation. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginRegenerateKey(parameters: Models.RegenerateKeyParameters, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + parameters, + resourceGroupName, + resourceName, + options + }, + beginRegenerateKeyOperationSpec, + options); + } + + /** + * Operation to restart a resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginRestart(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + options + }, + beginRestartOperationSpec, + options); + } + + /** + * Handles requests to list all resources in a subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } + + /** + * Handles requests to list all resources in a resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability", + urlParameters: [ + Parameters.location, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.NameAvailabilityParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.NameAvailability + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/webPubSub", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WebPubSubResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WebPubSubResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WebPubSubResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/listKeys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WebPubSubKeys + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listSkusOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/skus", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SkuList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.WebPubSubResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WebPubSubResource + }, + 201: { + bodyMapper: Mappers.WebPubSubResource + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.WebPubSubResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WebPubSubResource + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginRegenerateKeyOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/regenerateKey", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.RegenerateKeyParameters, + required: true + } + }, + responses: { + 202: { + bodyMapper: Mappers.WebPubSubKeys + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginRestartOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/restart", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WebPubSubResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WebPubSubResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubHubs.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubHubs.ts new file mode 100644 index 000000000000..eb11b44b368b --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubHubs.ts @@ -0,0 +1,342 @@ +/* + * 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 * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/webPubSubHubsMappers"; +import * as Parameters from "../models/parameters"; +import { WebPubSubManagementClientContext } from "../webPubSubManagementClientContext"; + +/** Class representing a WebPubSubHubs. */ +export class WebPubSubHubs { + private readonly client: WebPubSubManagementClientContext; + + /** + * Create a WebPubSubHubs. + * @param {WebPubSubManagementClientContext} client Reference to the service client. + */ + constructor(client: WebPubSubManagementClientContext) { + this.client = client; + } + + /** + * List hub settings. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param callback The callback + */ + list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get a hub setting. + * @param hubName The hub name. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(hubName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param hubName The hub name. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param callback The callback + */ + get(hubName: string, resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param hubName The hub name. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + get(hubName: string, resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(hubName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + hubName, + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create or update a hub setting. + * @param hubName The hub name. + * @param parameters The resource of WebPubSubHub and its properties + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(hubName: string, parameters: Models.WebPubSubHub, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(hubName,parameters,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Delete a hub setting. + * @param hubName The hub name. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(hubName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(hubName,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Create or update a hub setting. + * @param hubName The hub name. + * @param parameters The resource of WebPubSubHub and its properties + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(hubName: string, parameters: Models.WebPubSubHub, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + hubName, + parameters, + resourceGroupName, + resourceName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Delete a hub setting. + * @param hubName The hub name. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(hubName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + hubName, + resourceGroupName, + resourceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * List hub settings. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WebPubSubHubList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}", + urlParameters: [ + Parameters.hubName, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WebPubSubHub + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}", + urlParameters: [ + Parameters.hubName, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.WebPubSubHub, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WebPubSubHub + }, + 201: { + bodyMapper: Mappers.WebPubSubHub + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}", + urlParameters: [ + Parameters.hubName, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WebPubSubHubList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateEndpointConnections.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateEndpointConnections.ts new file mode 100644 index 000000000000..75c55a48f3b8 --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateEndpointConnections.ts @@ -0,0 +1,344 @@ +/* + * 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 * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/webPubSubPrivateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { WebPubSubManagementClientContext } from "../webPubSubManagementClientContext"; + +/** Class representing a WebPubSubPrivateEndpointConnections. */ +export class WebPubSubPrivateEndpointConnections { + private readonly client: WebPubSubManagementClientContext; + + /** + * Create a WebPubSubPrivateEndpointConnections. + * @param {WebPubSubManagementClientContext} client Reference to the service client. + */ + constructor(client: WebPubSubManagementClientContext) { + this.client = client; + } + + /** + * List private endpoint connections + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param callback The callback + */ + list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get the specified private endpoint connection + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param callback The callback + */ + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + privateEndpointConnectionName, + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update the state of specified private endpoint connection + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param parameters The resource of private endpoint and its properties + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + update(privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param parameters The resource of private endpoint and its properties + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param callback The callback + */ + update(privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param parameters The resource of private endpoint and its properties + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + update(privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + privateEndpointConnectionName, + parameters, + resourceGroupName, + resourceName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Delete the specified private endpoint connection + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(privateEndpointConnectionName,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Delete the specified private endpoint connection + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(privateEndpointConnectionName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + privateEndpointConnectionName, + resourceGroupName, + resourceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * List private endpoint connections + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateLinkResources.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateLinkResources.ts new file mode 100644 index 000000000000..445ca32777bf --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubPrivateLinkResources.ts @@ -0,0 +1,141 @@ +/* + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/webPubSubPrivateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { WebPubSubManagementClientContext } from "../webPubSubManagementClientContext"; + +/** Class representing a WebPubSubPrivateLinkResources. */ +export class WebPubSubPrivateLinkResources { + private readonly client: WebPubSubManagementClientContext; + + /** + * Create a WebPubSubPrivateLinkResources. + * @param {WebPubSubManagementClientContext} client Reference to the service client. + */ + constructor(client: WebPubSubManagementClientContext) { + this.client = client; + } + + /** + * Get the private link resources that need to be created for a resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param callback The callback + */ + list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get the private link resources that need to be created for a resource. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubSharedPrivateLinkResources.ts b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubSharedPrivateLinkResources.ts new file mode 100644 index 000000000000..34a38a5bcade --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/operations/webPubSubSharedPrivateLinkResources.ts @@ -0,0 +1,342 @@ +/* + * 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 * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/webPubSubSharedPrivateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { WebPubSubManagementClientContext } from "../webPubSubManagementClientContext"; + +/** Class representing a WebPubSubSharedPrivateLinkResources. */ +export class WebPubSubSharedPrivateLinkResources { + private readonly client: WebPubSubManagementClientContext; + + /** + * Create a WebPubSubSharedPrivateLinkResources. + * @param {WebPubSubManagementClientContext} client Reference to the service client. + */ + constructor(client: WebPubSubManagementClientContext) { + this.client = client; + } + + /** + * List shared private link resources + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param callback The callback + */ + list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get the specified shared private link resource + * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param callback The callback + */ + get(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param options The optional parameters + * @param callback The callback + */ + get(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + sharedPrivateLinkResourceName, + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create or update a shared private link resource + * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param parameters The shared private link resource + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(sharedPrivateLinkResourceName: string, parameters: Models.SharedPrivateLinkResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(sharedPrivateLinkResourceName,parameters,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Delete the specified shared private link resource + * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(sharedPrivateLinkResourceName,resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Create or update a shared private link resource + * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param parameters The shared private link resource + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(sharedPrivateLinkResourceName: string, parameters: Models.SharedPrivateLinkResource, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + sharedPrivateLinkResourceName, + parameters, + resourceGroupName, + resourceName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Delete the specified shared private link resource + * @param sharedPrivateLinkResourceName The name of the shared private link resource + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(sharedPrivateLinkResourceName: string, resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + sharedPrivateLinkResourceName, + resourceGroupName, + resourceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * List shared private link resources + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SharedPrivateLinkResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + urlParameters: [ + Parameters.sharedPrivateLinkResourceName, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SharedPrivateLinkResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + urlParameters: [ + Parameters.sharedPrivateLinkResourceName, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SharedPrivateLinkResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SharedPrivateLinkResource + }, + 201: { + bodyMapper: Mappers.SharedPrivateLinkResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + urlParameters: [ + Parameters.sharedPrivateLinkResourceName, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SharedPrivateLinkResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClient.ts b/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClient.ts new file mode 100644 index 000000000000..ceedce3033cd --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClient.ts @@ -0,0 +1,60 @@ +/* + * 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 * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { WebPubSubManagementClientContext } from "./webPubSubManagementClientContext"; + + +class WebPubSubManagementClient extends WebPubSubManagementClientContext { + // Operation groups + operations: operations.Operations; + webPubSub: operations.WebPubSub; + usages: operations.Usages; + webPubSubHubs: operations.WebPubSubHubs; + webPubSubPrivateEndpointConnections: operations.WebPubSubPrivateEndpointConnections; + webPubSubPrivateLinkResources: operations.WebPubSubPrivateLinkResources; + webPubSubSharedPrivateLinkResources: operations.WebPubSubSharedPrivateLinkResources; + + /** + * Initializes a new instance of the WebPubSubManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. + * @param subscriptionId Gets subscription Id which uniquely identify the Microsoft Azure + * subscription. The subscription ID forms part of the URI for every service call. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.WebPubSubManagementClientOptions) { + super(credentials, subscriptionId, options); + this.operations = new operations.Operations(this); + this.webPubSub = new operations.WebPubSub(this); + this.usages = new operations.Usages(this); + this.webPubSubHubs = new operations.WebPubSubHubs(this); + this.webPubSubPrivateEndpointConnections = new operations.WebPubSubPrivateEndpointConnections(this); + this.webPubSubPrivateLinkResources = new operations.WebPubSubPrivateLinkResources(this); + this.webPubSubSharedPrivateLinkResources = new operations.WebPubSubSharedPrivateLinkResources(this); + } +} + +// Operation Specifications + +export { + WebPubSubManagementClient, + WebPubSubManagementClientContext, + Models as WebPubSubManagementModels, + Mappers as WebPubSubManagementMappers +}; +export * from "./operations"; diff --git a/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClientContext.ts b/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClientContext.ts new file mode 100644 index 000000000000..7be3a31b45ab --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/src/webPubSubManagementClientContext.ts @@ -0,0 +1,68 @@ +/* + * 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 * as Models from "./models"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; + +const packageName = "@azure/arm-webpubsub"; +const packageVersion = "1.0.0-beta.1"; + +export class WebPubSubManagementClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials | TokenCredential; + apiVersion?: string; + subscriptionId: string; + + /** + * Initializes a new instance of the WebPubSubManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. + * @param subscriptionId Gets subscription Id which uniquely identify the Microsoft Azure + * subscription. The subscription ID forms part of the URI for every service call. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.WebPubSubManagementClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if (!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.apiVersion = '2021-10-01'; + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + this.subscriptionId = subscriptionId; + + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/sdk/web-pubsub/arm-webpubsub/tsconfig.json b/sdk/web-pubsub/arm-webpubsub/tsconfig.json new file mode 100644 index 000000000000..422b584abd5e --- /dev/null +++ b/sdk/web-pubsub/arm-webpubsub/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es5", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6", "dom"], + "declaration": true, + "outDir": "./esm", + "importHelpers": true + }, + "include": ["./src/**/*.ts"], + "exclude": ["node_modules"] +}