def METHOD_NAME(cls, v):
    if v and not v.startswith("http"):  # if the user configured url without http(s)
        v = f"http://{v}"
        logging.info(f"Adding protocol to alertmanager_url: {v}")
    if v.endswith("/"):
        return v[:-1]
    return v