0.9.0 (latest) 0.8.0 0.7.2 0.5.0 0.4.0 0.3.0 0.2.3 0.1.2 Reference documentation and code samples for the Google Cloud Chronicle Client class Collection.

Collection represents a container of objects (such as events, entity
context metadata, detection finding metadata) and state (such as
investigation details).

An example use case for Collection is to model a detection and investigation
from detection finding metadata to investigative state collected in the
course of the investigation. For more complex investigation and response
workflows a Collection could represent an incident consisting of multiple
child findings or incidents. This can be expanded on to model remediation
elements of a full detection and response workflow.

Generated from protobuf message `google.backstory.Collection`

## Namespace

Google \\ Backstory

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ id` | `string` Unique ID for the collection. The ID is specific to the type of collection. For example, with rule detections this is the detection ID. |
| `↳ type` | `int` What the collection represents. |
| `↳ id_namespace` | `int` The ID namespace used for the Collection. |
| `↳ created_time` | `Google\Protobuf\Timestamp` Time the collection was created. |
| `↳ last_updated_time` | `Google\Protobuf\Timestamp` Time the collection was last updated. |
| `↳ time_window` | `Google\Type\Interval` Time interval that the collection represents. |
| `↳ collection_elements` | `array<Element>` Constituent elements of the collection. Each element shares an association that groups it together and is a component of the overall collection. For example, a detection collection may have several constituent elements that each share a correlation association that together represent a particular pattern or behavior. |
| `↳ detection` | `array<SecurityResult>` Detection metadata for findings that represent detections, can include rule details, machine learning model metadata, and indicators implicated in the detection (using the .about field). |
| `↳ detection_time` | `Google\Protobuf\Timestamp` Timestamp within the time_window related to the time of the collection_elements. For Rule Detections, this timestamp is the end of the the time_window for multi-event rules or the time of the event for single event rules. For late-arriving events that trigger new alerts, the detection_time will be the event time of the event. |
| `↳ investigation` | `Investigation` Consolidated investigation details (categorization, status, etc) typically for collections that begin as detection findings and then evolve with analyst action and feedback into investigations around the detection output. |
| `↳ tags` | `string[]` Tags set by UC/DSML/RE for the Finding during creation. |
| `↳ response_platform_info` | `ResponsePlatformInfo` Alert related info of this same alert in customer's SOAR platform. |
| `↳ case_name` | `string` The resource name of the Case that this collection belongs to. Example: projects/{project id}/locations/{region}/chronicle/cases/{internal_case_id} |
| `↳ soar_alert` | `bool` A boolean field indicating that the alert is present in SOAR. |
| `↳ soar_alert_metadata` | `SoarAlertMetadata` Metadata fields of alerts coming from other SIEM systems via SOAR. |
| `↳ data_access_scope` | `string` The resource name of the DataAccessScope of this collection. |
| `↳ detection_timing_details` | `int[]` Detection timing details for the collection. These details are used to determine prossible causes of latency for the detection. This field is only set for detections that are generated by rules. |
| `↳ latency_metrics` | `LatencyMetrics` The latency metrics for the specific detection. These metrics are calculated from ALL of the events that contribute to the detection, not just the sampled ones. |
| `↳ rule_run_frequency` | `int` The run frequency of the rule when it generated the detection. |
| `↳ simulated_event_count` | `int|string` The total number of simulated events that contributed to this detection. Simulated events are realistic threat sequences (Raw Logs or UDM) programmatically delivered into the production ingestion pipeline to verify the entire detection lifecycle---from identification to action. |
| `↳ simulated_event_names` | `string[]` The set of all values from event ingestion_labels where SIMULATED is set as the key, for all simulated events that participated in this detection. |

### getId

Unique ID for the collection.

The ID is specific to the type of collection. For example, with rule
detections this is the detection ID.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setId

Unique ID for the collection.

The ID is specific to the type of collection. For example, with rule
detections this is the detection ID.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getType

What the collection represents.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [CollectionType](https://docs.cloud.google.com/php/docs/reference/cloud-chronicle/latest/Backstory.Collection.CollectionType.md.txt). |

### setType

What the collection represents.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [CollectionType](https://docs.cloud.google.com/php/docs/reference/cloud-chronicle/latest/Backstory.Collection.CollectionType.md.txt). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getIdNamespace

The ID namespace used for the Collection.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Namespace](https://docs.cloud.google.com/php/docs/reference/cloud-chronicle/latest/Backstory.Id.PBNamespace.md.txt). |

### setIdNamespace

The ID namespace used for the Collection.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Namespace](https://docs.cloud.google.com/php/docs/reference/cloud-chronicle/latest/Backstory.Id.PBNamespace.md.txt). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreatedTime

Time the collection was created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasCreatedTime

### clearCreatedTime

### setCreatedTime

Time the collection was created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLastUpdatedTime

Time the collection was last updated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasLastUpdatedTime

### clearLastUpdatedTime

### setLastUpdatedTime

Time the collection was last updated.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTimeWindow

Time interval that the collection represents.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Type\Interval|null` |   |

### hasTimeWindow

### clearTimeWindow

### setTimeWindow

Time interval that the collection represents.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Type\Interval` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCollectionElements

Constituent elements of the collection. Each element shares an association
that groups it together and is a component of the overall collection. For
example, a detection collection may have several constituent elements that
each share a correlation association that together represent a particular
pattern or behavior.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<Element>` |   |

### setCollectionElements

Constituent elements of the collection. Each element shares an association
that groups it together and is a component of the overall collection. For
example, a detection collection may have several constituent elements that
each share a correlation association that together represent a particular
pattern or behavior.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<Element>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDetection

Detection metadata for findings that represent detections, can include
rule details, machine learning model metadata, and indicators implicated
in the detection (using the .about field).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<SecurityResult>` |   |

### setDetection

Detection metadata for findings that represent detections, can include
rule details, machine learning model metadata, and indicators implicated
in the detection (using the .about field).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<SecurityResult>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDetectionTime

Timestamp within the time_window related to the time of the
collection_elements. For Rule Detections, this timestamp is the end of the
the time_window for multi-event rules or the time of the event for single
event rules. For late-arriving events that trigger new alerts, the
detection_time will be the event time of the event.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasDetectionTime

### clearDetectionTime

### setDetectionTime

Timestamp within the time_window related to the time of the
collection_elements. For Rule Detections, this timestamp is the end of the
the time_window for multi-event rules or the time of the event for single
event rules. For late-arriving events that trigger new alerts, the
detection_time will be the event time of the event.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getInvestigation

Consolidated investigation details (categorization, status, etc) typically
for collections that begin as detection findings and then evolve with
analyst action and feedback into investigations around the detection
output.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Investigation|null` |   |

### hasInvestigation

### clearInvestigation

### setInvestigation

Consolidated investigation details (categorization, status, etc) typically
for collections that begin as detection findings and then evolve with
analyst action and feedback into investigations around the detection
output.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Investigation` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTags

Tags set by UC/DSML/RE for the Finding during creation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setTags

Tags set by UC/DSML/RE for the Finding during creation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getResponsePlatformInfo

Alert related info of this same alert in customer's SOAR platform.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ResponsePlatformInfo|null` |   |

### hasResponsePlatformInfo

### clearResponsePlatformInfo

### setResponsePlatformInfo

Alert related info of this same alert in customer's SOAR platform.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `ResponsePlatformInfo` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCaseName

The resource name of the Case that this collection belongs to.

Example:
projects/{project id}/locations/{region}/chronicle/cases/{internal_case_id}

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setCaseName

The resource name of the Case that this collection belongs to.

Example:
projects/{project id}/locations/{region}/chronicle/cases/{internal_case_id}

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSoarAlert

A boolean field indicating that the alert is present in SOAR.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setSoarAlert

A boolean field indicating that the alert is present in SOAR.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSoarAlertMetadata

Metadata fields of alerts coming from other SIEM systems via SOAR.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `SoarAlertMetadata|null` |   |

### hasSoarAlertMetadata

### clearSoarAlertMetadata

### setSoarAlertMetadata

Metadata fields of alerts coming from other SIEM systems via SOAR.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `SoarAlertMetadata` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDataAccessScope

The resource name of the DataAccessScope of this collection.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDataAccessScope

The resource name of the DataAccessScope of this collection.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDetectionTimingDetails

Detection timing details for the collection. These details are used to
determine prossible causes of latency for the detection.

This field is only set for detections that are generated by rules.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<int>` |   |

### setDetectionTimingDetails

Detection timing details for the collection. These details are used to
determine prossible causes of latency for the detection.

This field is only set for detections that are generated by rules.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLatencyMetrics

The latency metrics for the specific detection. These metrics are
calculated from ALL of the events that contribute to the detection, not
just the sampled ones.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `LatencyMetrics|null` |   |

### hasLatencyMetrics

### clearLatencyMetrics

### setLatencyMetrics

The latency metrics for the specific detection. These metrics are
calculated from ALL of the events that contribute to the detection, not
just the sampled ones.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `LatencyMetrics` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRuleRunFrequency

The run frequency of the rule when it generated the detection.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [RunFrequency](https://docs.cloud.google.com/php/docs/reference/cloud-chronicle/latest/Backstory.Collection.RunFrequency.md.txt). |

### setRuleRunFrequency

The run frequency of the rule when it generated the detection.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [RunFrequency](https://docs.cloud.google.com/php/docs/reference/cloud-chronicle/latest/Backstory.Collection.RunFrequency.md.txt). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSimulatedEventCount

The total number of simulated events that contributed to this detection.

Simulated events are realistic threat sequences (Raw Logs or UDM)
programmatically delivered into the production ingestion pipeline to verify
the entire detection lifecycle---from identification to action.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setSimulatedEventCount

The total number of simulated events that contributed to this detection.

Simulated events are realistic threat sequences (Raw Logs or UDM)
programmatically delivered into the production ingestion pipeline to verify
the entire detection lifecycle---from identification to action.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSimulatedEventNames

The set of all values from event ingestion_labels where SIMULATED is set as
the key, for all simulated events that participated in this detection.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setSimulatedEventNames

The set of all values from event ingestion_labels where SIMULATED is set as
the key, for all simulated events that participated in this detection.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |