from dataclasses import dataclass


@dataclass
class Address:
    protocol: str
    interface: str
    port: int

    def format(self) -> str:
        return f"{self.protocol}://{self.interface}:{self.port}"
