Skip to content

Commit

Permalink
Add highestIntegrity
Browse files Browse the repository at this point in the history
  • Loading branch information
hupe1980 committed Jun 29, 2022
1 parent 2ef160a commit 172233a
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
44 changes: 44 additions & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ Any object.
| <code><a href="#cdktg.plus_aws.ApplicationLoadBalancer.property.customDevelopedParts">customDevelopedParts</a></code> | <code>boolean</code> | *No description.* |
| <code><a href="#cdktg.plus_aws.ApplicationLoadBalancer.property.encryption">encryption</a></code> | <code><a href="#cdktg.Encryption">Encryption</a></code> | *No description.* |
| <code><a href="#cdktg.plus_aws.ApplicationLoadBalancer.property.highestAvailability">highestAvailability</a></code> | <code><a href="#cdktg.Availability">Availability</a></code> | *No description.* |
| <code><a href="#cdktg.plus_aws.ApplicationLoadBalancer.property.highestIntegrity">highestIntegrity</a></code> | <code><a href="#cdktg.Integrity">Integrity</a></code> | *No description.* |
| <code><a href="#cdktg.plus_aws.ApplicationLoadBalancer.property.humanUse">humanUse</a></code> | <code>boolean</code> | *No description.* |
| <code><a href="#cdktg.plus_aws.ApplicationLoadBalancer.property.internet">internet</a></code> | <code>boolean</code> | *No description.* |
| <code><a href="#cdktg.plus_aws.ApplicationLoadBalancer.property.machine">machine</a></code> | <code><a href="#cdktg.Machine">Machine</a></code> | *No description.* |
Expand Down Expand Up @@ -277,6 +278,16 @@ public readonly highestAvailability: Availability;

---

##### `highestIntegrity`<sup>Required</sup> <a name="highestIntegrity" id="cdktg.plus_aws.ApplicationLoadBalancer.property.highestIntegrity"></a>

```typescript
public readonly highestIntegrity: Integrity;
```

- *Type:* <a href="#cdktg.Integrity">Integrity</a>

---

##### `humanUse`<sup>Required</sup> <a name="humanUse" id="cdktg.plus_aws.ApplicationLoadBalancer.property.humanUse"></a>

```typescript
Expand Down Expand Up @@ -594,6 +605,7 @@ Any object.
| <code><a href="#cdktg.plus.Browser.property.customDevelopedParts">customDevelopedParts</a></code> | <code>boolean</code> | *No description.* |
| <code><a href="#cdktg.plus.Browser.property.encryption">encryption</a></code> | <code><a href="#cdktg.Encryption">Encryption</a></code> | *No description.* |
| <code><a href="#cdktg.plus.Browser.property.highestAvailability">highestAvailability</a></code> | <code><a href="#cdktg.Availability">Availability</a></code> | *No description.* |
| <code><a href="#cdktg.plus.Browser.property.highestIntegrity">highestIntegrity</a></code> | <code><a href="#cdktg.Integrity">Integrity</a></code> | *No description.* |
| <code><a href="#cdktg.plus.Browser.property.humanUse">humanUse</a></code> | <code>boolean</code> | *No description.* |
| <code><a href="#cdktg.plus.Browser.property.internet">internet</a></code> | <code>boolean</code> | *No description.* |
| <code><a href="#cdktg.plus.Browser.property.machine">machine</a></code> | <code><a href="#cdktg.Machine">Machine</a></code> | *No description.* |
Expand Down Expand Up @@ -692,6 +704,16 @@ public readonly highestAvailability: Availability;

---

##### `highestIntegrity`<sup>Required</sup> <a name="highestIntegrity" id="cdktg.plus.Browser.property.highestIntegrity"></a>

```typescript
public readonly highestIntegrity: Integrity;
```

- *Type:* <a href="#cdktg.Integrity">Integrity</a>

---

##### `humanUse`<sup>Required</sup> <a name="humanUse" id="cdktg.plus.Browser.property.humanUse"></a>

```typescript
Expand Down Expand Up @@ -2817,6 +2839,7 @@ Any object.
| <code><a href="#cdktg.TechnicalAsset.property.customDevelopedParts">customDevelopedParts</a></code> | <code>boolean</code> | *No description.* |
| <code><a href="#cdktg.TechnicalAsset.property.encryption">encryption</a></code> | <code><a href="#cdktg.Encryption">Encryption</a></code> | *No description.* |
| <code><a href="#cdktg.TechnicalAsset.property.highestAvailability">highestAvailability</a></code> | <code><a href="#cdktg.Availability">Availability</a></code> | *No description.* |
| <code><a href="#cdktg.TechnicalAsset.property.highestIntegrity">highestIntegrity</a></code> | <code><a href="#cdktg.Integrity">Integrity</a></code> | *No description.* |
| <code><a href="#cdktg.TechnicalAsset.property.humanUse">humanUse</a></code> | <code>boolean</code> | *No description.* |
| <code><a href="#cdktg.TechnicalAsset.property.internet">internet</a></code> | <code>boolean</code> | *No description.* |
| <code><a href="#cdktg.TechnicalAsset.property.machine">machine</a></code> | <code><a href="#cdktg.Machine">Machine</a></code> | *No description.* |
Expand Down Expand Up @@ -2915,6 +2938,16 @@ public readonly highestAvailability: Availability;

---

##### `highestIntegrity`<sup>Required</sup> <a name="highestIntegrity" id="cdktg.TechnicalAsset.property.highestIntegrity"></a>

```typescript
public readonly highestIntegrity: Integrity;
```

- *Type:* <a href="#cdktg.Integrity">Integrity</a>

---

##### `humanUse`<sup>Required</sup> <a name="humanUse" id="cdktg.TechnicalAsset.property.humanUse"></a>

```typescript
Expand Down Expand Up @@ -3443,6 +3476,7 @@ Any object.
| <code><a href="#cdktg.plus.Vault.property.customDevelopedParts">customDevelopedParts</a></code> | <code>boolean</code> | *No description.* |
| <code><a href="#cdktg.plus.Vault.property.encryption">encryption</a></code> | <code><a href="#cdktg.Encryption">Encryption</a></code> | *No description.* |
| <code><a href="#cdktg.plus.Vault.property.highestAvailability">highestAvailability</a></code> | <code><a href="#cdktg.Availability">Availability</a></code> | *No description.* |
| <code><a href="#cdktg.plus.Vault.property.highestIntegrity">highestIntegrity</a></code> | <code><a href="#cdktg.Integrity">Integrity</a></code> | *No description.* |
| <code><a href="#cdktg.plus.Vault.property.humanUse">humanUse</a></code> | <code>boolean</code> | *No description.* |
| <code><a href="#cdktg.plus.Vault.property.internet">internet</a></code> | <code>boolean</code> | *No description.* |
| <code><a href="#cdktg.plus.Vault.property.machine">machine</a></code> | <code><a href="#cdktg.Machine">Machine</a></code> | *No description.* |
Expand Down Expand Up @@ -3543,6 +3577,16 @@ public readonly highestAvailability: Availability;

---

##### `highestIntegrity`<sup>Required</sup> <a name="highestIntegrity" id="cdktg.plus.Vault.property.highestIntegrity"></a>

```typescript
public readonly highestIntegrity: Integrity;
```

- *Type:* <a href="#cdktg.Integrity">Integrity</a>

---

##### `humanUse`<sup>Required</sup> <a name="humanUse" id="cdktg.plus.Vault.property.humanUse"></a>

```typescript
Expand Down
20 changes: 19 additions & 1 deletion src/technical-asset.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Construct } from "constructs";

import { Availability, CIATriad } from "./cia-triad";
import { Integrity, Availability, CIATriad } from "./cia-triad";
import { Communication, CommunicationOptions } from "./communication";
import { DataAsset } from "./data-asset";
import { Model } from "./model";
Expand Down Expand Up @@ -127,6 +127,24 @@ export class TechnicalAsset extends Resource {
].includes(this.technology);
}

public get highestIntegrity(): Integrity {
let { integrity: highest } = this.ciaTriad;

this.dataAssetsProcessed.forEach((a) => {
if (a.ciaTriad.hasHigherIntegrity(highest)) {
highest = a.ciaTriad.integrity;
}
});

this.dataAssetsStored.forEach((a) => {
if (a.ciaTriad.hasHigherIntegrity(highest)) {
highest = a.ciaTriad.integrity;
}
});

return highest;
}

public get highestAvailability(): Availability {
let { availability: highest } = this.ciaTriad;

Expand Down

0 comments on commit 172233a

Please sign in to comment.