// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2023 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_2_0_0 : ICloneable {
    public object Clone() {
      Format_2_0_0 copy = new Format_2_0_0();
      copy.width = this.width;
      copy.height = this.height;
      copy.pixelFormat = this.pixelFormat;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["width"] = this.width;
      json["height"] = this.height;
      json["pixelFormat"] = (int)this.pixelFormat;
      return json;
    }

    public static Format_2_0_0 Decode(LightJson.JsonObject json, Agent agent) {
      Format_2_0_0 inst = new Format_2_0_0();
      inst.width = (int)json["width"];
      inst.height = (int)json["height"];
      inst.pixelFormat = (Com.Raritan.Idl.webcam.PixelFormat)(int)json["pixelFormat"];
      return inst;
    }

    public int width = 0;
    public int height = 0;
    public Com.Raritan.Idl.webcam.PixelFormat pixelFormat = Com.Raritan.Idl.webcam.PixelFormat.MJPEG;
  }
}
