G lenses provide distance information, so G lenses are D, too, though it is not mentioned as part of the product name. (The difference between an AF lens, and an AF-D lens, is that D lenses send additional information to a flashgun used in the various TTL modes.) As the previous reply indicated, on a practical level, G lenses require the camera's controls to set the aperture. A lens labeled AF-D, or merely AF, has an aperture ring, allowing the choice of using either method to set the aperture.
This is a limitation for those of us with older-design cameras, such as my FM3A; I cannot set the aperture of my 50mm 1.4G lens if I affix the lens to the FM3A body, as the G lens lacks an aperture ring, and the camera lacks electronic controls to set the G lens' aperture.
Canon 7D2/7D/5D/40D/1D2N; Nikon F6/D700/FM3A/1Dx/Coolpix A; Canon 40mm 2.8 STM, 135L, 50L, 35L, 50mm 1.8 I, 100mm 2.8L Macro, 10-22mm EF-S, 400mm 5.6L; Nikkor 50mm 1.2 AI-S, 50mm 1.4G, 50mm 1.8D, 16mm 2.8D Fisheye, 180mm 2.8D, 100-300mm 5.6 AI-S, 18mm 2.8D, 45mm 2.8 AI-P, Micro 60/2.8G; Voigtlander 90mm f/3.5 SL II