def Grant(self): args = user_pb2.ApiGrantHuntApprovalArgs(hunt_id=self.hunt_id, username=self.username, approval_id=self.approval_id) data = self._context.SendRequest("GrantHuntApproval", args) return HuntApproval(data=data, username=self.username, context=self._context)
def Grant(self) -> "HuntApproval": args = user_pb2.ApiGrantHuntApprovalArgs(hunt_id=self.hunt_id, username=self.username, approval_id=self.approval_id) data = self._context.SendRequest("GrantHuntApproval", args) if not isinstance(data, user_pb2.ApiHuntApproval): raise TypeError(f"Unexpected response type: '{type(data)}'") return HuntApproval(data=data, username=self.username, context=self._context)