revokeRole method

Future<ExecResp> revokeRole(
  1. RevokeRoleReq? req
)
override

Implementation

Future<ExecResp> revokeRole(RevokeRoleReq? req) async {
  oprot.writeMessageBegin(
      new TMessage("revokeRole", TMessageType.CALL, nextSeqid()));
  revokeRole_args args = new revokeRole_args();
  args.req = req;
  args.write(oprot);
  oprot.writeMessageEnd();

  await oprot.trans_.flush();

  TMessage msg = iprot.readMessageBegin();
  if (msg.type == TMessageType.EXCEPTION) {
    TApplicationError error = TApplicationError.read(iprot);
    iprot.readMessageEnd();
    throw error;
  }

  revokeRole_result result = new revokeRole_result();
  result.read(iprot);
  iprot.readMessageEnd();
  if (result.isSetSuccess()) {
    return result.success!;
  }

  throw new TApplicationError(TApplicationErrorType.MISSING_RESULT,
      "revokeRole failed: unknown result");
}