def METHOD_NAME(cls, data: "Any]") -> "Any":
    """Ensure either downloadUrl/mediaType or accessUrl/accessService are
    defined.
    It's fine to define them all, but at least one complete pair
    MUST be specified.
    """
    if not (data.downloadUrl and data.mediaType) or (
        data.accessUrl and data.accessService
    ):
        raise ValueError(
            "Either of the pairs of attributes downloadUrl/mediaType or "
            "accessUrl/accessService MUST be specified."
        )
    return data