A distributed system is a system that utilizes a network to communicate while usually being broken down into multiple software programs. Said programs generally have separate tasks, and a paradigm used in the manner above is publish-subscribe. However, to enable the publish-subscribe paradigm, DDS (Data Distribution Service) is utilized as a network middleware for said type of communication. This thesis proposes a suitable way to specify data variants to allow for code generation to automatically create topics of information and publish data based on said variants. Thus, making it easier for distributed systems developers to handle information variants. Succeeding in this task could provide developers with a tool that can be used to create data variants more cheaply and faster than doing it manually. I designed variant types to achieve the goal of the thesis, along with a specification describing said types. Lastly, along with the previously mentioned, a manual implementation of a working DDS system utilizing said variant types proved the functionality and evaluated the completed work. As the goal sought out, the thesis's result is a working method for a user to specify variants that would allow for automatic code generation, thus providing developers with a functional specification to utilize within the field.