public StateMachine build() {
            return new StateMachineValidator(new StateMachine(this)).validate();
        }
@return An immutable {@link StateMachine} object that can be transformed to JSON via {@link StateMachine#toJson()}.
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StateMachine.java