// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2020 Raritan Inc. All rights reserved.
//
// This file was generated by IdlC from Webcam.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.webcam {

  public class Format : ICloneable {
    public object Clone() {
      Format copy = new Format();
      copy.x = this.x;
      copy.y = this.y;
      copy.pixelFormat = this.pixelFormat;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["x"] = this.x;
      json["y"] = this.y;
      json["pixelFormat"] = this.pixelFormat;
      return json;
    }

    public static Format Decode(LightJson.JsonObject json, Agent agent) {
      Format inst = new Format();
      inst.x = (int)json["x"];
      inst.y = (int)json["y"];
      inst.pixelFormat = (int)json["pixelFormat"];
      return inst;
    }

    public int x = 0;
    public int y = 0;
    public int pixelFormat = 0;
  }
}
