My class contains no methods, only several fields, like host, port, labels, channels etc. etc.
I.e. its kind of config.
Should I use regular Class for representing configs? I want to make it obvious to reader that this instance is just a container for other values.
upd My config is pretty big and comes from xml, so it’s a tree.
Yes, most likely you should be using
class. There are rare case as pointed in other replies to usestruct.Name your class “ContainerForConfigurationProperties”, than look at the resulting code. If it looks bad – refactor by changing class name till you are happy. Note that you may find that after coming up with good name some properties no longer fit into your class – it may mean that you class actually was container for several sets of properties – refactor by splitting the class.