dropSnapshot method

Future<ExecResp> dropSnapshot(
  1. DropSnapshotReq? req
)
override

Implementation

Future<ExecResp> dropSnapshot(DropSnapshotReq? req) async {
  oprot.writeMessageBegin(
      new TMessage("dropSnapshot", TMessageType.CALL, nextSeqid()));
  dropSnapshot_args args = new dropSnapshot_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;
  }

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

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