Is this considered interval training?

I've read about how interval training can really ramp up the calorie burn. I've seen different examples spelled out -- like going all out for 1 minute followed by a recovery period of 30 seconds. And then you repeat that. Is there a set way to do intervals? The other day, I tried it on my own but wasn't sure if I was actually making it work for me. This is what I did -- please let me know if I should adjust or if this was actually correct:

Treadmill
Warm up:
Walked @ 4.3mph for first 2 minutes
Ran at 6.4 mph for next 2 minutes
Walked @ 4.0 mph for one minute

Then, I spent the next 25 minutes doing this:
Run @ 6.4 mph for one minute
Walk at 4.2 mph for 2 minutes

(I repeated this for 25 minutes)

I spent 10 minutes doing cool down -- walking at 4.3 mph.

So, a total of 40 minutes. Was this the right way to approach interval training? Thanks in advance.