From 4b5a2db17be56a646d170c126f0f4a4c84a6aec3 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 26 Nov 2018 11:40:09 -0800 Subject: [PATCH 1/5] Generated from fdf8665b81fd84f0bbd4380cb43bb68219c36697 (#575) rename folder paths for autorest code generation --- packages/@azure/arm-security/README.md | 53 ++++++------------- .../@azure/arm-security/lib/models/index.ts | 4 +- .../@azure/arm-security/lib/models/mappers.ts | 14 ++++- .../arm-security/lib/models/parameters.ts | 2 +- .../operations/advancedThreatProtection.ts | 2 +- .../arm-security/lib/operations/alerts.ts | 2 +- .../lib/operations/allowedConnections.ts | 2 +- .../operations/autoProvisioningSettings.ts | 2 +- .../lib/operations/compliances.ts | 2 +- .../operations/discoveredSecuritySolutions.ts | 2 +- .../operations/externalSecuritySolutions.ts | 2 +- .../informationProtectionPolicies.ts | 2 +- .../operations/jitNetworkAccessPolicies.ts | 2 +- .../arm-security/lib/operations/locations.ts | 2 +- .../arm-security/lib/operations/operations.ts | 2 +- .../arm-security/lib/operations/pricings.ts | 2 +- .../lib/operations/securityContacts.ts | 2 +- .../arm-security/lib/operations/settings.ts | 2 +- .../arm-security/lib/operations/tasks.ts | 2 +- .../arm-security/lib/operations/topology.ts | 2 +- .../lib/operations/workspaceSettings.ts | 2 +- .../@azure/arm-security/lib/securityCenter.ts | 2 +- .../arm-security/lib/securityCenterContext.ts | 4 +- packages/@azure/arm-security/package.json | 4 +- packages/@azure/arm-security/rollup.config.js | 6 +-- packages/@azure/arm-security/tsconfig.json | 2 +- 26 files changed, 58 insertions(+), 67 deletions(-) diff --git a/packages/@azure/arm-security/README.md b/packages/@azure/arm-security/README.md index d3d2e6d1603e..0bd4ee4d1922 100644 --- a/packages/@azure/arm-security/README.md +++ b/packages/@azure/arm-security/README.md @@ -1,34 +1,24 @@ -## Azure SecurityCenter SDK for JavaScript - +# Azure SecurityCenter SDK for JavaScript This package contains an isomorphic SDK for SecurityCenter. -### Currently supported environments - +## Currently supported environments - Node.js version 6.x.x or higher - Browser JavaScript -### How to Install - +## How to Install ``` npm install @azure/arm-security ``` -### How to use - -#### nodejs - Authentication, client creation and list pricings as an example written in TypeScript. -##### Install @azure/ms-rest-nodeauth - -``` -npm install @azure/ms-rest-nodeauth -``` +## How to use -##### Sample code +### nodejs - Authentication, client creation and list pricings as an example written in TypeScript. ```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; +import * as msRest from "ms-rest-js"; +import * as msRestAzure from "ms-rest-azure-js"; +import * as msRestNodeAuth from "ms-rest-nodeauth"; import { SecurityCenter, SecurityCenterModels, SecurityCenterMappers } from "@azure/arm-security"; const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; @@ -43,16 +33,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and list pricings as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` - -##### Sample code - +### browser - Authentication, client creation and list pricings as an example written in JavaScript. See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - index.html @@ -61,11 +42,11 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to @azure/arm-security sample - - - + + + - - + + ``` -## Related projects - -- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) +# Related projects + - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) diff --git a/packages/@azure/arm-security/lib/models/index.ts b/packages/@azure/arm-security/lib/models/index.ts index dc38e6a5aba6..491aee7cc5ab 100644 --- a/packages/@azure/arm-security/lib/models/index.ts +++ b/packages/@azure/arm-security/lib/models/index.ts @@ -8,8 +8,8 @@ * regenerated. */ -import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; +import { BaseResource, CloudError, AzureServiceClientOptions } from "ms-rest-azure-js"; +import * as msRest from "ms-rest-js"; export { BaseResource, CloudError }; diff --git a/packages/@azure/arm-security/lib/models/mappers.ts b/packages/@azure/arm-security/lib/models/mappers.ts index b54822ca337d..898a47ac8882 100644 --- a/packages/@azure/arm-security/lib/models/mappers.ts +++ b/packages/@azure/arm-security/lib/models/mappers.ts @@ -8,8 +8,8 @@ * regenerated. */ -import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; +import { CloudErrorMapper, BaseResourceMapper } from "ms-rest-azure-js"; +import * as msRest from "ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; @@ -2042,6 +2042,11 @@ export const SettingsList: msRest.CompositeMapper = { element: { type: { name: "Composite", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "Setting", className: "Setting" } } @@ -2276,6 +2281,11 @@ export const ExternalSecuritySolutionList: msRest.CompositeMapper = { element: { type: { name: "Composite", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "ExternalSecuritySolution", className: "ExternalSecuritySolution" } } diff --git a/packages/@azure/arm-security/lib/models/parameters.ts b/packages/@azure/arm-security/lib/models/parameters.ts index fb823bdaca2c..c82a9dc84bd2 100644 --- a/packages/@azure/arm-security/lib/models/parameters.ts +++ b/packages/@azure/arm-security/lib/models/parameters.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; export const acceptLanguage: msRest.OperationParameter = { parameterPath: "acceptLanguage", diff --git a/packages/@azure/arm-security/lib/operations/advancedThreatProtection.ts b/packages/@azure/arm-security/lib/operations/advancedThreatProtection.ts index 7c141526f4da..0ed82debd211 100644 --- a/packages/@azure/arm-security/lib/operations/advancedThreatProtection.ts +++ b/packages/@azure/arm-security/lib/operations/advancedThreatProtection.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/advancedThreatProtectionMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/alerts.ts b/packages/@azure/arm-security/lib/operations/alerts.ts index 5437e2d49e75..93e42d71cbce 100644 --- a/packages/@azure/arm-security/lib/operations/alerts.ts +++ b/packages/@azure/arm-security/lib/operations/alerts.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/alertsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/allowedConnections.ts b/packages/@azure/arm-security/lib/operations/allowedConnections.ts index b738cdb1d55a..2c88ee2f1e4d 100644 --- a/packages/@azure/arm-security/lib/operations/allowedConnections.ts +++ b/packages/@azure/arm-security/lib/operations/allowedConnections.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/allowedConnectionsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/autoProvisioningSettings.ts b/packages/@azure/arm-security/lib/operations/autoProvisioningSettings.ts index be242ac19ac5..7c0d4a92e18f 100644 --- a/packages/@azure/arm-security/lib/operations/autoProvisioningSettings.ts +++ b/packages/@azure/arm-security/lib/operations/autoProvisioningSettings.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/autoProvisioningSettingsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/compliances.ts b/packages/@azure/arm-security/lib/operations/compliances.ts index 73cb750b550e..ef0f6407f21a 100644 --- a/packages/@azure/arm-security/lib/operations/compliances.ts +++ b/packages/@azure/arm-security/lib/operations/compliances.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/compliancesMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/discoveredSecuritySolutions.ts b/packages/@azure/arm-security/lib/operations/discoveredSecuritySolutions.ts index 08ce2d37ee85..293a8c48a169 100644 --- a/packages/@azure/arm-security/lib/operations/discoveredSecuritySolutions.ts +++ b/packages/@azure/arm-security/lib/operations/discoveredSecuritySolutions.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/discoveredSecuritySolutionsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/externalSecuritySolutions.ts b/packages/@azure/arm-security/lib/operations/externalSecuritySolutions.ts index 564bd6cab181..098c85e4e0de 100644 --- a/packages/@azure/arm-security/lib/operations/externalSecuritySolutions.ts +++ b/packages/@azure/arm-security/lib/operations/externalSecuritySolutions.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/externalSecuritySolutionsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/informationProtectionPolicies.ts b/packages/@azure/arm-security/lib/operations/informationProtectionPolicies.ts index 59e511fb0445..140759ccc73b 100644 --- a/packages/@azure/arm-security/lib/operations/informationProtectionPolicies.ts +++ b/packages/@azure/arm-security/lib/operations/informationProtectionPolicies.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/informationProtectionPoliciesMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/jitNetworkAccessPolicies.ts b/packages/@azure/arm-security/lib/operations/jitNetworkAccessPolicies.ts index a9eca485751a..f37baabf017a 100644 --- a/packages/@azure/arm-security/lib/operations/jitNetworkAccessPolicies.ts +++ b/packages/@azure/arm-security/lib/operations/jitNetworkAccessPolicies.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/jitNetworkAccessPoliciesMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/locations.ts b/packages/@azure/arm-security/lib/operations/locations.ts index ca7e3a22f61b..ac9186be5c5f 100644 --- a/packages/@azure/arm-security/lib/operations/locations.ts +++ b/packages/@azure/arm-security/lib/operations/locations.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/locationsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/operations.ts b/packages/@azure/arm-security/lib/operations/operations.ts index 76388bc9221b..bcc646936806 100644 --- a/packages/@azure/arm-security/lib/operations/operations.ts +++ b/packages/@azure/arm-security/lib/operations/operations.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/operationsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/pricings.ts b/packages/@azure/arm-security/lib/operations/pricings.ts index 835af87be06a..79d78ddfe8ff 100644 --- a/packages/@azure/arm-security/lib/operations/pricings.ts +++ b/packages/@azure/arm-security/lib/operations/pricings.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/pricingsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/securityContacts.ts b/packages/@azure/arm-security/lib/operations/securityContacts.ts index d96d049f457f..3874df2da328 100644 --- a/packages/@azure/arm-security/lib/operations/securityContacts.ts +++ b/packages/@azure/arm-security/lib/operations/securityContacts.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/securityContactsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/settings.ts b/packages/@azure/arm-security/lib/operations/settings.ts index b5d38a326868..50f5b84a9826 100644 --- a/packages/@azure/arm-security/lib/operations/settings.ts +++ b/packages/@azure/arm-security/lib/operations/settings.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/settingsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/tasks.ts b/packages/@azure/arm-security/lib/operations/tasks.ts index cf2414a50cfe..0601a9e586cd 100644 --- a/packages/@azure/arm-security/lib/operations/tasks.ts +++ b/packages/@azure/arm-security/lib/operations/tasks.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/tasksMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/topology.ts b/packages/@azure/arm-security/lib/operations/topology.ts index 29881ed37736..5eed9ef73698 100644 --- a/packages/@azure/arm-security/lib/operations/topology.ts +++ b/packages/@azure/arm-security/lib/operations/topology.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/topologyMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/workspaceSettings.ts b/packages/@azure/arm-security/lib/operations/workspaceSettings.ts index 7aa4886714a4..3edeaa7ee145 100644 --- a/packages/@azure/arm-security/lib/operations/workspaceSettings.ts +++ b/packages/@azure/arm-security/lib/operations/workspaceSettings.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/workspaceSettingsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/securityCenter.ts b/packages/@azure/arm-security/lib/securityCenter.ts index 5b1f4c9ebf51..5a690b9c21c3 100644 --- a/packages/@azure/arm-security/lib/securityCenter.ts +++ b/packages/@azure/arm-security/lib/securityCenter.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; diff --git a/packages/@azure/arm-security/lib/securityCenterContext.ts b/packages/@azure/arm-security/lib/securityCenterContext.ts index 1456da91b8ae..7a8c6c1b6dfb 100644 --- a/packages/@azure/arm-security/lib/securityCenterContext.ts +++ b/packages/@azure/arm-security/lib/securityCenterContext.ts @@ -9,8 +9,8 @@ */ import * as Models from "./models"; -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as msRest from "ms-rest-js"; +import * as msRestAzure from "ms-rest-azure-js"; const packageName = "@azure/arm-security"; const packageVersion = "0.1.0"; diff --git a/packages/@azure/arm-security/package.json b/packages/@azure/arm-security/package.json index 7f9c58f6e582..05865f123e09 100644 --- a/packages/@azure/arm-security/package.json +++ b/packages/@azure/arm-security/package.json @@ -4,8 +4,8 @@ "description": "SecurityCenter Library with typescript type definitions for node.js and browser.", "version": "0.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "ms-rest-azure-js": "^1.0.181", + "ms-rest-js": "^1.0.460", "tslib": "^1.9.3" }, "keywords": [ diff --git a/packages/@azure/arm-security/rollup.config.js b/packages/@azure/arm-security/rollup.config.js index 651c85e10ed3..0ac6065927cf 100644 --- a/packages/@azure/arm-security/rollup.config.js +++ b/packages/@azure/arm-security/rollup.config.js @@ -4,15 +4,15 @@ import nodeResolve from "rollup-plugin-node-resolve"; */ const config = { input: './esm/securityCenter.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + external: ["ms-rest-js", "ms-rest-azure-js"], output: { file: "./dist/arm-security.js", format: "umd", name: "Azure.ArmSecurity", sourcemap: true, globals: { - "@azure/ms-rest-js": "msRest", - "@azure/ms-rest-azure-js": "msRestAzure" + "ms-rest-js": "msRest", + "ms-rest-azure-js": "msRestAzure" }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/@azure/arm-security/tsconfig.json b/packages/@azure/arm-security/tsconfig.json index 51ea90961ce5..f32d1664f320 100644 --- a/packages/@azure/arm-security/tsconfig.json +++ b/packages/@azure/arm-security/tsconfig.json @@ -14,6 +14,6 @@ "outDir": "./esm", "importHelpers": true }, - "include": ["./lib/**/*.ts"], + "include": ["./lib/**/*"], "exclude": ["node_modules"] } From 82bb14609de220cbc33a267352ff442b72425ab8 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 5 Dec 2018 10:35:43 -0800 Subject: [PATCH 2/5] Generated from e691835335c3acf12428c89776c765a1fa2bdad5 (#722) typo: security/resource-manager/Microsoft.Security - Double word "alert" - addess -> address - whos -> whose --- packages/@azure/arm-security/lib/models/index.ts | 4 ++-- packages/@azure/arm-security/lib/operations/alerts.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/@azure/arm-security/lib/models/index.ts b/packages/@azure/arm-security/lib/models/index.ts index 491aee7cc5ab..77097a934094 100644 --- a/packages/@azure/arm-security/lib/models/index.ts +++ b/packages/@azure/arm-security/lib/models/index.ts @@ -1148,8 +1148,8 @@ export type ExternalSecuritySolutionUnion = ExternalSecuritySolution | CefExtern * @interface * An interface representing ExternalSecuritySolution. * Represents a security solution external to Azure Security Center which sends - * information to an OMS workspace and whos data is displayed by Azure Security - * Center. + * information to an OMS workspace and whose data is displayed by Azure + * Security Center. * */ export interface ExternalSecuritySolution { diff --git a/packages/@azure/arm-security/lib/operations/alerts.ts b/packages/@azure/arm-security/lib/operations/alerts.ts index 93e42d71cbce..f2cb6f43917f 100644 --- a/packages/@azure/arm-security/lib/operations/alerts.ts +++ b/packages/@azure/arm-security/lib/operations/alerts.ts @@ -51,7 +51,7 @@ export class Alerts { } /** - * List all the alerts alerts that are associated with the resource group + * List all the alerts that are associated with the resource group * @param resourceGroupName The name of the resource group within the user's subscription. The name * is case insensitive. * @param [options] The optional parameters @@ -307,7 +307,7 @@ export class Alerts { } /** - * List all the alerts alerts that are associated with the resource group + * List all the alerts that are associated with the resource group * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise From 4ab1c8154a96bcbc7b311a23298d8d8039cea0ab Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 2 Jan 2019 09:18:51 -0800 Subject: [PATCH 3/5] [AutoPR security/resource-manager] Settings API - changed the kind to work with .net nuget (#882) * Generated from 1a24198dd982a4fcb510456404994241f55dc883 Settings API * Generated from 1a24198dd982a4fcb510456404994241f55dc883 Settings API --- packages/@azure/arm-security/LICENSE.txt | 2 +- .../models/advancedThreatProtectionMappers.ts | 5 +- .../arm-security/lib/models/alertsMappers.ts | 5 +- .../models/autoProvisioningSettingsMappers.ts | 5 +- .../lib/models/compliancesMappers.ts | 5 +- .../@azure/arm-security/lib/models/index.ts | 95 +++++-------------- .../informationProtectionPoliciesMappers.ts | 5 +- .../lib/models/locationsMappers.ts | 5 +- .../@azure/arm-security/lib/models/mappers.ts | 69 +++----------- .../lib/models/pricingsMappers.ts | 5 +- .../lib/models/securityContactsMappers.ts | 5 +- .../lib/models/settingsMappers.ts | 22 ++++- .../arm-security/lib/models/tasksMappers.ts | 5 +- .../lib/models/workspaceSettingsMappers.ts | 5 +- .../arm-security/lib/operations/settings.ts | 26 ++--- 15 files changed, 115 insertions(+), 149 deletions(-) diff --git a/packages/@azure/arm-security/LICENSE.txt b/packages/@azure/arm-security/LICENSE.txt index 5431ba98b936..8f3d856145c5 100644 --- a/packages/@azure/arm-security/LICENSE.txt +++ b/packages/@azure/arm-security/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/packages/@azure/arm-security/lib/models/advancedThreatProtectionMappers.ts b/packages/@azure/arm-security/lib/models/advancedThreatProtectionMappers.ts index a5728932eabf..56f424d84d1e 100644 --- a/packages/@azure/arm-security/lib/models/advancedThreatProtectionMappers.ts +++ b/packages/@azure/arm-security/lib/models/advancedThreatProtectionMappers.ts @@ -20,6 +20,7 @@ export { AutoProvisioningSetting, Compliance, ComplianceSegment, + SettingResource, InformationProtectionPolicy, SensitivityLabel, InformationType, @@ -29,6 +30,8 @@ export { AscLocation, Alert, AlertEntity, - AlertConfidenceReason + AlertConfidenceReason, + Setting, + DataExportSetting } from "../models/mappers"; diff --git a/packages/@azure/arm-security/lib/models/alertsMappers.ts b/packages/@azure/arm-security/lib/models/alertsMappers.ts index db7d75be9704..50632c93969f 100644 --- a/packages/@azure/arm-security/lib/models/alertsMappers.ts +++ b/packages/@azure/arm-security/lib/models/alertsMappers.ts @@ -24,12 +24,15 @@ export { Compliance, ComplianceSegment, AdvancedThreatProtectionSetting, + SettingResource, InformationProtectionPolicy, SensitivityLabel, InformationType, InformationProtectionKeyword, SecurityTask, SecurityTaskParameters, - AscLocation + AscLocation, + Setting, + DataExportSetting } from "../models/mappers"; diff --git a/packages/@azure/arm-security/lib/models/autoProvisioningSettingsMappers.ts b/packages/@azure/arm-security/lib/models/autoProvisioningSettingsMappers.ts index 8c012f3647a2..491a2a41808e 100644 --- a/packages/@azure/arm-security/lib/models/autoProvisioningSettingsMappers.ts +++ b/packages/@azure/arm-security/lib/models/autoProvisioningSettingsMappers.ts @@ -21,6 +21,7 @@ export { Compliance, ComplianceSegment, AdvancedThreatProtectionSetting, + SettingResource, InformationProtectionPolicy, SensitivityLabel, InformationType, @@ -30,6 +31,8 @@ export { AscLocation, Alert, AlertEntity, - AlertConfidenceReason + AlertConfidenceReason, + Setting, + DataExportSetting } from "../models/mappers"; diff --git a/packages/@azure/arm-security/lib/models/compliancesMappers.ts b/packages/@azure/arm-security/lib/models/compliancesMappers.ts index a38fc6ae8046..1a03d94dacb2 100644 --- a/packages/@azure/arm-security/lib/models/compliancesMappers.ts +++ b/packages/@azure/arm-security/lib/models/compliancesMappers.ts @@ -21,6 +21,7 @@ export { WorkspaceSetting, AutoProvisioningSetting, AdvancedThreatProtectionSetting, + SettingResource, InformationProtectionPolicy, SensitivityLabel, InformationType, @@ -30,6 +31,8 @@ export { AscLocation, Alert, AlertEntity, - AlertConfidenceReason + AlertConfidenceReason, + Setting, + DataExportSetting } from "../models/mappers"; diff --git a/packages/@azure/arm-security/lib/models/index.ts b/packages/@azure/arm-security/lib/models/index.ts index 77097a934094..6f76315a7f0d 100644 --- a/packages/@azure/arm-security/lib/models/index.ts +++ b/packages/@azure/arm-security/lib/models/index.ts @@ -205,39 +205,29 @@ export interface AdvancedThreatProtectionSetting extends Resource { } /** - * Contains the possible cases for Setting. + * @interface + * An interface representing SettingResource. + * The kind of the security setting + * + * @extends Resource */ -export type SettingUnion = Setting | DataExportSetting; +export interface SettingResource extends Resource { + /** + * @member {SettingKind} kind the kind of the settings string + * (DataExportSetting). Possible values include: 'DataExportSetting', + * 'AlertSuppressionSetting' + */ + kind: SettingKind; +} /** * @interface * An interface representing Setting. * Represents a security setting in Azure Security Center. * + * @extends SettingResource */ -export interface Setting { - /** - * @member {string} kind Polymorphic Discriminator - */ - kind: "Setting"; - /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly id?: string; - /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly name?: string; - /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly type?: string; +export interface Setting extends SettingResource { } /** @@ -245,50 +235,15 @@ export interface Setting { * An interface representing DataExportSetting. * Represents a data export setting * + * @extends Setting */ -export interface DataExportSetting { - /** - * @member {string} kind Polymorphic Discriminator - */ - kind: "DataExportSetting"; - /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly id?: string; - /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly name?: string; - /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly type?: string; +export interface DataExportSetting extends Setting { /** * @member {boolean} enabled Is the data export setting is enabled */ enabled: boolean; } -/** - * @interface - * An interface representing SettingKind1. - * The kind of the security setting - * - */ -export interface SettingKind1 { - /** - * @member {SettingKind} [kind] the kind of the settings string. Possible - * values include: 'DataExportSetting' - */ - kind?: SettingKind; -} - /** * @interface * An interface representing SensitivityLabel. @@ -1771,9 +1726,9 @@ export interface ComplianceList extends Array { * An interface representing the SettingsList. * Subscription settings list. * - * @extends Array + * @extends Array */ -export interface SettingsList extends Array { +export interface SettingsList extends Array { /** * @member {string} [nextLink] The URI to fetch the next page. * **NOTE: This property will not be serialized. It can only be populated by @@ -1968,11 +1923,11 @@ export type AutoProvision = 'On' | 'Off'; /** * Defines values for SettingKind. - * Possible values include: 'DataExportSetting' + * Possible values include: 'DataExportSetting', 'AlertSuppressionSetting' * @readonly * @enum {string} */ -export type SettingKind = 'DataExportSetting'; +export type SettingKind = 'DataExportSetting' | 'AlertSuppressionSetting'; /** * Defines values for SecurityFamily. @@ -2629,7 +2584,7 @@ export type SettingsListResponse = SettingsList & { /** * Contains response data for the get operation. */ -export type SettingsGetResponse = SettingUnion & { +export type SettingsGetResponse = Setting & { /** * The underlying HTTP response. */ @@ -2641,14 +2596,14 @@ export type SettingsGetResponse = SettingUnion & { /** * The response body as parsed JSON or XML */ - parsedBody: SettingUnion; + parsedBody: Setting; }; }; /** * Contains response data for the update operation. */ -export type SettingsUpdateResponse = SettingUnion & { +export type SettingsUpdateResponse = Setting & { /** * The underlying HTTP response. */ @@ -2660,7 +2615,7 @@ export type SettingsUpdateResponse = SettingUnion & { /** * The response body as parsed JSON or XML */ - parsedBody: SettingUnion; + parsedBody: Setting; }; }; diff --git a/packages/@azure/arm-security/lib/models/informationProtectionPoliciesMappers.ts b/packages/@azure/arm-security/lib/models/informationProtectionPoliciesMappers.ts index 427b115cf9f7..399852e41506 100644 --- a/packages/@azure/arm-security/lib/models/informationProtectionPoliciesMappers.ts +++ b/packages/@azure/arm-security/lib/models/informationProtectionPoliciesMappers.ts @@ -25,11 +25,14 @@ export { Compliance, ComplianceSegment, AdvancedThreatProtectionSetting, + SettingResource, SecurityTask, SecurityTaskParameters, AscLocation, Alert, AlertEntity, - AlertConfidenceReason + AlertConfidenceReason, + Setting, + DataExportSetting } from "../models/mappers"; diff --git a/packages/@azure/arm-security/lib/models/locationsMappers.ts b/packages/@azure/arm-security/lib/models/locationsMappers.ts index a9e459ba15e8..540a5212729c 100644 --- a/packages/@azure/arm-security/lib/models/locationsMappers.ts +++ b/packages/@azure/arm-security/lib/models/locationsMappers.ts @@ -22,6 +22,7 @@ export { Compliance, ComplianceSegment, AdvancedThreatProtectionSetting, + SettingResource, InformationProtectionPolicy, SensitivityLabel, InformationType, @@ -30,6 +31,8 @@ export { SecurityTaskParameters, Alert, AlertEntity, - AlertConfidenceReason + AlertConfidenceReason, + Setting, + DataExportSetting } from "../models/mappers"; diff --git a/packages/@azure/arm-security/lib/models/mappers.ts b/packages/@azure/arm-security/lib/models/mappers.ts index 898a47ac8882..7fdd7c93d161 100644 --- a/packages/@azure/arm-security/lib/models/mappers.ts +++ b/packages/@azure/arm-security/lib/models/mappers.ts @@ -239,38 +239,13 @@ export const AdvancedThreatProtectionSetting: msRest.CompositeMapper = { } }; -export const Setting: msRest.CompositeMapper = { - serializedName: "Setting", +export const SettingResource: msRest.CompositeMapper = { + serializedName: "SettingResource", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - uberParent: "Setting", - className: "Setting", + className: "SettingResource", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - }, + ...Resource.type.modelProperties, kind: { required: true, serializedName: "kind", @@ -282,12 +257,21 @@ export const Setting: msRest.CompositeMapper = { } }; +export const Setting: msRest.CompositeMapper = { + serializedName: "Setting", + type: { + name: "Composite", + className: "Setting", + modelProperties: { + ...SettingResource.type.modelProperties + } + } +}; + export const DataExportSetting: msRest.CompositeMapper = { serializedName: "DataExportSetting", type: { name: "Composite", - polymorphicDiscriminator: Setting.type.polymorphicDiscriminator, - uberParent: "Setting", className: "DataExportSetting", modelProperties: { ...Setting.type.modelProperties, @@ -302,22 +286,6 @@ export const DataExportSetting: msRest.CompositeMapper = { } }; -export const SettingKind1: msRest.CompositeMapper = { - serializedName: "SettingKind", - type: { - name: "Composite", - className: "SettingKind1", - modelProperties: { - kind: { - serializedName: "kind", - type: { - name: "String" - } - } - } - } -}; - export const SensitivityLabel: msRest.CompositeMapper = { serializedName: "SensitivityLabel", type: { @@ -2042,11 +2010,6 @@ export const SettingsList: msRest.CompositeMapper = { element: { type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - uberParent: "Setting", className: "Setting" } } @@ -2363,8 +2326,6 @@ export const AllowedConnectionsList: msRest.CompositeMapper = { }; export const discriminators = { - 'Setting' : Setting, - 'Setting.DataExportSetting' : DataExportSetting, 'ExternalSecuritySolution' : ExternalSecuritySolution, 'ExternalSecuritySolution.CEF' : CefExternalSecuritySolution, 'ExternalSecuritySolution.ATA' : AtaExternalSecuritySolution, diff --git a/packages/@azure/arm-security/lib/models/pricingsMappers.ts b/packages/@azure/arm-security/lib/models/pricingsMappers.ts index 457b9ad15a1f..8cbc178ed4f6 100644 --- a/packages/@azure/arm-security/lib/models/pricingsMappers.ts +++ b/packages/@azure/arm-security/lib/models/pricingsMappers.ts @@ -21,6 +21,7 @@ export { Compliance, ComplianceSegment, AdvancedThreatProtectionSetting, + SettingResource, InformationProtectionPolicy, SensitivityLabel, InformationType, @@ -30,6 +31,8 @@ export { AscLocation, Alert, AlertEntity, - AlertConfidenceReason + AlertConfidenceReason, + Setting, + DataExportSetting } from "../models/mappers"; diff --git a/packages/@azure/arm-security/lib/models/securityContactsMappers.ts b/packages/@azure/arm-security/lib/models/securityContactsMappers.ts index 1e4d8593b773..d7480ad11f5c 100644 --- a/packages/@azure/arm-security/lib/models/securityContactsMappers.ts +++ b/packages/@azure/arm-security/lib/models/securityContactsMappers.ts @@ -21,6 +21,7 @@ export { Compliance, ComplianceSegment, AdvancedThreatProtectionSetting, + SettingResource, InformationProtectionPolicy, SensitivityLabel, InformationType, @@ -30,6 +31,8 @@ export { AscLocation, Alert, AlertEntity, - AlertConfidenceReason + AlertConfidenceReason, + Setting, + DataExportSetting } from "../models/mappers"; diff --git a/packages/@azure/arm-security/lib/models/settingsMappers.ts b/packages/@azure/arm-security/lib/models/settingsMappers.ts index 127c46204903..43a2b7e0e196 100644 --- a/packages/@azure/arm-security/lib/models/settingsMappers.ts +++ b/packages/@azure/arm-security/lib/models/settingsMappers.ts @@ -12,7 +12,27 @@ export { discriminators, SettingsList, Setting, + SettingResource, + Resource, + BaseResource, CloudError, - DataExportSetting + SecurityContact, + Pricing, + WorkspaceSetting, + AutoProvisioningSetting, + Compliance, + ComplianceSegment, + AdvancedThreatProtectionSetting, + DataExportSetting, + InformationProtectionPolicy, + SensitivityLabel, + InformationType, + InformationProtectionKeyword, + SecurityTask, + SecurityTaskParameters, + AscLocation, + Alert, + AlertEntity, + AlertConfidenceReason } from "../models/mappers"; diff --git a/packages/@azure/arm-security/lib/models/tasksMappers.ts b/packages/@azure/arm-security/lib/models/tasksMappers.ts index 5e5eb961a569..83d2ad45b231 100644 --- a/packages/@azure/arm-security/lib/models/tasksMappers.ts +++ b/packages/@azure/arm-security/lib/models/tasksMappers.ts @@ -23,6 +23,7 @@ export { Compliance, ComplianceSegment, AdvancedThreatProtectionSetting, + SettingResource, InformationProtectionPolicy, SensitivityLabel, InformationType, @@ -30,6 +31,8 @@ export { AscLocation, Alert, AlertEntity, - AlertConfidenceReason + AlertConfidenceReason, + Setting, + DataExportSetting } from "../models/mappers"; diff --git a/packages/@azure/arm-security/lib/models/workspaceSettingsMappers.ts b/packages/@azure/arm-security/lib/models/workspaceSettingsMappers.ts index df56c1d9defb..763b89532aa2 100644 --- a/packages/@azure/arm-security/lib/models/workspaceSettingsMappers.ts +++ b/packages/@azure/arm-security/lib/models/workspaceSettingsMappers.ts @@ -21,6 +21,7 @@ export { Compliance, ComplianceSegment, AdvancedThreatProtectionSetting, + SettingResource, InformationProtectionPolicy, SensitivityLabel, InformationType, @@ -30,6 +31,8 @@ export { AscLocation, Alert, AlertEntity, - AlertConfidenceReason + AlertConfidenceReason, + Setting, + DataExportSetting } from "../models/mappers"; diff --git a/packages/@azure/arm-security/lib/operations/settings.ts b/packages/@azure/arm-security/lib/operations/settings.ts index 50f5b84a9826..381126df586d 100644 --- a/packages/@azure/arm-security/lib/operations/settings.ts +++ b/packages/@azure/arm-security/lib/operations/settings.ts @@ -52,23 +52,23 @@ export class Settings { /** * Settings of different configurations in security center - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param [options] The optional parameters * @returns Promise */ get(settingName: Models.SettingName, options?: msRest.RequestOptionsBase): Promise; /** - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param callback The callback */ - get(settingName: Models.SettingName, callback: msRest.ServiceCallback): void; + get(settingName: Models.SettingName, callback: msRest.ServiceCallback): void; /** - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param options The optional parameters * @param callback The callback */ - get(settingName: Models.SettingName, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(settingName: Models.SettingName, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(settingName: Models.SettingName, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(settingName: Models.SettingName, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { settingName, @@ -80,26 +80,26 @@ export class Settings { /** * updating settings about different configurations in security center - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param setting Setting object * @param [options] The optional parameters * @returns Promise */ - update(settingName: Models.SettingName1, setting: Models.SettingUnion, options?: msRest.RequestOptionsBase): Promise; + update(settingName: Models.SettingName1, setting: Models.Setting, options?: msRest.RequestOptionsBase): Promise; /** - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param setting Setting object * @param callback The callback */ - update(settingName: Models.SettingName1, setting: Models.SettingUnion, callback: msRest.ServiceCallback): void; + update(settingName: Models.SettingName1, setting: Models.Setting, callback: msRest.ServiceCallback): void; /** - * @param settingName Name of setting. Possible values include: 'MCAS', 'WDATP' + * @param settingName Name of setting: (MCAS/WDATP). Possible values include: 'MCAS', 'WDATP' * @param setting Setting object * @param options The optional parameters * @param callback The callback */ - update(settingName: Models.SettingName1, setting: Models.SettingUnion, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(settingName: Models.SettingName1, setting: Models.SettingUnion, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update(settingName: Models.SettingName1, setting: Models.Setting, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(settingName: Models.SettingName1, setting: Models.Setting, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { settingName, From 0a3d66f1f4c7181994e7729c31fae30edb03e0a2 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 22 Jan 2019 13:48:21 -0800 Subject: [PATCH 4/5] Generated from 5d46282b1371de397d3d60083b6485ff73332f93 (#958) add comma --- packages/@azure/arm-security/README.md | 57 ++++++++++++------- .../@azure/arm-security/lib/models/index.ts | 4 +- .../@azure/arm-security/lib/models/mappers.ts | 9 +-- .../arm-security/lib/models/parameters.ts | 2 +- .../operations/advancedThreatProtection.ts | 2 +- .../arm-security/lib/operations/alerts.ts | 2 +- .../lib/operations/allowedConnections.ts | 2 +- .../operations/autoProvisioningSettings.ts | 2 +- .../lib/operations/compliances.ts | 2 +- .../operations/discoveredSecuritySolutions.ts | 2 +- .../operations/externalSecuritySolutions.ts | 2 +- .../informationProtectionPolicies.ts | 2 +- .../operations/jitNetworkAccessPolicies.ts | 2 +- .../arm-security/lib/operations/locations.ts | 2 +- .../arm-security/lib/operations/operations.ts | 2 +- .../arm-security/lib/operations/pricings.ts | 2 +- .../lib/operations/securityContacts.ts | 2 +- .../arm-security/lib/operations/settings.ts | 2 +- .../arm-security/lib/operations/tasks.ts | 2 +- .../arm-security/lib/operations/topology.ts | 2 +- .../lib/operations/workspaceSettings.ts | 11 ++-- .../@azure/arm-security/lib/securityCenter.ts | 2 +- .../arm-security/lib/securityCenterContext.ts | 4 +- packages/@azure/arm-security/package.json | 5 +- packages/@azure/arm-security/rollup.config.js | 26 +++++---- packages/@azure/arm-security/tsconfig.json | 2 +- 26 files changed, 89 insertions(+), 65 deletions(-) diff --git a/packages/@azure/arm-security/README.md b/packages/@azure/arm-security/README.md index 0bd4ee4d1922..7e2f5ac8e57e 100644 --- a/packages/@azure/arm-security/README.md +++ b/packages/@azure/arm-security/README.md @@ -1,24 +1,34 @@ -# Azure SecurityCenter SDK for JavaScript +## Azure SecurityCenter SDK for JavaScript + This package contains an isomorphic SDK for SecurityCenter. -## Currently supported environments +### Currently supported environments + - Node.js version 6.x.x or higher - Browser JavaScript -## How to Install -``` +### How to Install + +```bash npm install @azure/arm-security ``` +### How to use -## How to use +#### nodejs - Authentication, client creation and list pricings as an example written in TypeScript. + +##### Install @azure/ms-rest-nodeauth + +```bash +npm install @azure/ms-rest-nodeauth +``` -### nodejs - Authentication, client creation and list pricings as an example written in TypeScript. +##### Sample code -```ts -import * as msRest from "ms-rest-js"; -import * as msRestAzure from "ms-rest-azure-js"; -import * as msRestNodeAuth from "ms-rest-nodeauth"; +```typescript +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; import { SecurityCenter, SecurityCenterModels, SecurityCenterMappers } from "@azure/arm-security"; const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; @@ -33,7 +43,16 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -### browser - Authentication, client creation and list pricings as an example written in JavaScript. +#### browser - Authentication, client creation and list pricings as an example written in JavaScript. + +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` + +##### Sample code + See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - index.html @@ -42,11 +61,11 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to @azure/arm-security sample - - - + + + - - - + ``` -# Related projects - - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) diff --git a/packages/@azure/arm-security/lib/models/index.ts b/packages/@azure/arm-security/lib/models/index.ts index 6f76315a7f0d..d8b74510e8e5 100644 --- a/packages/@azure/arm-security/lib/models/index.ts +++ b/packages/@azure/arm-security/lib/models/index.ts @@ -8,8 +8,8 @@ * regenerated. */ -import { BaseResource, CloudError, AzureServiceClientOptions } from "ms-rest-azure-js"; -import * as msRest from "ms-rest-js"; +import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; diff --git a/packages/@azure/arm-security/lib/models/mappers.ts b/packages/@azure/arm-security/lib/models/mappers.ts index 7fdd7c93d161..c4895035268b 100644 --- a/packages/@azure/arm-security/lib/models/mappers.ts +++ b/packages/@azure/arm-security/lib/models/mappers.ts @@ -8,8 +8,8 @@ * regenerated. */ -import { CloudErrorMapper, BaseResourceMapper } from "ms-rest-azure-js"; -import * as msRest from "ms-rest-js"; +import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; @@ -2244,11 +2244,6 @@ export const ExternalSecuritySolutionList: msRest.CompositeMapper = { element: { type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - uberParent: "ExternalSecuritySolution", className: "ExternalSecuritySolution" } } diff --git a/packages/@azure/arm-security/lib/models/parameters.ts b/packages/@azure/arm-security/lib/models/parameters.ts index c82a9dc84bd2..fb823bdaca2c 100644 --- a/packages/@azure/arm-security/lib/models/parameters.ts +++ b/packages/@azure/arm-security/lib/models/parameters.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; export const acceptLanguage: msRest.OperationParameter = { parameterPath: "acceptLanguage", diff --git a/packages/@azure/arm-security/lib/operations/advancedThreatProtection.ts b/packages/@azure/arm-security/lib/operations/advancedThreatProtection.ts index 0ed82debd211..7c141526f4da 100644 --- a/packages/@azure/arm-security/lib/operations/advancedThreatProtection.ts +++ b/packages/@azure/arm-security/lib/operations/advancedThreatProtection.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/advancedThreatProtectionMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/alerts.ts b/packages/@azure/arm-security/lib/operations/alerts.ts index f2cb6f43917f..73df8ef66164 100644 --- a/packages/@azure/arm-security/lib/operations/alerts.ts +++ b/packages/@azure/arm-security/lib/operations/alerts.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/alertsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/allowedConnections.ts b/packages/@azure/arm-security/lib/operations/allowedConnections.ts index 2c88ee2f1e4d..b738cdb1d55a 100644 --- a/packages/@azure/arm-security/lib/operations/allowedConnections.ts +++ b/packages/@azure/arm-security/lib/operations/allowedConnections.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/allowedConnectionsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/autoProvisioningSettings.ts b/packages/@azure/arm-security/lib/operations/autoProvisioningSettings.ts index 7c0d4a92e18f..be242ac19ac5 100644 --- a/packages/@azure/arm-security/lib/operations/autoProvisioningSettings.ts +++ b/packages/@azure/arm-security/lib/operations/autoProvisioningSettings.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/autoProvisioningSettingsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/compliances.ts b/packages/@azure/arm-security/lib/operations/compliances.ts index ef0f6407f21a..73cb750b550e 100644 --- a/packages/@azure/arm-security/lib/operations/compliances.ts +++ b/packages/@azure/arm-security/lib/operations/compliances.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/compliancesMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/discoveredSecuritySolutions.ts b/packages/@azure/arm-security/lib/operations/discoveredSecuritySolutions.ts index 293a8c48a169..08ce2d37ee85 100644 --- a/packages/@azure/arm-security/lib/operations/discoveredSecuritySolutions.ts +++ b/packages/@azure/arm-security/lib/operations/discoveredSecuritySolutions.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/discoveredSecuritySolutionsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/externalSecuritySolutions.ts b/packages/@azure/arm-security/lib/operations/externalSecuritySolutions.ts index 098c85e4e0de..564bd6cab181 100644 --- a/packages/@azure/arm-security/lib/operations/externalSecuritySolutions.ts +++ b/packages/@azure/arm-security/lib/operations/externalSecuritySolutions.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/externalSecuritySolutionsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/informationProtectionPolicies.ts b/packages/@azure/arm-security/lib/operations/informationProtectionPolicies.ts index 140759ccc73b..59e511fb0445 100644 --- a/packages/@azure/arm-security/lib/operations/informationProtectionPolicies.ts +++ b/packages/@azure/arm-security/lib/operations/informationProtectionPolicies.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/informationProtectionPoliciesMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/jitNetworkAccessPolicies.ts b/packages/@azure/arm-security/lib/operations/jitNetworkAccessPolicies.ts index f37baabf017a..a9eca485751a 100644 --- a/packages/@azure/arm-security/lib/operations/jitNetworkAccessPolicies.ts +++ b/packages/@azure/arm-security/lib/operations/jitNetworkAccessPolicies.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/jitNetworkAccessPoliciesMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/locations.ts b/packages/@azure/arm-security/lib/operations/locations.ts index ac9186be5c5f..ca7e3a22f61b 100644 --- a/packages/@azure/arm-security/lib/operations/locations.ts +++ b/packages/@azure/arm-security/lib/operations/locations.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/locationsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/operations.ts b/packages/@azure/arm-security/lib/operations/operations.ts index bcc646936806..76388bc9221b 100644 --- a/packages/@azure/arm-security/lib/operations/operations.ts +++ b/packages/@azure/arm-security/lib/operations/operations.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/operationsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/pricings.ts b/packages/@azure/arm-security/lib/operations/pricings.ts index 79d78ddfe8ff..835af87be06a 100644 --- a/packages/@azure/arm-security/lib/operations/pricings.ts +++ b/packages/@azure/arm-security/lib/operations/pricings.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/pricingsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/securityContacts.ts b/packages/@azure/arm-security/lib/operations/securityContacts.ts index 3874df2da328..d96d049f457f 100644 --- a/packages/@azure/arm-security/lib/operations/securityContacts.ts +++ b/packages/@azure/arm-security/lib/operations/securityContacts.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/securityContactsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/settings.ts b/packages/@azure/arm-security/lib/operations/settings.ts index 381126df586d..e40fa47db91c 100644 --- a/packages/@azure/arm-security/lib/operations/settings.ts +++ b/packages/@azure/arm-security/lib/operations/settings.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/settingsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/tasks.ts b/packages/@azure/arm-security/lib/operations/tasks.ts index 0601a9e586cd..cf2414a50cfe 100644 --- a/packages/@azure/arm-security/lib/operations/tasks.ts +++ b/packages/@azure/arm-security/lib/operations/tasks.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/tasksMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/topology.ts b/packages/@azure/arm-security/lib/operations/topology.ts index 5eed9ef73698..29881ed37736 100644 --- a/packages/@azure/arm-security/lib/operations/topology.ts +++ b/packages/@azure/arm-security/lib/operations/topology.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/topologyMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-security/lib/operations/workspaceSettings.ts b/packages/@azure/arm-security/lib/operations/workspaceSettings.ts index 3edeaa7ee145..e3b2bd92e70f 100644 --- a/packages/@azure/arm-security/lib/operations/workspaceSettings.ts +++ b/packages/@azure/arm-security/lib/operations/workspaceSettings.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/workspaceSettingsMappers"; import * as Parameters from "../models/parameters"; @@ -27,7 +27,8 @@ export class WorkspaceSettings { } /** - * Settings about where we should store your security data and logs + * Settings about where we should store your security data and logs. If the result is empty, it + * means that no custom-workspace configuration was set * @param [options] The optional parameters * @returns Promise */ @@ -51,7 +52,8 @@ export class WorkspaceSettings { } /** - * Settings about where we should store your security data and logs + * Settings about where we should store your security data and logs. If the result is empty, it + * means that no custom-workspace configuration was set * @param workspaceSettingName Name of the security setting * @param [options] The optional parameters * @returns Promise @@ -172,7 +174,8 @@ export class WorkspaceSettings { } /** - * Settings about where we should store your security data and logs + * Settings about where we should store your security data and logs. If the result is empty, it + * means that no custom-workspace configuration was set * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise diff --git a/packages/@azure/arm-security/lib/securityCenter.ts b/packages/@azure/arm-security/lib/securityCenter.ts index 5a690b9c21c3..5b1f4c9ebf51 100644 --- a/packages/@azure/arm-security/lib/securityCenter.ts +++ b/packages/@azure/arm-security/lib/securityCenter.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "ms-rest-js"; +import * as msRest from "@azure/ms-rest-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; diff --git a/packages/@azure/arm-security/lib/securityCenterContext.ts b/packages/@azure/arm-security/lib/securityCenterContext.ts index 7a8c6c1b6dfb..1456da91b8ae 100644 --- a/packages/@azure/arm-security/lib/securityCenterContext.ts +++ b/packages/@azure/arm-security/lib/securityCenterContext.ts @@ -9,8 +9,8 @@ */ import * as Models from "./models"; -import * as msRest from "ms-rest-js"; -import * as msRestAzure from "ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-security"; const packageVersion = "0.1.0"; diff --git a/packages/@azure/arm-security/package.json b/packages/@azure/arm-security/package.json index 05865f123e09..f39bb5f8e730 100644 --- a/packages/@azure/arm-security/package.json +++ b/packages/@azure/arm-security/package.json @@ -4,8 +4,8 @@ "description": "SecurityCenter Library with typescript type definitions for node.js and browser.", "version": "0.1.0", "dependencies": { - "ms-rest-azure-js": "^1.0.181", - "ms-rest-js": "^1.0.460", + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", "tslib": "^1.9.3" }, "keywords": [ @@ -23,6 +23,7 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/arm-security", diff --git a/packages/@azure/arm-security/rollup.config.js b/packages/@azure/arm-security/rollup.config.js index 0ac6065927cf..43a7bd9aa064 100644 --- a/packages/@azure/arm-security/rollup.config.js +++ b/packages/@azure/arm-security/rollup.config.js @@ -1,31 +1,37 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/securityCenter.js', - external: ["ms-rest-js", "ms-rest-azure-js"], + input: "./esm/securityCenter.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-security.js", format: "umd", name: "Azure.ArmSecurity", sourcemap: true, globals: { - "ms-rest-js": "msRest", - "ms-rest-azure-js": "msRestAzure" + "@azure/ms-rest-js": "msRest", + "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* * 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. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ module: true }), + sourcemaps() ] }; + export default config; diff --git a/packages/@azure/arm-security/tsconfig.json b/packages/@azure/arm-security/tsconfig.json index f32d1664f320..51ea90961ce5 100644 --- a/packages/@azure/arm-security/tsconfig.json +++ b/packages/@azure/arm-security/tsconfig.json @@ -14,6 +14,6 @@ "outDir": "./esm", "importHelpers": true }, - "include": ["./lib/**/*"], + "include": ["./lib/**/*.ts"], "exclude": ["node_modules"] } From 22e7b453b05bf340d8e17a628fd03e16fef84b87 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 1 Feb 2019 11:04:30 -0800 Subject: [PATCH 5/5] Generated from f862d11a6a08b6c7243a79c2996690518313ac9a (#1066) Rollback readme change --- .../@azure/arm-security/lib/models/index.ts | 20 +++++++++++++++++-- .../@azure/arm-security/lib/models/mappers.ts | 7 +++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/packages/@azure/arm-security/lib/models/index.ts b/packages/@azure/arm-security/lib/models/index.ts index d8b74510e8e5..4f944c1588b3 100644 --- a/packages/@azure/arm-security/lib/models/index.ts +++ b/packages/@azure/arm-security/lib/models/index.ts @@ -614,11 +614,12 @@ export interface Alert extends Resource { */ readonly actionTaken?: string; /** - * @member {string} [reportedSeverity] Estimated severity of this alert + * @member {ReportedSeverity} [reportedSeverity] Estimated severity of this + * alert. Possible values include: 'Silent', 'Information', 'Low', 'High' * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ - readonly reportedSeverity?: string; + readonly reportedSeverity?: ReportedSeverity; /** * @member {string} [compromisedEntity] The entity that the incident happened * on @@ -651,6 +652,13 @@ export interface Alert extends Resource { * the server.** */ readonly canBeInvestigated?: boolean; + /** + * @member {boolean} [isIncident] Whether this alert is for incident type or + * not (otherwise - single alert) + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isIncident?: boolean; /** * @member {AlertEntity[]} [entities] objects that are related to this alerts */ @@ -1929,6 +1937,14 @@ export type AutoProvision = 'On' | 'Off'; */ export type SettingKind = 'DataExportSetting' | 'AlertSuppressionSetting'; +/** + * Defines values for ReportedSeverity. + * Possible values include: 'Silent', 'Information', 'Low', 'High' + * @readonly + * @enum {string} + */ +export type ReportedSeverity = 'Silent' | 'Information' | 'Low' | 'High'; + /** * Defines values for SecurityFamily. * Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' diff --git a/packages/@azure/arm-security/lib/models/mappers.ts b/packages/@azure/arm-security/lib/models/mappers.ts index c4895035268b..11e40749194e 100644 --- a/packages/@azure/arm-security/lib/models/mappers.ts +++ b/packages/@azure/arm-security/lib/models/mappers.ts @@ -780,6 +780,13 @@ export const Alert: msRest.CompositeMapper = { name: "Boolean" } }, + isIncident: { + readOnly: true, + serializedName: "properties.isIncident", + type: { + name: "Boolean" + } + }, entities: { serializedName: "properties.entities", type: {