# EventMessage

Represents an envelope and the data of an event

## Example Usage

```typescript
import { EventMessage } from "@apexfintechsolutions/ascend-sdk/models/components";

let value: EventMessage = {};
```

## Fields

| Field                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Required                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountGroupId`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | The account group ID related to the event (if applicable)                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | 01K39XRPBX5F1WXAZBZ6ZZBQNN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `accountId`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | The account ID related to the event (if applicable)                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | 01H8MCDXH4JVH7KVNB2YY42907                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `clientId`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | The client ID related to the event                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | 01H8MCDXH46S326ME71QM58A91                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `correspondentId`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | The correspondent ID related to the event (if applicable)                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | 01H8MCDXH4HYJJAV921BDKCC83                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `data`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Record<string, *any*>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | A data payload containing the fields specific to the type of event being sent                                                                                                                                                                                                                                                                                                                                                                                                                                             | {<br/>"account_id": "01H8MCDXH4JVH7KVNB2YY42907",<br/>"adjusted_settled": {<br/>"value": "0"<br/>},<br/>"adjusted_trade": {<br/>"value": "1.5"<br/>},<br/>"asset_id": "12345",<br/>"date": {<br/>"day": 13,<br/>"month": 6,<br/>"year": 2023<br/>},<br/>"fpsl": {<br/>"value": "0"<br/>},<br/>"free": {<br/>"value": "0"<br/>},<br/>"last_adjusted_date": {<br/>"day": 13,<br/>"month": 6,<br/>"year": 2023<br/>},<br/>"name": "accounts/01H8MCDXH4JVH7KVNB2YY42907/positions/12345",<br/>"pending_outgoing_acat": {<br/>"value": "0"<br/>},<br/>"settled": {<br/>"value": "0"<br/>},<br/>"trade": {<br/>"value": "1.5"<br/>},<br/>"unrestricted": {<br/>"value": "0"<br/>}<br/>} |
| `eventType`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Specifies the action that triggered the event as well as what resource changed                                                                                                                                                                                                                                                                                                                                                                                                                                            | position.v1.updated                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `messageId`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | A unique identifier for the event                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | 01H8MCDXH3ZXXMAA3918GRCFVE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `name`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | The resource name of the event; Format: messages/{message}                                                                                                                                                                                                                                                                                                                                                                                                                                                                | messages/01H8MCDXH3ZXXMAA3918GRCFVE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `partitionKey`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | *string*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | A value, if present, is used to group related events together; Events with the same partition key are guaranteed to be sent to the consumer in the same order they were published                                                                                                                                                                                                                                                                                                                                         | 01H8MCDXH4JVH7KVNB2YY42907:12345                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `publishTime`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)                                                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | The date and time of the event publication (not necessarily the time the event occurred)                                                                                                                                                                                                                                                                                                                                                                                                                                  | 2023-06-13 23:48:58.343 +0000 UTC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |