/*
 * Copyright 2017 iserge.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.cesiumjs.cs.collections;

import jsinterop.annotations.JsConstructor;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import org.cesiumjs.cs.core.Event;
import org.cesiumjs.cs.scene.ModelAnimation;
import org.cesiumjs.cs.scene.options.ModelAnimationOptions;

/**
 * @author Serge Silaev aka iSergio <s.serge.b@gmail.com>
 */
@JsType(isNative = true, namespace = "Cesium", name = "ModelAnimationCollection")
public class ModelAnimationCollection extends Collection<ModelAnimation> {
    /**
     * The event fired when an animation is added to the collection. This can be used, for example, to keep a UI in sync.
     * Default: new Event()
     */
    @JsProperty
    public Event animationAdded;
    /**
     * The event fired when an animation is removed from the collection. This can be used, for example, to keep a UI in sync.
     * Default: new Event()
     */
    @JsProperty
    public Event animationRemoved;

    @JsConstructor
    public ModelAnimationCollection() {}

    /**
     * Creates and adds an animation with the specified initial properties to the collection.
     * This raises the ModelAnimationCollection#animationAdded event so, for example, a UI can stay in sync.
     * @param options {@link ModelAnimationOptions}
     * @return The animation that was added to the collection.
     */
    public native ModelAnimation add(ModelAnimationOptions options);


}

@@ -667,16 +667,55 @@
 ructor;%0A
+import jsinterop.annotations.JsMethod;%0A
 import j
@@ -1976,24 +1976,38 @@
 on.%0A     */%0A
+    @JsMethod%0A
     public n
@@ -2064,11 +2064,575 @@
 ions);%0A%0A
+    /**%0A     * Creates and adds an animation with the specified initial properties to the collection for each animation in the model.%0A     * This raises the ModelAnimationCollection#animationAdded event for each model so, for example, a UI can stay in sync.%0A     * @param options %7B@link ModelAnimationOptions%7D%0A     * @return An array of ModelAnimation objects, one for each animation added to the collection.%0A     * If there are no glTF animations, the array is empty.%0A     */%0A    @JsMethod%0A    public native ModelAnimation%5B%5D addAll(ModelAnimationOptions options);
 %0A%7D%0A

Add missed addAll() method.