Skip to content

Commit

Permalink
Generated from 3f98bca11f41555edfc3118049f48a2c5cc71dc9
Browse files Browse the repository at this point in the history
Run prettier
  • Loading branch information
SDK Automation committed May 7, 2020
1 parent a98996d commit f19113d
Show file tree
Hide file tree
Showing 13 changed files with 202 additions and 34 deletions.
2 changes: 1 addition & 1 deletion sdk/signalr/arm-signalr/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Microsoft
Copyright (c) 2020 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
Expand Down
5 changes: 3 additions & 2 deletions sdk/signalr/arm-signalr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ npm install @azure/arm-signalr

##### Install @azure/ms-rest-nodeauth

- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
```bash
npm install @azure/ms-rest-nodeauth
npm install @azure/ms-rest-nodeauth@"^3.0.0"
```

##### Sample code
Expand Down Expand Up @@ -95,4 +96,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to

- [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%2Fsdk%2Fsignalr%2Farm-signalr%2FREADME.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/signalr/arm-signalr/README.png)
14 changes: 7 additions & 7 deletions sdk/signalr/arm-signalr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "SignalRManagementClient Library with typescript type definitions for node.js and browser.",
"version": "2.0.0",
"dependencies": {
"@azure/ms-rest-azure-js": "^1.3.2",
"@azure/ms-rest-js": "^1.8.1",
"tslib": "^1.9.3"
"@azure/ms-rest-azure-js": "^2.0.1",
"@azure/ms-rest-js": "^2.0.4",
"tslib": "^1.10.0"
},
"keywords": [
"node",
Expand All @@ -20,11 +20,11 @@
"module": "./esm/signalRManagementClient.js",
"types": "./esm/signalRManagementClient.d.ts",
"devDependencies": {
"typescript": "^3.1.1",
"rollup": "^0.66.2",
"rollup-plugin-node-resolve": "^3.4.0",
"typescript": "^3.5.3",
"rollup": "^1.18.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.4.9"
"uglify-js": "^3.6.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/signalr/arm-signalr",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion sdk/signalr/arm-signalr/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const config = {
*/`
},
plugins: [
nodeResolve({ module: true }),
nodeResolve({ mainFields: ['module', 'main'] }),
sourcemaps()
]
};
Expand Down
71 changes: 70 additions & 1 deletion sdk/signalr/arm-signalr/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,20 @@ export interface MetricSpecification {
dimensions?: Dimension[];
}

/**
* 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;
}

/**
* An object that describes a specification.
*/
Expand All @@ -108,6 +122,10 @@ export interface ServiceSpecification {
* Specifications of the Metrics for Azure Monitoring.
*/
metricSpecifications?: MetricSpecification[];
/**
* Specifications of the Logs for Azure Monitoring.
*/
logSpecifications?: LogSpecification[];
}

/**
Expand Down Expand Up @@ -143,6 +161,39 @@ export interface Operation {
properties?: OperationProperties;
}

/**
* Describes a particular API error with an error code and a message.
*/
export interface ErrorResponseBody {
/**
* An error code that describes the error condition more precisely than an HTTP status code.
* Can be used to programmatically handle specific error cases.
*/
code: string;
/**
* A message that describes the error in detail and provides debugging information.
*/
message: string;
/**
* The target of the particular error (for example, the name of the property in error).
*/
target?: string;
/**
* Contains nested errors that are related to this error.
*/
details?: ErrorResponseBody[];
}

/**
* Contains information about an API error.
*/
export interface ErrorResponse {
/**
* Describes a particular API error with an error code and a message.
*/
error?: ErrorResponseBody;
}

/**
* Data POST-ed to the nameAvailability action
*/
Expand Down Expand Up @@ -313,9 +364,19 @@ export interface SignalRResource extends TrackedResource {
* Feature of a SignalR resource, which controls the SignalR runtime behavior.
*/
export interface SignalRFeature {
/**
* FeatureFlags is the supported features of Azure SignalR service.
* - ServiceMode: Flag for backend server for SignalR service. Values allowed: "Default": have
* your own backend server; "Serverless": your application doesn't have a backend server;
* "Classic": for backward compatibility. Support both Default and Serverless mode but not
* recommended; "PredefinedOnly": for future use.
* - EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log category
* respectively. Possible values include: 'ServiceMode', 'EnableConnectivityLogs'
*/
flag: FeatureFlags;
/**
* Value of the feature flag. See Azure SignalR service document
* https://docs.microsoft.com/en-us/azure/azure-signalr/ for allowed values.
* https://docs.microsoft.com/azure/azure-signalr/ for allowed values.
*/
value: string;
/**
Expand Down Expand Up @@ -600,6 +661,14 @@ export type SignalRSkuTier = 'Free' | 'Basic' | 'Standard' | 'Premium';
*/
export type ProvisioningState = 'Unknown' | 'Succeeded' | 'Failed' | 'Canceled' | 'Running' | 'Creating' | 'Updating' | 'Deleting' | 'Moving';

/**
* Defines values for FeatureFlags.
* Possible values include: 'ServiceMode', 'EnableConnectivityLogs'
* @readonly
* @enum {string}
*/
export type FeatureFlags = 'ServiceMode' | 'EnableConnectivityLogs';

/**
* Defines values for KeyType.
* Possible values include: 'Primary', 'Secondary'
Expand Down
95 changes: 93 additions & 2 deletions sdk/signalr/arm-signalr/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,28 @@ export const MetricSpecification: msRest.CompositeMapper = {
}
};

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 ServiceSpecification: msRest.CompositeMapper = {
serializedName: "ServiceSpecification",
type: {
Expand All @@ -161,6 +183,18 @@ export const ServiceSpecification: msRest.CompositeMapper = {
}
}
}
},
logSpecifications: {
serializedName: "logSpecifications",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "LogSpecification"
}
}
}
}
}
}
Expand Down Expand Up @@ -219,6 +253,65 @@ export const Operation: msRest.CompositeMapper = {
}
};

export const ErrorResponseBody: msRest.CompositeMapper = {
serializedName: "ErrorResponseBody",
type: {
name: "Composite",
className: "ErrorResponseBody",
modelProperties: {
code: {
required: true,
serializedName: "code",
type: {
name: "String"
}
},
message: {
required: true,
serializedName: "message",
type: {
name: "String"
}
},
target: {
serializedName: "target",
type: {
name: "String"
}
},
details: {
serializedName: "details",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "ErrorResponseBody"
}
}
}
}
}
}
};

export const ErrorResponse: msRest.CompositeMapper = {
serializedName: "ErrorResponse",
type: {
name: "Composite",
className: "ErrorResponse",
modelProperties: {
error: {
serializedName: "error",
type: {
name: "Composite",
className: "ErrorResponseBody"
}
}
}
}
};

export const NameAvailabilityParameters: msRest.CompositeMapper = {
serializedName: "NameAvailabilityParameters",
type: {
Expand Down Expand Up @@ -463,9 +556,7 @@ export const SignalRFeature: msRest.CompositeMapper = {
modelProperties: {
flag: {
required: true,
isConstant: true,
serializedName: "flag",
defaultValue: 'ServiceMode',
type: {
name: "String"
}
Expand Down
4 changes: 3 additions & 1 deletion sdk/signalr/arm-signalr/src/models/operationsMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
*/

export {
CloudError,
Dimension,
ErrorResponse,
ErrorResponseBody,
LogSpecification,
MetricSpecification,
Operation,
OperationDisplay,
Expand Down
3 changes: 2 additions & 1 deletion sdk/signalr/arm-signalr/src/models/signalRMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

export {
BaseResource,
CloudError,
ErrorResponse,
ErrorResponseBody,
NameAvailability,
NameAvailabilityParameters,
RegenerateKeyParameters,
Expand Down
3 changes: 2 additions & 1 deletion sdk/signalr/arm-signalr/src/models/usagesMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
*/

export {
CloudError,
ErrorResponse,
ErrorResponseBody,
SignalRUsage,
SignalRUsageList,
SignalRUsageName
Expand Down
4 changes: 2 additions & 2 deletions sdk/signalr/arm-signalr/src/operations/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const listOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.OperationList
},
default: {
bodyMapper: Mappers.CloudError
bodyMapper: Mappers.ErrorResponse
}
},
serializer
Expand All @@ -116,7 +116,7 @@ const listNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.OperationList
},
default: {
bodyMapper: Mappers.CloudError
bodyMapper: Mappers.ErrorResponse
}
},
serializer
Expand Down
Loading

0 comments on commit f19113d

Please sign in to comment.