/*
 * Selling Partner API for Notifications
 * The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner's business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more.  For more information, see the [Notifications Use Case Guide](doc:notifications-api-v1-use-case-guide).
 *
 * OpenAPI spec version: v1
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 *
 * Swagger Codegen version: 2.4.9
 *
 * Do not edit the class manually.
 *
 */

import { ApiClient } from "../ApiClient.js";
import { OrderChangeTypeEnum } from "./OrderChangeTypeEnum.js";

/**
 * The OrderChangeTypes model module.
 * @module notifications/js-client.notifications.model/OrderChangeTypes
 * @version v1
 */
export class OrderChangeTypes extends Array {
  /**
   * Constructs a new <code>OrderChangeTypes</code>.
   * A list of order change types to subscribe to (e.g. BuyerRequestedChange). To receive notifications of all change types, do not provide this list.
   * @alias module:notifications/js-client.notifications.model/OrderChangeTypes
   * @class
   * @extends Array
   */
  constructor() {
    super();
  }

  /**
   * Constructs a <code>OrderChangeTypes</code> from a plain JavaScript object, optionally creating a new instance.
   * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
   * @param {Object} data The plain JavaScript object bearing properties of interest.
   * @param {module:notifications/js-client.notifications.model/OrderChangeTypes} obj Optional instance to populate.
   * @return {module:notifications/js-client.notifications.model/OrderChangeTypes} The populated <code>OrderChangeTypes</code> instance.
   */
  static constructFromObject(data, obj) {
    if (data) {
      obj = obj || new OrderChangeTypes();
      ApiClient.constructFromObject(data, obj, "OrderChangeTypeEnum");
    }
    return obj;
  }
}
