def Get(self): """Fetch and return a proper HuntApproval object.""" args = user_pb2.ApiGetHuntApprovalArgs(hunt_id=self.hunt_id, approval_id=self.approval_id, username=self.username) result = self._context.SendRequest("GetHuntApproval", args) return HuntApproval(data=result, username=self._context.username, context=self._context)
def Get(self) -> "HuntApproval": """Fetch and return a proper HuntApproval object.""" args = user_pb2.ApiGetHuntApprovalArgs(hunt_id=self.hunt_id, approval_id=self.approval_id, username=self.username) result = self._context.SendRequest("GetHuntApproval", args) if not isinstance(result, user_pb2.ApiHuntApproval): raise TypeError(f"Unexpected response type: '{type(result)}'") return HuntApproval(data=result, username=self._context.username, context=self._context)