in aws-ssmincidents-responseplan/src/main/java/software/amazon/ssmincidents/responseplan/translators/GetResponsePlanConverter.java [31:51]
protected ResourceModel doForward(GetResponsePlanResponse getResponsePlanResponse) {
return ResourceModel.builder()
.arn(getResponsePlanResponse.arn())
.name(getResponsePlanResponse.name())
.displayName(getResponsePlanResponse.displayName())
.chatChannel(chatChannelConverter.convert(getResponsePlanResponse.chatChannel()))
.incidentTemplate(
incidentTemplateConverter.convert(getResponsePlanResponse.incidentTemplate())
)
.actions(
Optional.ofNullable(getResponsePlanResponse.actions())
.map(x -> Lists.newArrayList(actionConverter.convertAll(x)))
.orElse(new ArrayList<>())
)
.engagements(
new HashSet<>(
Optional.ofNullable(getResponsePlanResponse.engagements())
.orElse(new ArrayList<>())
))
.build();
}