Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR] security/resource-manager #582

Closed
wants to merge 6 commits into from
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 packages/@azure/arm-security/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
8 changes: 4 additions & 4 deletions packages/@azure/arm-security/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for SecurityCenter.

### How to Install

```
```bash
npm install @azure/arm-security
```

Expand All @@ -19,13 +19,13 @@ npm install @azure/arm-security

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

```
```bash
npm install @azure/ms-rest-nodeauth
```

##### Sample code

```ts
```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";
Expand All @@ -47,7 +47,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {

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

```
```bash
npm install @azure/ms-rest-browserauth
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export {
AutoProvisioningSetting,
Compliance,
ComplianceSegment,
SettingResource,
InformationProtectionPolicy,
SensitivityLabel,
InformationType,
Expand All @@ -29,6 +30,8 @@ export {
AscLocation,
Alert,
AlertEntity,
AlertConfidenceReason
AlertConfidenceReason,
Setting,
DataExportSetting
} from "../models/mappers";

5 changes: 4 additions & 1 deletion packages/@azure/arm-security/lib/models/alertsMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ export {
Compliance,
ComplianceSegment,
AdvancedThreatProtectionSetting,
SettingResource,
InformationProtectionPolicy,
SensitivityLabel,
InformationType,
InformationProtectionKeyword,
SecurityTask,
SecurityTaskParameters,
AscLocation
AscLocation,
Setting,
DataExportSetting
} from "../models/mappers";

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export {
Compliance,
ComplianceSegment,
AdvancedThreatProtectionSetting,
SettingResource,
InformationProtectionPolicy,
SensitivityLabel,
InformationType,
Expand All @@ -30,6 +31,8 @@ export {
AscLocation,
Alert,
AlertEntity,
AlertConfidenceReason
AlertConfidenceReason,
Setting,
DataExportSetting
} from "../models/mappers";

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export {
WorkspaceSetting,
AutoProvisioningSetting,
AdvancedThreatProtectionSetting,
SettingResource,
InformationProtectionPolicy,
SensitivityLabel,
InformationType,
Expand All @@ -30,6 +31,8 @@ export {
AscLocation,
Alert,
AlertEntity,
AlertConfidenceReason
AlertConfidenceReason,
Setting,
DataExportSetting
} from "../models/mappers";

119 changes: 45 additions & 74 deletions packages/@azure/arm-security/lib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,90 +205,45 @@ 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 {
}

/**
* @interface
* 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.
Expand Down Expand Up @@ -659,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
Expand Down Expand Up @@ -696,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
*/
Expand Down Expand Up @@ -1148,8 +1111,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 {
Expand Down Expand Up @@ -1771,9 +1734,9 @@ export interface ComplianceList extends Array<Compliance> {
* An interface representing the SettingsList.
* Subscription settings list.
*
* @extends Array<SettingUnion>
* @extends Array<Setting>
*/
export interface SettingsList extends Array<SettingUnion> {
export interface SettingsList extends Array<Setting> {
/**
* @member {string} [nextLink] The URI to fetch the next page.
* **NOTE: This property will not be serialized. It can only be populated by
Expand Down Expand Up @@ -1968,11 +1931,19 @@ 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' | 'AlertSuppressionSetting';

/**
* Defines values for ReportedSeverity.
* Possible values include: 'Silent', 'Information', 'Low', 'High'
* @readonly
* @enum {string}
*/
export type SettingKind = 'DataExportSetting';
export type ReportedSeverity = 'Silent' | 'Information' | 'Low' | 'High';

/**
* Defines values for SecurityFamily.
Expand Down Expand Up @@ -2629,7 +2600,7 @@ export type SettingsListResponse = SettingsList & {
/**
* Contains response data for the get operation.
*/
export type SettingsGetResponse = SettingUnion & {
export type SettingsGetResponse = Setting & {
/**
* The underlying HTTP response.
*/
Expand All @@ -2641,14 +2612,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.
*/
Expand All @@ -2660,7 +2631,7 @@ export type SettingsUpdateResponse = SettingUnion & {
/**
* The response body as parsed JSON or XML
*/
parsedBody: SettingUnion;
parsedBody: Setting;
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ export {
Compliance,
ComplianceSegment,
AdvancedThreatProtectionSetting,
SettingResource,
SecurityTask,
SecurityTaskParameters,
AscLocation,
Alert,
AlertEntity,
AlertConfidenceReason
AlertConfidenceReason,
Setting,
DataExportSetting
} from "../models/mappers";

5 changes: 4 additions & 1 deletion packages/@azure/arm-security/lib/models/locationsMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export {
Compliance,
ComplianceSegment,
AdvancedThreatProtectionSetting,
SettingResource,
InformationProtectionPolicy,
SensitivityLabel,
InformationType,
Expand All @@ -30,6 +31,8 @@ export {
SecurityTaskParameters,
Alert,
AlertEntity,
AlertConfidenceReason
AlertConfidenceReason,
Setting,
DataExportSetting
} from "../models/mappers";

Loading