// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2020 Raritan Inc. All rights reserved.
//
// This file was generated by IdlC from testrpc.idl.

using System;
using System.Linq;
using LightJson;
using Com.Raritan.Idl;
using Com.Raritan.JsonRpc;
using Com.Raritan.Util;

#pragma warning disable 0108, 0219, 0414, 1591

namespace Com.Raritan.Idl.test {

  public class Result : ICloneable {
    public object Clone() {
      Result copy = new Result();
      copy.code = this.code;
      copy.errtext = this.errtext;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["code"] = this.code;
      json["errtext"] = this.errtext;
      return json;
    }

    public static Result Decode(LightJson.JsonObject json, Agent agent) {
      Result inst = new Result();
      inst.code = (int)json["code"];
      inst.errtext = (string)json["errtext"];
      return inst;
    }

    public int code = 0;
    public string errtext = "";
  }
}
