use of com.google.api.services.clouddebugger.v2.model.FormatMessage in project google-cloud-intellij by GoogleCloudPlatform.
the class CloudDebugProcessStateTest method createBreakpoint.
private static Breakpoint createBreakpoint(String id, Boolean isFinal, int finalTimeSeconds, String locationPath, Integer locationLine, Boolean isError, String statusMessage) {
Breakpoint result = new Breakpoint();
result.setId(id);
result.setIsFinalState(isFinal);
if (Boolean.TRUE.equals(isFinal)) {
Calendar calendar = // gets a calendar using the default time zone and locale.
Calendar.getInstance();
calendar.add(Calendar.SECOND, finalTimeSeconds);
DateTimeFormatter formatter = ISODateTimeFormat.dateTime();
result.setFinalTime(formatter.print(calendar.getTimeInMillis()));
}
SourceLocation location = new SourceLocation();
location.setPath(locationPath);
location.setLine(locationLine);
result.setLocation(location);
StatusMessage status = new StatusMessage();
status.setIsError(isError);
FormatMessage message = new FormatMessage();
message.setFormat(statusMessage);
status.setDescription(message);
result.setStatus(status);
return result;
}
Aggregations