// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2026 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 Information_2_0_0 : ICloneable {
    public object Clone() {
      Information_2_0_0 copy = new Information_2_0_0();
      copy.id = this.id;
      copy.supportedFormats = this.supportedFormats;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["id"] = this.id;
      json["supportedFormats"] = new JsonArray(this.supportedFormats.Select(
        _value => (JsonValue)(_value.Encode())));
      return json;
    }

    public static Information_2_0_0 Decode(LightJson.JsonObject json, Agent agent) {
      Information_2_0_0 inst = new Information_2_0_0();
      inst.id = (string)json["id"];
      inst.supportedFormats = new System.Collections.Generic.List<Com.Raritan.Idl.webcam.Format_2_0_0>(json["supportedFormats"].AsJsonArray.Select(
        _value => Com.Raritan.Idl.webcam.Format_2_0_0.Decode(_value, agent)));
      return inst;
    }

    public string id = "";
    public System.Collections.Generic.IEnumerable<Com.Raritan.Idl.webcam.Format_2_0_0> supportedFormats = new System.Collections.Generic.List<Com.Raritan.Idl.webcam.Format_2_0_0>();
  }
}
