its a 9th gen console (successor of wii u and 3ds which both are 8th gen) and will compete against other 9th gen console whenever those gets released.
The thing about console generations is that they're more or less artificial constructs with very little real applicability to anything. They weren't even a thing until the 16-bit generation. It began as a marketing ploy by Sega. When the concept of generations became a thing, they were never meant to be groupings of unique competitions. Sega's purpose was so that the SMD would seem more advanced than the NES, which it competed with for half of its existence, and then the SNES for the later half - when Sega adjusted its attack by saying the SNES lacked blast-processing. Both blast processing and generations of unrelated consoles are fictional constructs.
The reality is, PS4 and Switch are competing against each other. If there's any generational measurement to be made, it's that the PS4 is Sony's 4th generation home console, and the Switch is Nintendo's 7th generation home console.
I describe myself as a little dose of toxic masculinity.