public static ScalingActivity create( @Nonnull final AutoScalingGroup group, @Nullable final String clientToken, @Nonnull final Collection<ActivityCause> causes) { final ScalingActivity activity = new ScalingActivity(group.getOwner()); activity.setGroup(group); activity.setClientToken(clientToken); activity.setCauses(Lists.newArrayList(causes)); activity.setStatusCode(ActivityStatusCode.InProgress); return activity; }
public static ScalingActivity withUuid(final String uuid) { final ScalingActivity example = new ScalingActivity(); example.setNaturalId(uuid); return example; }
/** * Create an example ScalingActivity for the given owner and identifier. * * @param ownerFullName The owner * @param activityId The scaling activity identifier * @return The example */ public static ScalingActivity named(final OwnerFullName ownerFullName, final String activityId) { final ScalingActivity example = withOwner(ownerFullName); example.setDisplayName(activityId); return example; }