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 5Ds R/7D2/7D/5D/40D/1D2N/M3; Nikon F6/D3s/D700/FM3A/1Dx/Coolpix A. Lens selection changes often; some of my favorites: Zeiss ZF.2 2/135 APO, Canon 100mm f/2.8L Macro IS, Nikkor 14-24/2.8G and 24-70/2.8G.