public String toPrettyJson() {
        try {
            return MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(this);
        } catch (JsonProcessingException e) {
            throw new SdkClientException("Could not serialize state machine.", e);
        }
    }
@return Formatted JSON representation of this StateMachine. May be provided to API calls (see {@link
com.amazonaws.services.stepfunctions.AWSStepFunctions}).
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StateMachine.java