Set a single flag on a resource.

        :param payload:
            t: can be one of make_public, make_private, make_shareable,
            make_not_shareable, make_discoverable, make_not_discoverable
        :return:
            empty but with 202 status_code

def flag(self, payload):
        """Set a single flag on a resource.

        :param payload:
            t: can be one of make_public, make_private, make_shareable,
            make_not_shareable, make_discoverable, make_not_discoverable
        :return:
            empty but with 202 status_code
        """
        url = "{url_base}/resource/{pid}/flag/".format(url_base=self.hs.url_base,
                                                       pid=self.pid)

        r = self.hs._request('POST', url, None, payload)
        return r