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

  public class AssetStripInfo : ICloneable {
    public object Clone() {
      AssetStripInfo copy = new AssetStripInfo();
      copy.stripInfo = this.stripInfo;
      copy.deviceInfo = this.deviceInfo;
      copy.settings = this.settings;
      copy.tags = this.tags;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["stripInfo"] = this.stripInfo.Encode();
      json["deviceInfo"] = this.deviceInfo.Encode();
      json["settings"] = this.settings.Encode();
      json["tags"] = new JsonArray(this.tags.Select(
        _value => (JsonValue)(_value.Encode())));
      return json;
    }

    public static AssetStripInfo Decode(LightJson.JsonObject json, Agent agent) {
      AssetStripInfo inst = new AssetStripInfo();
      inst.stripInfo = Com.Raritan.Idl.assetmgrmodel.AssetStrip_2_0_5.StripInfo.Decode(json["stripInfo"], agent);
      inst.deviceInfo = Com.Raritan.Idl.assetmgrmodel.AssetStrip_2_0_5.DeviceInfo.Decode(json["deviceInfo"], agent);
      inst.settings = Com.Raritan.Idl.assetmgrmodel.AssetStripConfig_1_0_1.StripSettings.Decode(json["settings"], agent);
      inst.tags = new System.Collections.Generic.List<Com.Raritan.Idl.assetmgrmodel.AssetStrip_2_0_5.TagInfo>(json["tags"].AsJsonArray.Select(
        _value => Com.Raritan.Idl.assetmgrmodel.AssetStrip_2_0_5.TagInfo.Decode(_value, agent)));
      return inst;
    }

    public Com.Raritan.Idl.assetmgrmodel.AssetStrip_2_0_5.StripInfo stripInfo = new Com.Raritan.Idl.assetmgrmodel.AssetStrip_2_0_5.StripInfo();
    public Com.Raritan.Idl.assetmgrmodel.AssetStrip_2_0_5.DeviceInfo deviceInfo = new Com.Raritan.Idl.assetmgrmodel.AssetStrip_2_0_5.DeviceInfo();
    public Com.Raritan.Idl.assetmgrmodel.AssetStripConfig_1_0_1.StripSettings settings = new Com.Raritan.Idl.assetmgrmodel.AssetStripConfig_1_0_1.StripSettings();
    public System.Collections.Generic.IEnumerable<Com.Raritan.Idl.assetmgrmodel.AssetStrip_2_0_5.TagInfo> tags = new System.Collections.Generic.List<Com.Raritan.Idl.assetmgrmodel.AssetStrip_2_0_5.TagInfo>();
  }
}
