Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/services/securityManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 12 additions & 1 deletion lib/services/securityManagement/lib/models/alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class Alert extends models['Resource'] {
* incident
* @property {string} [actionTaken] The action that was taken as a response
* to the alert (Active, Blocked etc.)
* @property {string} [reportedSeverity] Estimated severity of this alert
* @property {string} [reportedSeverity] Estimated severity of this alert.
* Possible values include: 'Silent', 'Information', 'Low', 'High'
* @property {string} [compromisedEntity] The entity that the incident
* happened on
* @property {string} [associatedResource] Azure resource ID of the
Expand All @@ -45,6 +46,8 @@ class Alert extends models['Resource'] {
* Non-Azure)
* @property {boolean} [canBeInvestigated] Whether this alert can be
* investigated with Azure Security Center
* @property {boolean} [isIncident] Whether this alert is for incident type
* or not (otherwise - single alert)
* @property {array} [entities] objects that are related to this alerts
* @property {number} [confidenceScore] level of confidence we have on the
* alert
Expand Down Expand Up @@ -225,6 +228,14 @@ class Alert extends models['Resource'] {
name: 'Boolean'
}
},
isIncident: {
required: false,
readOnly: true,
serializedName: 'properties.isIncident',
type: {
name: 'Boolean'
}
},
entities: {
required: false,
serializedName: 'properties.entities',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ class DataExportSetting extends models['Setting'] {
serializedName: 'DataExportSetting',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'kind',
clientName: 'kind'
},
uberParent: 'Setting',
className: 'DataExportSetting',
modelProperties: {
id: {
Expand Down Expand Up @@ -72,7 +67,6 @@ class DataExportSetting extends models['Setting'] {
kind: {
required: true,
serializedName: 'kind',
isPolymorphicDiscriminator: true,
type: {
name: 'String'
}
Expand Down
42 changes: 16 additions & 26 deletions lib/services/securityManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,45 +147,30 @@ export interface AdvancedThreatProtectionSetting extends Resource {
}

/**
* Represents a security setting in Azure Security Center.
* The kind of the security setting
*/
export interface Setting {
/**
* Resource Id
*/
readonly id?: string;
export interface SettingResource extends Resource {
/**
* Resource name
*/
readonly name?: string;
/**
* Resource type
*/
readonly type?: string;
/**
* Polymorphic Discriminator
* the kind of the settings string (DataExportSetting). Possible values include:
* 'DataExportSetting', 'AlertSuppressionSetting'
*/
kind: string;
}

/**
* Represents a data export setting
* Represents a security setting in Azure Security Center.
*/
export interface DataExportSetting extends Setting {
/**
* Is the data export setting is enabled
*/
enabled: boolean;
export interface Setting extends SettingResource {
}

/**
* The kind of the security setting
* Represents a data export setting
*/
export interface SettingKind1 {
export interface DataExportSetting extends Setting {
/**
* the kind of the settings string. Possible values include: 'DataExportSetting'
* Is the data export setting is enabled
*/
kind?: string;
enabled: boolean;
}

/**
Expand Down Expand Up @@ -436,7 +421,8 @@ export interface Alert extends Resource {
*/
readonly actionTaken?: string;
/**
* Estimated severity of this alert
* Estimated severity of this alert. Possible values include: 'Silent', 'Information', 'Low',
* 'High'
*/
readonly reportedSeverity?: string;
/**
Expand All @@ -456,6 +442,10 @@ export interface Alert extends Resource {
* Whether this alert can be investigated with Azure Security Center
*/
readonly canBeInvestigated?: boolean;
/**
* Whether this alert is for incident type or not (otherwise - single alert)
*/
readonly isIncident?: boolean;
/**
* objects that are related to this alerts
*/
Expand Down
4 changes: 1 addition & 3 deletions lib/services/securityManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ exports.AutoProvisioningSetting = require('./autoProvisioningSetting');
exports.ComplianceSegment = require('./complianceSegment');
exports.Compliance = require('./compliance');
exports.AdvancedThreatProtectionSetting = require('./advancedThreatProtectionSetting');
exports.SettingResource = require('./settingResource');
exports.Setting = require('./setting');
exports.DataExportSetting = require('./dataExportSetting');
exports.SettingKind1 = require('./settingKind1');
exports.SensitivityLabel = require('./sensitivityLabel');
exports.InformationProtectionKeyword = require('./informationProtectionKeyword');
exports.InformationType = require('./informationType');
Expand Down Expand Up @@ -88,8 +88,6 @@ exports.ExternalSecuritySolutionList = require('./externalSecuritySolutionList')
exports.TopologyList = require('./topologyList');
exports.AllowedConnectionsList = require('./allowedConnectionsList');
exports.discriminators = {
'Setting' : exports.Setting,
'Setting.DataExportSetting' : exports.DataExportSetting,
'ExternalSecuritySolution' : exports.ExternalSecuritySolution,
'ExternalSecuritySolution.CEF' : exports.CefExternalSecuritySolution,
'ExternalSecuritySolution.ATA' : exports.AtaExternalSecuritySolution,
Expand Down
16 changes: 5 additions & 11 deletions lib/services/securityManagement/lib/models/setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@

'use strict';

const models = require('./index');

/**
* Represents a security setting in Azure Security Center.
*
* @extends models['SettingResource']
*/
class Setting {
class Setting extends models['SettingResource'] {
/**
* Create a Setting.
* @property {string} [id] Resource Id
* @property {string} [name] Resource name
* @property {string} [type] Resource type
* @property {string} kind Polymorphic Discriminator
*/
constructor() {
super();
}

/**
Expand All @@ -37,11 +37,6 @@ class Setting {
serializedName: 'Setting',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'kind',
clientName: 'kind'
},
uberParent: 'Setting',
className: 'Setting',
modelProperties: {
id: {
Expand Down Expand Up @@ -71,7 +66,6 @@ class Setting {
kind: {
required: true,
serializedName: 'kind',
isPolymorphicDiscriminator: true,
type: {
name: 'String'
}
Expand Down
82 changes: 82 additions & 0 deletions lib/services/securityManagement/lib/models/settingResource.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* 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.
*/

'use strict';

const models = require('./index');

/**
* The kind of the security setting
*
* @extends models['Resource']
*/
class SettingResource extends models['Resource'] {
/**
* Create a SettingResource.
* @property {string} kind the kind of the settings string
* (DataExportSetting). Possible values include: 'DataExportSetting',
* 'AlertSuppressionSetting'
*/
constructor() {
super();
}

/**
* Defines the metadata of SettingResource
*
* @returns {object} metadata of SettingResource
*
*/
mapper() {
return {
required: false,
serializedName: 'SettingResource',
type: {
name: 'Composite',
className: 'SettingResource',
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
kind: {
required: true,
serializedName: 'kind',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = SettingResource;
5 changes: 0 additions & 5 deletions lib/services/securityManagement/lib/models/settingsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ class SettingsList extends Array {
serializedName: 'SettingElementType',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'kind',
clientName: 'kind'
},
uberParent: 'Setting',
className: 'Setting'
}
}
Expand Down
Loading