Skip to content

Commit

Permalink
CodeGen from PR 20391 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 07c5cc8b6e69c847e0d7696953eac629a273d50f into 6b08774c89877269e73e11ac3ecbd1bd4e14f5a0
  • Loading branch information
SDKAuto committed Aug 29, 2022
1 parent 480e82c commit ac5c609
Show file tree
Hide file tree
Showing 14 changed files with 1,318 additions and 95 deletions.
45 changes: 35 additions & 10 deletions sdk/securityinsight/arm-securityinsight/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
# Release History

## 1.0.0-beta.5 (2022-08-29)

**Features**

## 1.0.0-beta.5 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Added operation group FileImports
- Added Interface FileImport
- Added Interface FileImportList
- Added Interface FileImportsCreateOptionalParams
- Added Interface FileImportsDeleteOptionalParams
- Added Interface FileImportsGetOptionalParams
- Added Interface FileImportsListNextOptionalParams
- Added Interface FileImportsListOptionalParams
- Added Interface FileMetadata
- Added Interface ValidationError
- Added Type Alias DeleteStatus
- Added Type Alias FileFormat
- Added Type Alias FileImportContentType
- Added Type Alias FileImportsCreateResponse
- Added Type Alias FileImportsDeleteResponse
- Added Type Alias FileImportsGetResponse
- Added Type Alias FileImportsListNextResponse
- Added Type Alias FileImportsListResponse
- Added Type Alias FileImportState
- Added Type Alias IngestionMode
- Interface NrtAlertRule has a new optional parameter eventGroupingSettings
- Interface NrtAlertRuleTemplate has a new optional parameter eventGroupingSettings
- Interface QueryBasedAlertRuleTemplateProperties has a new optional parameter eventGroupingSettings
- Class SecurityInsights has a new parameter fileImports
- Added Enum KnownDeleteStatus
- Added Enum KnownFileFormat
- Added Enum KnownFileImportContentType
- Added Enum KnownFileImportState
- Added Enum KnownIngestionMode


## 1.0.0-beta.4 (2022-07-11)

**Features**
Expand Down
8 changes: 4 additions & 4 deletions sdk/securityinsight/arm-securityinsight/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "64496bd64b0376dc4b45e3193a39f7bcdd4b28da",
"commit": "58a401347d81064ca84529643260e2ce1d7fba13",
"readme": "specification/securityinsights/resource-manager/readme.md",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\securityinsights\\resource-manager\\readme.md --use=@autorest/[email protected].20220707.1 --generate-sample=true",
"autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/securityinsights/resource-manager/readme.md --use=@autorest/[email protected]",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/[email protected].0",
"use": "@autorest/[email protected].20220707.1"
"release_tool": "@azure-tools/[email protected].2",
"use": "@autorest/[email protected]"
}
14 changes: 4 additions & 10 deletions sdk/securityinsight/arm-securityinsight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"node": ">=12.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.2.0",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.5.0",
"@azure/core-auth": "^1.3.0",
Expand Down Expand Up @@ -107,13 +109,5 @@
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-securityinsight?view=azure-node-preview"
}
}
"autoPublish": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import * as coreAuth from '@azure/core-auth';
import * as coreClient from '@azure/core-client';
import { PagedAsyncIterableIterator } from '@azure/core-paging';
import { PollerLike } from '@azure/core-lro';
import { PollOperationState } from '@azure/core-lro';

// @public
export interface AADCheckRequirements extends DataConnectorsCheckRequirements {
Expand Down Expand Up @@ -1175,6 +1177,9 @@ export interface DataTypeDefinitions {
// @public
export type DataTypeState = string;

// @public
export type DeleteStatus = string;

// @public
export type DeliveryAction = "Unknown" | "DeliveredAsSpam" | "Delivered" | "Blocked" | "Replaced";

Expand Down Expand Up @@ -1773,6 +1778,9 @@ export interface FileEntityProperties extends EntityCommonProperties {
readonly hostEntityId?: string;
}

// @public
export type FileFormat = string;

// @public
export type FileHashAlgorithm = string;

Expand All @@ -1792,6 +1800,98 @@ export interface FileHashEntityProperties extends EntityCommonProperties {
readonly hashValue?: string;
}

// @public
export interface FileImport extends Resource {
contentType?: FileImportContentType;
readonly createdTimeUTC?: Date;
readonly errorFile?: FileMetadata;
readonly errorsPreview?: ValidationError[];
readonly filesValidUntilTimeUTC?: Date;
importFile?: FileMetadata;
readonly importValidUntilTimeUTC?: Date;
readonly ingestedRecordCount?: number;
ingestionMode?: IngestionMode;
source?: string;
readonly state?: FileImportState;
readonly totalRecordCount?: number;
readonly validRecordCount?: number;
}

// @public
export type FileImportContentType = string;

// @public
export interface FileImportList {
readonly nextLink?: string;
value: FileImport[];
}

// @public
export interface FileImports {
beginDelete(resourceGroupName: string, workspaceName: string, fileImportId: string, options?: FileImportsDeleteOptionalParams): Promise<PollerLike<PollOperationState<FileImportsDeleteResponse>, FileImportsDeleteResponse>>;
beginDeleteAndWait(resourceGroupName: string, workspaceName: string, fileImportId: string, options?: FileImportsDeleteOptionalParams): Promise<FileImportsDeleteResponse>;
create(resourceGroupName: string, workspaceName: string, fileImportId: string, fileImport: FileImport, options?: FileImportsCreateOptionalParams): Promise<FileImportsCreateResponse>;
get(resourceGroupName: string, workspaceName: string, fileImportId: string, options?: FileImportsGetOptionalParams): Promise<FileImportsGetResponse>;
list(resourceGroupName: string, workspaceName: string, options?: FileImportsListOptionalParams): PagedAsyncIterableIterator<FileImport>;
}

// @public
export interface FileImportsCreateOptionalParams extends coreClient.OperationOptions {
}

// @public
export type FileImportsCreateResponse = FileImport;

// @public
export interface FileImportsDeleteOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
updateIntervalInMs?: number;
}

// @public
export type FileImportsDeleteResponse = FileImport;

// @public
export interface FileImportsGetOptionalParams extends coreClient.OperationOptions {
}

// @public
export type FileImportsGetResponse = FileImport;

// @public
export interface FileImportsListNextOptionalParams extends coreClient.OperationOptions {
filter?: string;
orderby?: string;
skipToken?: string;
top?: number;
}

// @public
export type FileImportsListNextResponse = FileImportList;

// @public
export interface FileImportsListOptionalParams extends coreClient.OperationOptions {
filter?: string;
orderby?: string;
skipToken?: string;
top?: number;
}

// @public
export type FileImportsListResponse = FileImportList;

// @public
export type FileImportState = string;

// @public
export interface FileMetadata {
readonly deleteStatus?: DeleteStatus;
readonly fileContentUri?: string;
fileFormat?: FileFormat;
fileName?: string;
fileSize?: number;
}

// @public
export interface FusionAlertRule extends AlertRule {
alertRuleTemplateName?: string;
Expand Down Expand Up @@ -2310,6 +2410,9 @@ export type IncidentsRunPlaybookResponse = Record<string, unknown>;
// @public
export type IncidentStatus = string;

// @public
export type IngestionMode = string;

// @public
export interface InsightQueryItem extends EntityQueryItem {
kind: "Insight";
Expand Down Expand Up @@ -2777,6 +2880,13 @@ export enum KnownDataTypeState {
Enabled = "Enabled"
}

// @public
export enum KnownDeleteStatus {
Deleted = "Deleted",
NotDeleted = "NotDeleted",
Unspecified = "Unspecified"
}

// @public
export enum KnownDeploymentFetchStatus {
NotFound = "NotFound",
Expand Down Expand Up @@ -2924,6 +3034,13 @@ export enum KnownEventGroupingAggregationKind {
SingleAlert = "SingleAlert"
}

// @public
export enum KnownFileFormat {
CSV = "CSV",
Json = "JSON",
Unspecified = "Unspecified"
}

// @public
export enum KnownFileHashAlgorithm {
MD5 = "MD5",
Expand All @@ -2933,6 +3050,24 @@ export enum KnownFileHashAlgorithm {
Unknown = "Unknown"
}

// @public
export enum KnownFileImportContentType {
BasicIndicator = "BasicIndicator",
StixIndicator = "StixIndicator",
Unspecified = "Unspecified"
}

// @public
export enum KnownFileImportState {
FatalError = "FatalError",
Ingested = "Ingested",
IngestedWithErrors = "IngestedWithErrors",
InProgress = "InProgress",
Invalid = "Invalid",
Unspecified = "Unspecified",
WaitingForUpload = "WaitingForUpload"
}

// @public
export enum KnownGetInsightsError {
Insight = "Insight"
Expand Down Expand Up @@ -2975,6 +3110,13 @@ export enum KnownIncidentStatus {
New = "New"
}

// @public
export enum KnownIngestionMode {
IngestAnyValidRecords = "IngestAnyValidRecords",
IngestOnlyIfAllAreValid = "IngestOnlyIfAllAreValid",
Unspecified = "Unspecified"
}

// @public
export enum KnownKillChainIntent {
Collection = "Collection",
Expand Down Expand Up @@ -3737,6 +3879,7 @@ export interface NrtAlertRule extends AlertRule {
displayName?: string;
enabled?: boolean;
entityMappings?: EntityMapping[];
eventGroupingSettings?: EventGroupingSettings;
incidentConfiguration?: IncidentConfiguration;
readonly lastModifiedUtc?: Date;
query?: string;
Expand All @@ -3759,6 +3902,7 @@ export interface NrtAlertRuleTemplate extends AlertRuleTemplate {
description?: string;
displayName?: string;
entityMappings?: EntityMapping[];
eventGroupingSettings?: EventGroupingSettings;
readonly lastUpdatedDateUTC?: Date;
query?: string;
requiredDataConnectors?: AlertRuleTemplateDataSource[];
Expand Down Expand Up @@ -4121,6 +4265,7 @@ export interface QueryBasedAlertRuleTemplateProperties {
[propertyName: string]: string;
};
entityMappings?: EntityMapping[];
eventGroupingSettings?: EventGroupingSettings;
query?: string;
severity?: AlertSeverity;
version?: string;
Expand Down Expand Up @@ -4474,6 +4619,8 @@ export class SecurityInsights extends coreClient.ServiceClient {
// (undocumented)
entityRelations: EntityRelations;
// (undocumented)
fileImports: FileImports;
// (undocumented)
incidentComments: IncidentComments;
// (undocumented)
incidentRelations: IncidentRelations;
Expand Down Expand Up @@ -5253,6 +5400,12 @@ export interface UserInfo {
objectId?: string;
}

// @public
export interface ValidationError {
readonly errorMessages?: string[];
recordIndex?: number;
}

// @public
export type Version = string;

Expand Down
34 changes: 34 additions & 0 deletions sdk/securityinsight/arm-securityinsight/src/lroImpl.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

import { LongRunningOperation, LroResponse } from "@azure/core-lro";

export class LroImpl<T> implements LongRunningOperation<T> {
constructor(
private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
private args: Record<string, unknown>,
private spec: {
readonly requestBody?: unknown;
readonly path?: string;
readonly httpMethod: string;
} & Record<string, any>,
public requestPath: string = spec.path!,
public requestMethod: string = spec.httpMethod
) {}
public async sendInitialRequest(): Promise<LroResponse<T>> {
return this.sendOperationFn(this.args, this.spec);
}
public async sendPollRequest(path: string): Promise<LroResponse<T>> {
const { requestBody, ...restSpec } = this.spec;
return this.sendOperationFn(this.args, {
...restSpec,
path,
httpMethod: "GET"
});
}
}
Loading

0 comments on commit ac5c609

Please sign in to comment.