This episode has such depth! In this episode entitled (The Measure of a Man) from season two of (ST-TNG) Commander Data is put on trial to determine if he is alive, and has sentience.
Captain Picard argues on his behalf for his rights, and freedom. He also discusses that creating more cybernetic lifeforms would be creating an entire race. He further demonstrates to the court that in doing this in the wrong way by creating more lifeforms such as Data, and having them forced to do manual labor would lead to a kind of slavery. This episode resonates on many topics, and in the end it is determined that Data is indeed alive in his own way, and he is allowed to continue his life without being disassembled, and studied.
~The Captain OC