-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2352 from PaladinCloud/feat/next-291/polic-asset-…
…state feat:[NEXT-291] send asset-state event when a policy is enabled during policy evaluation
- Loading branch information
Showing
6 changed files
with
202 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
.../pac-batch-commons/src/main/java/com/tmobile/pacman/commons/dto/AssetStateSQSMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.tmobile.pacman.commons.dto; | ||
|
||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.List; | ||
|
||
public class AssetStateSQSMessage extends SQSBaseMessage { | ||
|
||
@JsonProperty("source") | ||
private String dataSource; | ||
@JsonProperty("assetTypes") | ||
private List<String> assetTypes; | ||
@JsonProperty("isFromPolicyEngine") | ||
private boolean fromPolicyEngine; | ||
@JsonProperty("jobName") | ||
private String jobName; | ||
|
||
public AssetStateSQSMessage(String tenantId, String tenantName, String dataSource, List<String> assetTypes, boolean fromPolicyEngine, String jobName) { | ||
super(tenantId, tenantName); | ||
this.dataSource = dataSource; | ||
this.assetTypes = assetTypes; | ||
this.fromPolicyEngine = fromPolicyEngine; | ||
this.jobName = jobName; | ||
} | ||
|
||
public String getDataSource() { | ||
return dataSource; | ||
} | ||
|
||
public void setDataSource(String dataSource) { | ||
this.dataSource = dataSource; | ||
} | ||
|
||
public List<String> getAssetTypes() { | ||
return assetTypes; | ||
} | ||
|
||
public void setAssetTypes(List<String> assetTypes) { | ||
this.assetTypes = assetTypes; | ||
} | ||
|
||
public boolean isFromPolicyEngine() { | ||
return fromPolicyEngine; | ||
} | ||
|
||
public void setFromPolicyEngine(boolean fromPolicyEngine) { | ||
this.fromPolicyEngine = fromPolicyEngine; | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
commons/pac-batch-commons/src/main/java/com/tmobile/pacman/commons/dto/SQSBaseMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.tmobile.pacman.commons.dto; | ||
|
||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.io.Serializable; | ||
|
||
public class SQSBaseMessage implements Serializable { | ||
|
||
@JsonProperty("tenant_id") | ||
private String tenantId; | ||
@JsonProperty("tenant_name") | ||
private String tenantName; | ||
|
||
public SQSBaseMessage(String tenantId, String tenantName) { | ||
this.tenantId = tenantId; | ||
this.tenantName = tenantName; | ||
} | ||
|
||
public String getTenantId() { | ||
return tenantId; | ||
} | ||
|
||
public void setTenantId(String tenantId) { | ||
this.tenantId = tenantId; | ||
} | ||
|
||
public String getTenantName() { | ||
return tenantName; | ||
} | ||
|
||
public void setTenantName(String tenantName) { | ||
this.tenantName = tenantName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters