// 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 AssetStripsMessage : ICloneable {
    public object Clone() {
      AssetStripsMessage copy = new AssetStripsMessage();
      copy.assetStrips = this.assetStrips;
      return copy;
    }

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

    public static AssetStripsMessage Decode(LightJson.JsonObject json, Agent agent) {
      AssetStripsMessage inst = new AssetStripsMessage();
      inst.assetStrips = new System.Collections.Generic.List<Com.Raritan.Idl.datapush.AssetStripInfo>(json["assetStrips"].AsJsonArray.Select(
        _value => Com.Raritan.Idl.datapush.AssetStripInfo.Decode(_value, agent)));
      return inst;
    }

    public System.Collections.Generic.IEnumerable<Com.Raritan.Idl.datapush.AssetStripInfo> assetStrips = new System.Collections.Generic.List<Com.Raritan.Idl.datapush.AssetStripInfo>();
  }
}
