Wow ... just for fun ?
First - transmission gate is something that does not reveal a purely digital nature. Thus there is no possibility to create a synthesizable code for it. (I.e providing creating appropriate hardware). Excluding just instantiating a component from the library - if you can find one ...
But it is possible to create a model using e.g. digital constructs for the input and appropriate kind of output - maybe the REAL numbers representing the resistance, maybe the enumeration type for OPEN/CLOSE action or maybe just digital '0' '1' (or 'Z' - consider this!) representing some features you are interested in. Depends on how you perceive the functionality - or which part of it you are interested in. So using the if-else constructs together with the appropriate data types, you can play with it and you can even try to connect it with serious digital hardware (I mean the signals of the reasonable type) !!!
That's something like simulating the A/D converter the input is REAL number, the output is std_logic_vector, then some formulas an muxes inside, add transport or inertial delay, then connect to the serious logic (why not) and ... have fun !!!
rgds
P.S. maybe VHDL-AMS would provide more possibilities
(I mean more fun, for the moment ...)