diff --git a/lib/services/signalrManagement/LICENSE.txt b/lib/services/signalrManagement/LICENSE.txt index 5431ba98b9..8f3d856145 100644 --- a/lib/services/signalrManagement/LICENSE.txt +++ b/lib/services/signalrManagement/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2019 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/lib/services/signalrManagement/README.md b/lib/services/signalrManagement/README.md index cfdc9b4084..57b57a5974 100644 --- a/lib/services/signalrManagement/README.md +++ b/lib/services/signalrManagement/README.md @@ -3,38 +3,41 @@ uid: azure-arm-signalr summary: *content --- -# Microsoft Azure SDK for Node.js - SignalRManagementClient +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - SignalRManagementClient + This project provides a Node.js package for accessing Azure. Right now it supports: - **Node.js version 6.x.x or higher** -## Features +### Features -## How to Install +### How to Install ```bash npm install azure-arm-signalr ``` -## How to use +### How to use -### Authentication, client creation and list operations as an example. +#### Authentication, client creation, and list operations as an example. ```javascript const msRestAzure = require("ms-rest-azure"); const SignalRManagementClient = require("azure-arm-signalr"); msRestAzure.interactiveLogin().then((creds) => { - const subscriptionId = ""; - const client = new SignalRManagementClient(creds, subscriptionId); - return client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); + const subscriptionId = ""; + const client = new SignalRManagementClient(creds, subscriptionId); + + return client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); + }); }).catch((err) => { console.log('An error occurred:'); console.dir(err, {depth: null, colors: true}); }); - -## Related projects +``` +### Related projects - [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/signalrManagement/lib/models/dimension.js b/lib/services/signalrManagement/lib/models/dimension.js index fc660618a2..5dae5e500c 100644 --- a/lib/services/signalrManagement/lib/models/dimension.js +++ b/lib/services/signalrManagement/lib/models/dimension.js @@ -17,12 +17,12 @@ class Dimension { /** * Create a Dimension. - * @member {string} [name] The public facing name of the dimension. - * @member {string} [displayName] Localized friendly display name of the + * @property {string} [name] The public facing name of the dimension. + * @property {string} [displayName] Localized friendly display name of the * dimension. - * @member {string} [internalName] Name of the dimension as it appears in + * @property {string} [internalName] Name of the dimension as it appears in * MDM. - * @member {boolean} [toBeExportedForShoebox] A Boolean flag indicating + * @property {boolean} [toBeExportedForShoebox] A Boolean flag indicating * whether this dimension should be included for the shoebox export scenario. */ constructor() { diff --git a/lib/services/signalrManagement/lib/models/index.d.ts b/lib/services/signalrManagement/lib/models/index.d.ts index 9ba8e1b5cc..e16dc53dd9 100644 --- a/lib/services/signalrManagement/lib/models/index.d.ts +++ b/lib/services/signalrManagement/lib/models/index.d.ts @@ -1,476 +1,438 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { BaseResource } from 'ms-rest-azure'; -import { CloudError } from 'ms-rest-azure'; -import * as moment from 'moment'; +import { BaseResource, CloudError } from "ms-rest-azure"; +import * as moment from "moment"; -export { BaseResource } from 'ms-rest-azure'; -export { CloudError } from 'ms-rest-azure'; +export { + BaseResource, + CloudError +}; /** - * @class - * Initializes a new instance of the OperationDisplay class. - * @constructor * The object that describes a operation. - * - * @member {string} [provider] Friendly name of the resource provider - * @member {string} [resource] Resource type on which the operation is - * performed. - * @member {string} [operation] The localized friendly name for the operation. - * @member {string} [description] The localized friendly description for the - * 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; } /** - * @class - * Initializes a new instance of the Dimension class. - * @constructor * Specifications of the Dimension of metrics. - * - * @member {string} [name] The public facing name of the dimension. - * @member {string} [displayName] Localized friendly display name of the - * dimension. - * @member {string} [internalName] Name of the dimension as it appears in MDM. - * @member {boolean} [toBeExportedForShoebox] A Boolean flag indicating whether - * this dimension should be included for the shoebox export scenario. */ 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; } /** - * @class - * Initializes a new instance of the MetricSpecification class. - * @constructor * Specifications of the Metrics for Azure Monitoring. - * - * @member {string} [name] Name of the metric. - * @member {string} [displayName] Localized friendly display name of the - * metric. - * @member {string} [displayDescription] Localized friendly description of the - * metric. - * @member {string} [unit] The unit that makes sense for the metric. - * @member {string} [aggregationType] Only provide one value for this field. - * Valid values: Average, Minimum, Maximum, Total, Count. - * @member {string} [fillGapWithZero] 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. - * @member {string} [category] The name of the metric category that the metric - * belongs to. A metric can only belong to a single category. - * @member {array} [dimensions] The dimensions of the metrics. */ 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[]; } /** - * @class - * Initializes a new instance of the ServiceSpecification class. - * @constructor * An object that describes a specification. - * - * @member {array} [metricSpecifications] Specifications of the Metrics for - * Azure Monitoring. */ export interface ServiceSpecification { + /** + * Specifications of the Metrics for Azure Monitoring. + */ metricSpecifications?: MetricSpecification[]; } /** - * @class - * Initializes a new instance of the OperationProperties class. - * @constructor * Extra Operation properties. - * - * @member {object} [serviceSpecification] The service specifications. - * @member {array} [serviceSpecification.metricSpecifications] Specifications - * of the Metrics for Azure Monitoring. */ export interface OperationProperties { + /** + * The service specifications. + */ serviceSpecification?: ServiceSpecification; } /** - * @class - * Initializes a new instance of the Operation class. - * @constructor * REST API operation supported by SignalR resource provider. - * - * @member {string} [name] Name of the operation with format: - * {provider}/{resource}/{operation} - * @member {object} [display] The object that describes the operation. - * @member {string} [display.provider] Friendly name of the resource provider - * @member {string} [display.resource] Resource type on which the operation is - * performed. - * @member {string} [display.operation] The localized friendly name for the - * operation. - * @member {string} [display.description] The localized friendly description - * for the operation - * @member {string} [origin] Optional. The intended executor of the operation; - * governs the display of the operation in the RBAC UX and the audit logs UX. - * @member {object} [properties] Extra properties for the operation. - * @member {object} [properties.serviceSpecification] The service - * specifications. - * @member {array} [properties.serviceSpecification.metricSpecifications] - * Specifications of the Metrics for Azure Monitoring. */ export interface Operation { + /** + * Name of the operation with format: {provider}/{resource}/{operation} + */ name?: string; + /** + * The object that describes the operation. + */ 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; + /** + * Extra properties for the operation. + */ properties?: OperationProperties; } /** - * @class - * Initializes a new instance of the NameAvailabilityParameters class. - * @constructor * Data POST-ed to the nameAvailability action - * - * @member {string} type The resource type. Should be always - * "Microsoft.SignalRService/SignalR". - * @member {string} name The SignalR service name to validate. - * e.g."my-signalR-name-here" */ export interface NameAvailabilityParameters { + /** + * The resource type. Should be always "Microsoft.SignalRService/SignalR". + */ type: string; + /** + * The SignalR service name to validate. e.g."my-signalR-name-here" + */ name: string; } /** - * @class - * Initializes a new instance of the NameAvailability class. - * @constructor - * Result of the request to check name availability. It contains a flag and - * possible reason of failure. - * - * @member {boolean} [nameAvailable] Indicates whether the name is available or - * not. - * @member {string} [reason] The reason of the availability. Required if name - * is not available. - * @member {string} [message] The message of the operation. + * 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; } /** - * @class - * Initializes a new instance of the ResourceSku class. - * @constructor * The billing information of the resource.(e.g. basic vs. standard) - * - * @member {string} name The name of the SKU. This is typically a letter + - * number code, such as A0 or P3. Required (if sku is specified) - * @member {string} [tier] Optional tier of this particular SKU. `Basic` is - * deprecated, use `Standard` instead for Basic tier. Possible values include: - * 'Free', 'Basic', 'Standard', 'Premium' - * @member {string} [size] Optional, string. When the name field is the - * combination of tier and some other value, this would be the standalone code. - * @member {string} [family] Optional, string. If the service has different - * generations of hardware, for the same SKU, then that can be captured here. - * @member {number} [capacity] Optional, integer. If the SKU supports scale - * out/in then the capacity integer should be included. If scale out/in is not - * possible for the resource this may be omitted. */ export interface ResourceSku { + /** + * The name of the SKU. This is typically a letter + number code, such as A0 or P3. Required (if + * sku is specified) + */ name: string; + /** + * Optional tier of this particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' + */ tier?: string; + /** + * Optional, string. When the name field is the combination of tier and some other value, this + * would be the standalone code. + */ size?: string; + /** + * Optional, string. If the service has different generations of hardware, for the same SKU, then + * that can be captured here. + */ family?: string; + /** + * Optional, integer. If the SKU supports scale out/in then the capacity integer should be + * included. If scale out/in is not + * possible for the resource this may be omitted. + */ capacity?: number; } /** - * @class - * Initializes a new instance of the Resource class. - * @constructor * The core properties of ARM resources. - * - * @member {string} [id] Fully qualified resource Id for the resource. - * @member {string} [name] The name of the resouce. - * @member {string} [type] The type of the service - e.g. - * "Microsoft.SignalRService/SignalR" */ export interface Resource extends BaseResource { + /** + * Fully qualified resource Id for the resource. + */ readonly id?: string; + /** + * The name of the resource. + */ readonly name?: string; + /** + * The type of the service - e.g. "Microsoft.SignalRService/SignalR" + */ readonly type?: string; } /** - * @class - * Initializes a new instance of the TrackedResource class. - * @constructor * The resource model definition for a ARM tracked top level resource. - * - * @member {string} [location] The GEO location of the SignalR service. e.g. - * West US | East US | North Central US | South Central US. - * @member {object} [tags] Tags of the service which is a list of key value - * pairs that describe the resource. */ export interface TrackedResource extends Resource { + /** + * The GEO location of the SignalR service. 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 }; } /** - * @class - * Initializes a new instance of the SignalRResource class. - * @constructor * A class represent a SignalR service resource. - * - * @member {object} [sku] SKU of the service. - * @member {string} [sku.name] The name of the SKU. This is typically a letter - * + number code, such as A0 or P3. Required (if sku is specified) - * @member {string} [sku.tier] Optional tier of this particular SKU. `Basic` is - * deprecated, use `Standard` instead for Basic tier. Possible values include: - * 'Free', 'Basic', 'Standard', 'Premium' - * @member {string} [sku.size] Optional, string. When the name field is the - * combination of tier and some other value, this would be the standalone code. - * @member {string} [sku.family] Optional, string. If the service has different - * generations of hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] Optional, integer. If the SKU supports scale - * out/in then the capacity integer should be included. If scale out/in is not - * possible for the resource this may be omitted. - * @member {string} [hostNamePrefix] Prefix for the hostName of the SignalR - * service. Retained for future use. - * The hostname will be of format: <hostNamePrefix>.service.signalr.net. - * @member {string} [provisioningState] Provisioning state of the resource. - * Possible values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', - * 'Running', 'Creating', 'Updating', 'Deleting', 'Moving' - * @member {string} [externalIP] The publicly accessible IP of the SignalR - * service. - * @member {string} [hostName] FQDN of the SignalR service instance. Format: - * xxx.service.signalr.net - * @member {number} [publicPort] The publicly accessibly port of the SignalR - * service which is designed for browser/client side usage. - * @member {number} [serverPort] The publicly accessibly port of the SignalR - * service which is designed for customer server side usage. - * @member {string} [version] Version of the SignalR resource. Probably you - * need the same or higher version of client SDKs. */ export interface SignalRResource extends TrackedResource { + /** + * SKU of the service. + */ sku?: ResourceSku; + /** + * Prefix for the hostName of the SignalR service. Retained for future use. + * The hostname will be of format: <hostNamePrefix>.service.signalr.net. + */ hostNamePrefix?: string; + /** + * Provisioning state of the resource. Possible values include: 'Unknown', 'Succeeded', 'Failed', + * 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving' + */ readonly provisioningState?: string; + /** + * The publicly accessible IP of the SignalR service. + */ readonly externalIP?: string; + /** + * FQDN of the SignalR service instance. Format: xxx.service.signalr.net + */ readonly hostName?: string; + /** + * The publicly accessible port of the SignalR service which is designed for browser/client side + * usage. + */ readonly publicPort?: number; + /** + * The publicly accessible port of the SignalR service which is designed for customer server side + * usage. + */ readonly serverPort?: number; + /** + * Version of the SignalR resource. Probably you need the same or higher version of client SDKs. + */ version?: string; } /** - * @class - * Initializes a new instance of the SignalRCreateOrUpdateProperties class. - * @constructor * Settings used to provision or configure the resource. - * - * @member {string} [hostNamePrefix] Prefix for the hostName of the SignalR - * service. Retained for future use. - * The hostname will be of format: <hostNamePrefix>.service.signalr.net. */ export interface SignalRCreateOrUpdateProperties { + /** + * Prefix for the hostName of the SignalR service. Retained for future use. + * The hostname will be of format: <hostNamePrefix>.service.signalr.net. + */ hostNamePrefix?: string; } /** - * @class - * Initializes a new instance of the SignalRKeys class. - * @constructor * A class represents the access keys of SignalR service. - * - * @member {string} [primaryKey] The primary access key. - * @member {string} [secondaryKey] The secondary access key. - * @member {string} [primaryConnectionString] SignalR connection string - * constructed via the primaryKey - * @member {string} [secondaryConnectionString] SignalR connection string - * constructed via the secondaryKey */ export interface SignalRKeys { + /** + * The primary access key. + */ primaryKey?: string; + /** + * The secondary access key. + */ secondaryKey?: string; + /** + * SignalR connection string constructed via the primaryKey + */ primaryConnectionString?: string; + /** + * SignalR connection string constructed via the secondaryKey + */ secondaryConnectionString?: string; } /** - * @class - * Initializes a new instance of the RegenerateKeyParameters class. - * @constructor * Parameters describes the request to regenerate access keys - * - * @member {string} [keyType] The keyType to regenerate. Must be either - * 'primary' or 'secondary'(case-insensitive). Possible values include: - * 'Primary', 'Secondary' */ export interface RegenerateKeyParameters { + /** + * The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). Possible + * values include: 'Primary', 'Secondary' + */ keyType?: string; } /** - * @class - * Initializes a new instance of the SignalRUpdateParameters class. - * @constructor * Parameters for SignalR service update operation - * - * @member {object} [tags] A list of key value pairs that describe the - * resource. - * @member {object} [sku] The billing information of the resource.(e.g. basic - * vs. standard) - * @member {string} [sku.name] The name of the SKU. This is typically a letter - * + number code, such as A0 or P3. Required (if sku is specified) - * @member {string} [sku.tier] Optional tier of this particular SKU. `Basic` is - * deprecated, use `Standard` instead for Basic tier. Possible values include: - * 'Free', 'Basic', 'Standard', 'Premium' - * @member {string} [sku.size] Optional, string. When the name field is the - * combination of tier and some other value, this would be the standalone code. - * @member {string} [sku.family] Optional, string. If the service has different - * generations of hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] Optional, integer. If the SKU supports scale - * out/in then the capacity integer should be included. If scale out/in is not - * possible for the resource this may be omitted. - * @member {object} [properties] Settings used to provision or configure the - * resource - * @member {string} [properties.hostNamePrefix] Prefix for the hostName of the - * SignalR service. Retained for future use. - * The hostname will be of format: <hostNamePrefix>.service.signalr.net. */ export interface SignalRUpdateParameters { + /** + * A list of key value pairs that describe the resource. + */ tags?: { [propertyName: string]: string }; + /** + * The billing information of the resource.(e.g. basic vs. standard) + */ sku?: ResourceSku; + /** + * Settings used to provision or configure the resource + */ properties?: SignalRCreateOrUpdateProperties; } /** - * @class - * Initializes a new instance of the SignalRCreateParameters class. - * @constructor * Parameters for SignalR service create/update operation. * * Keep the same schema as AzSignalR.Models.SignalRResource - * - * @member {string} location Azure GEO region: e.g. West US | East US | North - * Central US | South Central US | West Europe | North Europe | East Asia | - * Southeast Asia | etc. - * The geo region of a resource never changes after it is created. */ export interface SignalRCreateParameters extends SignalRUpdateParameters { + /** + * Azure GEO region: e.g. West US | East US | North Central US | South Central US | West Europe | + * North Europe | East Asia | Southeast Asia | etc. + * The geo region of a resource never changes after it is created. + */ location: string; } /** - * @class - * Initializes a new instance of the SignalRUsageName class. - * @constructor * Localizable String object containing the name and a localized value. - * - * @member {string} [value] The indentifier of the usage. - * @member {string} [localizedValue] Localized name of the usage. */ export interface SignalRUsageName { + /** + * The identifier of the usage. + */ value?: string; + /** + * Localized name of the usage. + */ localizedValue?: string; } /** - * @class - * Initializes a new instance of the SignalRUsage class. - * @constructor * Object that describes a specific usage of SignalR resources. - * - * @member {string} [id] Fully qualified ARM resource id - * @member {number} [currentValue] Current value for the usage quota. - * @member {number} [limit] The maximum permitted value for the usage quota. If - * there is no limit, this value will be -1. - * @member {object} [name] Localizable String object containing the name and a - * localized value. - * @member {string} [name.value] The indentifier of the usage. - * @member {string} [name.localizedValue] Localized name of the usage. - * @member {string} [unit] Representing the units of the usage quota. Possible - * values are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. */ export interface SignalRUsage { + /** + * 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; + /** + * Localizable String object containing the name and a localized value. + */ name?: SignalRUsageName; + /** + * Representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, + * Percent, CountPerSecond, BytesPerSecond. + */ unit?: string; } - /** - * @class - * Initializes a new instance of the OperationList class. - * @constructor - * Result of the request to list REST API operations. It contains a list of - * operations. - * - * @member {string} [nextLink] The URL the client should use to fetch the next - * page (per server side paging). - * It's null for now, added for future use. + * Result of the request to list REST API operations. It contains a list of operations. */ 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; } /** - * @class - * Initializes a new instance of the SignalRResourceList class. - * @constructor - * Object that includes an array of SignalR services and a possible link for - * next set. - * - * @member {string} [nextLink] The URL the client should use to fetch the next - * page (per server side paging). - * It's null for now, added for future use. + * Object that includes an array of SignalR services and a possible link for next set. */ export interface SignalRResourceList 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; } /** - * @class - * Initializes a new instance of the SignalRUsageList class. - * @constructor - * Object that includes an array of SignalR resource usages and a possible link - * for next set. - * - * @member {string} [nextLink] The URL the client should use to fetch the next - * page (per server side paging). - * It's null for now, added for future use. + * Object that includes an array of SignalR resource usages and a possible link for next set. */ export interface SignalRUsageList 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; } diff --git a/lib/services/signalrManagement/lib/models/metricSpecification.js b/lib/services/signalrManagement/lib/models/metricSpecification.js index 57f50f988b..239500006d 100644 --- a/lib/services/signalrManagement/lib/models/metricSpecification.js +++ b/lib/services/signalrManagement/lib/models/metricSpecification.js @@ -17,23 +17,23 @@ class MetricSpecification { /** * Create a MetricSpecification. - * @member {string} [name] Name of the metric. - * @member {string} [displayName] Localized friendly display name of the + * @property {string} [name] Name of the metric. + * @property {string} [displayName] Localized friendly display name of the * metric. - * @member {string} [displayDescription] Localized friendly description of + * @property {string} [displayDescription] Localized friendly description of * the metric. - * @member {string} [unit] The unit that makes sense for the metric. - * @member {string} [aggregationType] Only provide one value for this field. - * Valid values: Average, Minimum, Maximum, Total, Count. - * @member {string} [fillGapWithZero] Optional. If set to true, then zero + * @property {string} [unit] The unit that makes sense for the metric. + * @property {string} [aggregationType] Only provide one value for this + * field. Valid values: Average, Minimum, Maximum, Total, Count. + * @property {string} [fillGapWithZero] 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. - * @member {string} [category] The name of the metric category that the + * @property {string} [category] The name of the metric category that the * metric belongs to. A metric can only belong to a single category. - * @member {array} [dimensions] The dimensions of the metrics. + * @property {array} [dimensions] The dimensions of the metrics. */ constructor() { } diff --git a/lib/services/signalrManagement/lib/models/nameAvailability.js b/lib/services/signalrManagement/lib/models/nameAvailability.js index f8984f105b..dcd2933551 100644 --- a/lib/services/signalrManagement/lib/models/nameAvailability.js +++ b/lib/services/signalrManagement/lib/models/nameAvailability.js @@ -18,11 +18,11 @@ class NameAvailability { /** * Create a NameAvailability. - * @member {boolean} [nameAvailable] Indicates whether the name is available - * or not. - * @member {string} [reason] The reason of the availability. Required if name - * is not available. - * @member {string} [message] The message of the operation. + * @property {boolean} [nameAvailable] Indicates whether the name is + * available or not. + * @property {string} [reason] The reason of the availability. Required if + * name is not available. + * @property {string} [message] The message of the operation. */ constructor() { } diff --git a/lib/services/signalrManagement/lib/models/nameAvailabilityParameters.js b/lib/services/signalrManagement/lib/models/nameAvailabilityParameters.js index cdca6f704f..9135e07ebf 100644 --- a/lib/services/signalrManagement/lib/models/nameAvailabilityParameters.js +++ b/lib/services/signalrManagement/lib/models/nameAvailabilityParameters.js @@ -17,9 +17,9 @@ class NameAvailabilityParameters { /** * Create a NameAvailabilityParameters. - * @member {string} type The resource type. Should be always + * @property {string} type The resource type. Should be always * "Microsoft.SignalRService/SignalR". - * @member {string} name The SignalR service name to validate. + * @property {string} name The SignalR service name to validate. * e.g."my-signalR-name-here" */ constructor() { diff --git a/lib/services/signalrManagement/lib/models/operation.js b/lib/services/signalrManagement/lib/models/operation.js index 9b28ad1087..fe20550e9d 100644 --- a/lib/services/signalrManagement/lib/models/operation.js +++ b/lib/services/signalrManagement/lib/models/operation.js @@ -17,23 +17,24 @@ class Operation { /** * Create a Operation. - * @member {string} [name] Name of the operation with format: + * @property {string} [name] Name of the operation with format: * {provider}/{resource}/{operation} - * @member {object} [display] The object that describes the operation. - * @member {string} [display.provider] Friendly name of the resource provider - * @member {string} [display.resource] Resource type on which the operation + * @property {object} [display] The object that describes the operation. + * @property {string} [display.provider] Friendly name of the resource + * provider + * @property {string} [display.resource] Resource type on which the operation * is performed. - * @member {string} [display.operation] The localized friendly name for the + * @property {string} [display.operation] The localized friendly name for the * operation. - * @member {string} [display.description] The localized friendly description - * for the operation - * @member {string} [origin] Optional. The intended executor of the + * @property {string} [display.description] The localized friendly + * description for the operation + * @property {string} [origin] Optional. The intended executor of the * operation; governs the display of the operation in the RBAC UX and the * audit logs UX. - * @member {object} [properties] Extra properties for the operation. - * @member {object} [properties.serviceSpecification] The service + * @property {object} [properties] Extra properties for the operation. + * @property {object} [properties.serviceSpecification] The service * specifications. - * @member {array} [properties.serviceSpecification.metricSpecifications] + * @property {array} [properties.serviceSpecification.metricSpecifications] * Specifications of the Metrics for Azure Monitoring. */ constructor() { diff --git a/lib/services/signalrManagement/lib/models/operationDisplay.js b/lib/services/signalrManagement/lib/models/operationDisplay.js index eb3253dbb5..2cc7fd1a2b 100644 --- a/lib/services/signalrManagement/lib/models/operationDisplay.js +++ b/lib/services/signalrManagement/lib/models/operationDisplay.js @@ -17,13 +17,13 @@ class OperationDisplay { /** * Create a OperationDisplay. - * @member {string} [provider] Friendly name of the resource provider - * @member {string} [resource] Resource type on which the operation is + * @property {string} [provider] Friendly name of the resource provider + * @property {string} [resource] Resource type on which the operation is * performed. - * @member {string} [operation] The localized friendly name for the + * @property {string} [operation] The localized friendly name for the * operation. - * @member {string} [description] The localized friendly description for the - * operation + * @property {string} [description] The localized friendly description for + * the operation */ constructor() { } diff --git a/lib/services/signalrManagement/lib/models/operationList.js b/lib/services/signalrManagement/lib/models/operationList.js index ccd4a98ce3..01821efe04 100644 --- a/lib/services/signalrManagement/lib/models/operationList.js +++ b/lib/services/signalrManagement/lib/models/operationList.js @@ -17,7 +17,7 @@ class OperationList extends Array { /** * Create a OperationList. - * @member {string} [nextLink] The URL the client should use to fetch the + * @property {string} [nextLink] The URL the client should use to fetch the * next page (per server side paging). * It's null for now, added for future use. */ diff --git a/lib/services/signalrManagement/lib/models/operationProperties.js b/lib/services/signalrManagement/lib/models/operationProperties.js index 0f3cfa7438..ce72842682 100644 --- a/lib/services/signalrManagement/lib/models/operationProperties.js +++ b/lib/services/signalrManagement/lib/models/operationProperties.js @@ -17,9 +17,9 @@ class OperationProperties { /** * Create a OperationProperties. - * @member {object} [serviceSpecification] The service specifications. - * @member {array} [serviceSpecification.metricSpecifications] Specifications - * of the Metrics for Azure Monitoring. + * @property {object} [serviceSpecification] The service specifications. + * @property {array} [serviceSpecification.metricSpecifications] + * Specifications of the Metrics for Azure Monitoring. */ constructor() { } diff --git a/lib/services/signalrManagement/lib/models/regenerateKeyParameters.js b/lib/services/signalrManagement/lib/models/regenerateKeyParameters.js index 822f9ecd09..527a326f7e 100644 --- a/lib/services/signalrManagement/lib/models/regenerateKeyParameters.js +++ b/lib/services/signalrManagement/lib/models/regenerateKeyParameters.js @@ -17,7 +17,7 @@ class RegenerateKeyParameters { /** * Create a RegenerateKeyParameters. - * @member {string} [keyType] The keyType to regenerate. Must be either + * @property {string} [keyType] The keyType to regenerate. Must be either * 'primary' or 'secondary'(case-insensitive). Possible values include: * 'Primary', 'Secondary' */ diff --git a/lib/services/signalrManagement/lib/models/resource.js b/lib/services/signalrManagement/lib/models/resource.js index e179b636f5..701678e321 100644 --- a/lib/services/signalrManagement/lib/models/resource.js +++ b/lib/services/signalrManagement/lib/models/resource.js @@ -20,9 +20,9 @@ const models = require('./index'); class Resource extends models['BaseResource'] { /** * Create a Resource. - * @member {string} [id] Fully qualified resource Id for the resource. - * @member {string} [name] The name of the resouce. - * @member {string} [type] The type of the service - e.g. + * @property {string} [id] Fully qualified resource Id for the resource. + * @property {string} [name] The name of the resource. + * @property {string} [type] The type of the service - e.g. * "Microsoft.SignalRService/SignalR" */ constructor() { diff --git a/lib/services/signalrManagement/lib/models/resourceSku.js b/lib/services/signalrManagement/lib/models/resourceSku.js index abdc722765..5a18c0d427 100644 --- a/lib/services/signalrManagement/lib/models/resourceSku.js +++ b/lib/services/signalrManagement/lib/models/resourceSku.js @@ -17,17 +17,17 @@ class ResourceSku { /** * Create a ResourceSku. - * @member {string} name The name of the SKU. This is typically a letter + + * @property {string} name The name of the SKU. This is typically a letter + * number code, such as A0 or P3. Required (if sku is specified) - * @member {string} [tier] Optional tier of this particular SKU. `Basic` is - * deprecated, use `Standard` instead for Basic tier. Possible values - * include: 'Free', 'Basic', 'Standard', 'Premium' - * @member {string} [size] Optional, string. When the name field is the + * @property {string} [tier] Optional tier of this particular SKU. `Basic` is + * deprecated, use `Standard` instead. Possible values include: 'Free', + * 'Basic', 'Standard', 'Premium' + * @property {string} [size] Optional, string. When the name field is the * combination of tier and some other value, this would be the standalone * code. - * @member {string} [family] Optional, string. If the service has different + * @property {string} [family] Optional, string. If the service has different * generations of hardware, for the same SKU, then that can be captured here. - * @member {number} [capacity] Optional, integer. If the SKU supports scale + * @property {number} [capacity] Optional, integer. If the SKU supports scale * out/in then the capacity integer should be included. If scale out/in is * not * possible for the resource this may be omitted. diff --git a/lib/services/signalrManagement/lib/models/serviceSpecification.js b/lib/services/signalrManagement/lib/models/serviceSpecification.js index 657e58bc2c..c85c0f6b15 100644 --- a/lib/services/signalrManagement/lib/models/serviceSpecification.js +++ b/lib/services/signalrManagement/lib/models/serviceSpecification.js @@ -17,7 +17,7 @@ class ServiceSpecification { /** * Create a ServiceSpecification. - * @member {array} [metricSpecifications] Specifications of the Metrics for + * @property {array} [metricSpecifications] Specifications of the Metrics for * Azure Monitoring. */ constructor() { diff --git a/lib/services/signalrManagement/lib/models/signalRCreateOrUpdateProperties.js b/lib/services/signalrManagement/lib/models/signalRCreateOrUpdateProperties.js index 954211fe9d..70032ba195 100644 --- a/lib/services/signalrManagement/lib/models/signalRCreateOrUpdateProperties.js +++ b/lib/services/signalrManagement/lib/models/signalRCreateOrUpdateProperties.js @@ -17,7 +17,7 @@ class SignalRCreateOrUpdateProperties { /** * Create a SignalRCreateOrUpdateProperties. - * @member {string} [hostNamePrefix] Prefix for the hostName of the SignalR + * @property {string} [hostNamePrefix] Prefix for the hostName of the SignalR * service. Retained for future use. * The hostname will be of format: * <hostNamePrefix>.service.signalr.net. diff --git a/lib/services/signalrManagement/lib/models/signalRCreateParameters.js b/lib/services/signalrManagement/lib/models/signalRCreateParameters.js index 9c0f2005d2..fb574e6a7c 100644 --- a/lib/services/signalrManagement/lib/models/signalRCreateParameters.js +++ b/lib/services/signalrManagement/lib/models/signalRCreateParameters.js @@ -22,9 +22,9 @@ const models = require('./index'); class SignalRCreateParameters extends models['SignalRUpdateParameters'] { /** * Create a SignalRCreateParameters. - * @member {string} location Azure GEO region: e.g. West US | East US | North - * Central US | South Central US | West Europe | North Europe | East Asia | - * Southeast Asia | etc. + * @property {string} location Azure GEO region: e.g. West US | East US | + * North Central US | South Central US | West Europe | North Europe | East + * Asia | Southeast Asia | etc. * The geo region of a resource never changes after it is created. */ constructor() { diff --git a/lib/services/signalrManagement/lib/models/signalRKeys.js b/lib/services/signalrManagement/lib/models/signalRKeys.js index 64de9307e9..f093f330e4 100644 --- a/lib/services/signalrManagement/lib/models/signalRKeys.js +++ b/lib/services/signalrManagement/lib/models/signalRKeys.js @@ -17,11 +17,11 @@ class SignalRKeys { /** * Create a SignalRKeys. - * @member {string} [primaryKey] The primary access key. - * @member {string} [secondaryKey] The secondary access key. - * @member {string} [primaryConnectionString] SignalR connection string + * @property {string} [primaryKey] The primary access key. + * @property {string} [secondaryKey] The secondary access key. + * @property {string} [primaryConnectionString] SignalR connection string * constructed via the primaryKey - * @member {string} [secondaryConnectionString] SignalR connection string + * @property {string} [secondaryConnectionString] SignalR connection string * constructed via the secondaryKey */ constructor() { diff --git a/lib/services/signalrManagement/lib/models/signalRResource.js b/lib/services/signalrManagement/lib/models/signalRResource.js index 5f1ce931a4..fca23dbd0b 100644 --- a/lib/services/signalrManagement/lib/models/signalRResource.js +++ b/lib/services/signalrManagement/lib/models/signalRResource.js @@ -20,38 +20,38 @@ const models = require('./index'); class SignalRResource extends models['TrackedResource'] { /** * Create a SignalRResource. - * @member {object} [sku] SKU of the service. - * @member {string} [sku.name] The name of the SKU. This is typically a + * @property {object} [sku] SKU of the service. + * @property {string} [sku.name] The name of the SKU. This is typically a * letter + number code, such as A0 or P3. Required (if sku is specified) - * @member {string} [sku.tier] Optional tier of this particular SKU. `Basic` - * is deprecated, use `Standard` instead for Basic tier. Possible values - * include: 'Free', 'Basic', 'Standard', 'Premium' - * @member {string} [sku.size] Optional, string. When the name field is the + * @property {string} [sku.tier] Optional tier of this particular SKU. + * `Basic` is deprecated, use `Standard` instead. Possible values include: + * 'Free', 'Basic', 'Standard', 'Premium' + * @property {string} [sku.size] Optional, string. When the name field is the * combination of tier and some other value, this would be the standalone * code. - * @member {string} [sku.family] Optional, string. If the service has + * @property {string} [sku.family] Optional, string. If the service has * different generations of hardware, for the same SKU, then that can be * captured here. - * @member {number} [sku.capacity] Optional, integer. If the SKU supports + * @property {number} [sku.capacity] Optional, integer. If the SKU supports * scale out/in then the capacity integer should be included. If scale out/in * is not * possible for the resource this may be omitted. - * @member {string} [hostNamePrefix] Prefix for the hostName of the SignalR + * @property {string} [hostNamePrefix] Prefix for the hostName of the SignalR * service. Retained for future use. * The hostname will be of format: * <hostNamePrefix>.service.signalr.net. - * @member {string} [provisioningState] Provisioning state of the resource. + * @property {string} [provisioningState] Provisioning state of the resource. * Possible values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', * 'Running', 'Creating', 'Updating', 'Deleting', 'Moving' - * @member {string} [externalIP] The publicly accessible IP of the SignalR + * @property {string} [externalIP] The publicly accessible IP of the SignalR * service. - * @member {string} [hostName] FQDN of the SignalR service instance. Format: - * xxx.service.signalr.net - * @member {number} [publicPort] The publicly accessibly port of the SignalR - * service which is designed for browser/client side usage. - * @member {number} [serverPort] The publicly accessibly port of the SignalR - * service which is designed for customer server side usage. - * @member {string} [version] Version of the SignalR resource. Probably you + * @property {string} [hostName] FQDN of the SignalR service instance. + * Format: xxx.service.signalr.net + * @property {number} [publicPort] The publicly accessible port of the + * SignalR service which is designed for browser/client side usage. + * @property {number} [serverPort] The publicly accessible port of the + * SignalR service which is designed for customer server side usage. + * @property {string} [version] Version of the SignalR resource. Probably you * need the same or higher version of client SDKs. */ constructor() { diff --git a/lib/services/signalrManagement/lib/models/signalRResourceList.js b/lib/services/signalrManagement/lib/models/signalRResourceList.js index b876af41cf..72b53d7396 100644 --- a/lib/services/signalrManagement/lib/models/signalRResourceList.js +++ b/lib/services/signalrManagement/lib/models/signalRResourceList.js @@ -17,7 +17,7 @@ class SignalRResourceList extends Array { /** * Create a SignalRResourceList. - * @member {string} [nextLink] The URL the client should use to fetch the + * @property {string} [nextLink] The URL the client should use to fetch the * next page (per server side paging). * It's null for now, added for future use. */ diff --git a/lib/services/signalrManagement/lib/models/signalRUpdateParameters.js b/lib/services/signalrManagement/lib/models/signalRUpdateParameters.js index da8352d058..e5c076acff 100644 --- a/lib/services/signalrManagement/lib/models/signalRUpdateParameters.js +++ b/lib/services/signalrManagement/lib/models/signalRUpdateParameters.js @@ -17,28 +17,28 @@ class SignalRUpdateParameters { /** * Create a SignalRUpdateParameters. - * @member {object} [tags] A list of key value pairs that describe the + * @property {object} [tags] A list of key value pairs that describe the * resource. - * @member {object} [sku] The billing information of the resource.(e.g. basic - * vs. standard) - * @member {string} [sku.name] The name of the SKU. This is typically a + * @property {object} [sku] The billing information of the resource.(e.g. + * basic vs. standard) + * @property {string} [sku.name] The name of the SKU. This is typically a * letter + number code, such as A0 or P3. Required (if sku is specified) - * @member {string} [sku.tier] Optional tier of this particular SKU. `Basic` - * is deprecated, use `Standard` instead for Basic tier. Possible values - * include: 'Free', 'Basic', 'Standard', 'Premium' - * @member {string} [sku.size] Optional, string. When the name field is the + * @property {string} [sku.tier] Optional tier of this particular SKU. + * `Basic` is deprecated, use `Standard` instead. Possible values include: + * 'Free', 'Basic', 'Standard', 'Premium' + * @property {string} [sku.size] Optional, string. When the name field is the * combination of tier and some other value, this would be the standalone * code. - * @member {string} [sku.family] Optional, string. If the service has + * @property {string} [sku.family] Optional, string. If the service has * different generations of hardware, for the same SKU, then that can be * captured here. - * @member {number} [sku.capacity] Optional, integer. If the SKU supports + * @property {number} [sku.capacity] Optional, integer. If the SKU supports * scale out/in then the capacity integer should be included. If scale out/in * is not * possible for the resource this may be omitted. - * @member {object} [properties] Settings used to provision or configure the - * resource - * @member {string} [properties.hostNamePrefix] Prefix for the hostName of + * @property {object} [properties] Settings used to provision or configure + * the resource + * @property {string} [properties.hostNamePrefix] Prefix for the hostName of * the SignalR service. Retained for future use. * The hostname will be of format: * <hostNamePrefix>.service.signalr.net. diff --git a/lib/services/signalrManagement/lib/models/signalRUsage.js b/lib/services/signalrManagement/lib/models/signalRUsage.js index e35df905e5..1aa3c41ca0 100644 --- a/lib/services/signalrManagement/lib/models/signalRUsage.js +++ b/lib/services/signalrManagement/lib/models/signalRUsage.js @@ -17,15 +17,15 @@ class SignalRUsage { /** * Create a SignalRUsage. - * @member {string} [id] Fully qualified ARM resource id - * @member {number} [currentValue] Current value for the usage quota. - * @member {number} [limit] The maximum permitted value for the usage quota. - * If there is no limit, this value will be -1. - * @member {object} [name] Localizable String object containing the name and - * a localized value. - * @member {string} [name.value] The indentifier of the usage. - * @member {string} [name.localizedValue] Localized name of the usage. - * @member {string} [unit] Representing the units of the usage quota. + * @property {string} [id] Fully qualified ARM resource id + * @property {number} [currentValue] Current value for the usage quota. + * @property {number} [limit] The maximum permitted value for the usage + * quota. If there is no limit, this value will be -1. + * @property {object} [name] Localizable String object containing the name + * and a localized value. + * @property {string} [name.value] The identifier of the usage. + * @property {string} [name.localizedValue] Localized name of the usage. + * @property {string} [unit] Representing the units of the usage quota. * Possible values are: Count, Bytes, Seconds, Percent, CountPerSecond, * BytesPerSecond. */ diff --git a/lib/services/signalrManagement/lib/models/signalRUsageList.js b/lib/services/signalrManagement/lib/models/signalRUsageList.js index 999af02416..74fbfff4af 100644 --- a/lib/services/signalrManagement/lib/models/signalRUsageList.js +++ b/lib/services/signalrManagement/lib/models/signalRUsageList.js @@ -17,7 +17,7 @@ class SignalRUsageList extends Array { /** * Create a SignalRUsageList. - * @member {string} [nextLink] The URL the client should use to fetch the + * @property {string} [nextLink] The URL the client should use to fetch the * next page (per server side paging). * It's null for now, added for future use. */ diff --git a/lib/services/signalrManagement/lib/models/signalRUsageName.js b/lib/services/signalrManagement/lib/models/signalRUsageName.js index d26e824e6f..d455f4e8a1 100644 --- a/lib/services/signalrManagement/lib/models/signalRUsageName.js +++ b/lib/services/signalrManagement/lib/models/signalRUsageName.js @@ -17,8 +17,8 @@ class SignalRUsageName { /** * Create a SignalRUsageName. - * @member {string} [value] The indentifier of the usage. - * @member {string} [localizedValue] Localized name of the usage. + * @property {string} [value] The identifier of the usage. + * @property {string} [localizedValue] Localized name of the usage. */ constructor() { } diff --git a/lib/services/signalrManagement/lib/models/trackedResource.js b/lib/services/signalrManagement/lib/models/trackedResource.js index cf9b73f7f0..5e1a4de0f5 100644 --- a/lib/services/signalrManagement/lib/models/trackedResource.js +++ b/lib/services/signalrManagement/lib/models/trackedResource.js @@ -20,9 +20,9 @@ const models = require('./index'); class TrackedResource extends models['Resource'] { /** * Create a TrackedResource. - * @member {string} [location] The GEO location of the SignalR service. e.g. - * West US | East US | North Central US | South Central US. - * @member {object} [tags] Tags of the service which is a list of key value + * @property {string} [location] The GEO location of the SignalR service. + * e.g. West US | East US | North Central US | South Central US. + * @property {object} [tags] Tags of the service which is a list of key value * pairs that describe the resource. */ constructor() { diff --git a/lib/services/signalrManagement/lib/operations/index.d.ts b/lib/services/signalrManagement/lib/operations/index.d.ts index 4db9996cbf..ab8b01e7d4 100644 --- a/lib/services/signalrManagement/lib/operations/index.d.ts +++ b/lib/services/signalrManagement/lib/operations/index.d.ts @@ -558,8 +558,8 @@ export interface SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -622,8 +622,8 @@ export interface SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -761,8 +761,8 @@ export interface SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -819,8 +819,8 @@ export interface SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -872,6 +872,68 @@ export interface SignalR { update(resourceGroupName: string, resourceName: string, options: { parameters? : models.SignalRUpdateParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Operation to restart a SignalR service. + * + * @param {string} 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 {string} resourceName The name of the SignalR resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + restartWithHttpOperationResponse(resourceGroupName: string, resourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Operation to restart a SignalR service. + * + * @param {string} 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 {string} resourceName The name of the SignalR resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + restart(resourceGroupName: string, resourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + restart(resourceGroupName: string, resourceName: string, callback: ServiceCallback): void; + restart(resourceGroupName: string, resourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be * regenerated at the same time. @@ -981,8 +1043,8 @@ export interface SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -1045,8 +1107,8 @@ export interface SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -1184,8 +1246,8 @@ export interface SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -1242,8 +1304,8 @@ export interface SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -1295,6 +1357,68 @@ export interface SignalR { beginUpdate(resourceGroupName: string, resourceName: string, options: { parameters? : models.SignalRUpdateParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Operation to restart a SignalR service. + * + * @param {string} 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 {string} resourceName The name of the SignalR resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginRestartWithHttpOperationResponse(resourceGroupName: string, resourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Operation to restart a SignalR service. + * + * @param {string} 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 {string} resourceName The name of the SignalR resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginRestart(resourceGroupName: string, resourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRestart(resourceGroupName: string, resourceName: string, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, resourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Handles requests to list all resources in a subscription. * diff --git a/lib/services/signalrManagement/lib/operations/signalR.js b/lib/services/signalrManagement/lib/operations/signalR.js index f5dd1c7c0f..fff4de2c30 100644 --- a/lib/services/signalrManagement/lib/operations/signalR.js +++ b/lib/services/signalrManagement/lib/operations/signalR.js @@ -745,7 +745,7 @@ function _get(resourceGroupName, resourceName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{resourceName}', encodeURIComponent(resourceName)); @@ -863,8 +863,8 @@ function _get(resourceGroupName, resourceName, options, callback) { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -1044,8 +1044,8 @@ function _deleteMethod(resourceGroupName, resourceName, options, callback) { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -1135,6 +1135,71 @@ function _update(resourceGroupName, resourceName, options, callback) { }); } + +/** + * Operation to restart a SignalR service. + * + * @param {string} 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 {string} resourceName The name of the SignalR resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _restart(resourceGroupName, resourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginRestart(resourceGroupName, resourceName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + /** * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be * regenerated at the same time. @@ -1335,8 +1400,8 @@ function _beginRegenerateKey(resourceGroupName, resourceName, options, callback) * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -1408,7 +1473,7 @@ function _beginCreateOrUpdate(resourceGroupName, resourceName, options, callback // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{resourceName}', encodeURIComponent(resourceName)); @@ -1568,7 +1633,7 @@ function _beginDeleteMethod(resourceGroupName, resourceName, options, callback) // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{resourceName}', encodeURIComponent(resourceName)); @@ -1662,8 +1727,8 @@ function _beginDeleteMethod(resourceGroupName, resourceName, options, callback) * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -1735,7 +1800,7 @@ function _beginUpdate(resourceGroupName, resourceName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{resourceName}', encodeURIComponent(resourceName)); @@ -1836,6 +1901,135 @@ function _beginUpdate(resourceGroupName, resourceName, options, callback) { }); } +/** + * Operation to restart a SignalR service. + * + * @param {string} 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 {string} resourceName The name of the SignalR resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginRestart(resourceGroupName, resourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceName === null || resourceName === undefined || typeof resourceName.valueOf() !== 'string') { + throw new Error('resourceName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/restart'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceName}', encodeURIComponent(resourceName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + /** * Handles requests to list all resources in a subscription. * @@ -2107,10 +2301,12 @@ class SignalR { this._createOrUpdate = _createOrUpdate; this._deleteMethod = _deleteMethod; this._update = _update; + this._restart = _restart; this._beginRegenerateKey = _beginRegenerateKey; this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; this._beginUpdate = _beginUpdate; + this._beginRestart = _beginRestart; this._listBySubscriptionNext = _listBySubscriptionNext; this._listByResourceGroupNext = _listByResourceGroupNext; } @@ -2693,8 +2889,8 @@ class SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -2769,8 +2965,8 @@ class SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -2950,8 +3146,8 @@ class SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -3020,8 +3216,8 @@ class SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -3088,6 +3284,95 @@ class SignalR { } } + /** + * Operation to restart a SignalR service. + * + * @param {string} 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 {string} resourceName The name of the SignalR resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + restartWithHttpOperationResponse(resourceGroupName, resourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._restart(resourceGroupName, resourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Operation to restart a SignalR service. + * + * @param {string} 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 {string} resourceName The name of the SignalR resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + restart(resourceGroupName, resourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._restart(resourceGroupName, resourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._restart(resourceGroupName, resourceName, options, optionalCallback); + } + } + /** * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be * regenerated at the same time. @@ -3224,8 +3509,8 @@ class SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -3300,8 +3585,8 @@ class SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -3481,8 +3766,8 @@ class SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -3551,8 +3836,8 @@ class SignalR { * specified) * * @param {string} [options.parameters.sku.tier] Optional tier of this - * particular SKU. `Basic` is deprecated, use `Standard` instead for Basic - * tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + * particular SKU. `Basic` is deprecated, use `Standard` instead. Possible + * values include: 'Free', 'Basic', 'Standard', 'Premium' * * @param {string} [options.parameters.sku.size] Optional, string. When the * name field is the combination of tier and some other value, this would be @@ -3619,6 +3904,95 @@ class SignalR { } } + /** + * Operation to restart a SignalR service. + * + * @param {string} 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 {string} resourceName The name of the SignalR resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginRestartWithHttpOperationResponse(resourceGroupName, resourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginRestart(resourceGroupName, resourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Operation to restart a SignalR service. + * + * @param {string} 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 {string} resourceName The name of the SignalR resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginRestart(resourceGroupName, resourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginRestart(resourceGroupName, resourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginRestart(resourceGroupName, resourceName, options, optionalCallback); + } + } + /** * Handles requests to list all resources in a subscription. * diff --git a/lib/services/signalrManagement/package.json b/lib/services/signalrManagement/package.json index 253f12bc17..b0ac17de3f 100644 --- a/lib/services/signalrManagement/package.json +++ b/lib/services/signalrManagement/package.json @@ -22,4 +22,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +}