Star Trek: Voyager, "Author, Author"
Star Trek: Voyager, "Author, Author." Season 7, episode 20 (18 April 2001).[1]
Summarized on the fan site Memory Alpha (linked in note 1 above), The holographic Doctor (sic on capital), on Voyager "completes work on a holonovel that depicts the crew of Voyager in rather unflattering roles as they abuse and scorn the Emergency Medical Hologram. When the holonovel is published without his permission, the issue of The Doctor's legal rights is brought into question." Natural human rights, in a formulation preceding that of Thomas Jefferson et al., include life, liberty, and property, at least in the sense of the product of one's labors. Etc.: The question of "legal rights" therefore leads directly to the Doctor's status as a sentient, sapient being.
Cf. and contrast similar questions in Asimov's "The Bicentennial Man" and THE BICENTENNIAL MAN (1999 film), the question with Mr. Data in "The Measure of a Man" espidode of Star Trek: The Next Generation, and similar works.
Discussed in "Sentience in Science Fiction 101," which see.