<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def brand(self, brand):
 """Sets the brand of this PaymentCard. :param brand: The brand of this PaymentCard. :type: str """

        allowed_values = ["visa", "mastercard", "americanExpress", "discover"]
        if brand is not None and brand not in allowed_values:
            raise ValueError(
                "Invalid value for `brand` ({0}), must be one of {1}"
                .format(brand, allowed_values)
            )

        self._brand = brand