/*
 * Selling Partner API for Listings Items
 * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API.  For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide).
 *
 * OpenAPI spec version: 2021-08-01
 *
 * 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";

/**
 * The ItemAttributes model module.
 * @module listingsItems_2021-08-01/js-client.listingsItems_2021-08-01.model/ItemAttributes
 * @version 2021-08-01
 */
export class ItemAttributes extends Object {
  /**
   * Constructs a new <code>ItemAttributes</code>.
   * JSON object containing structured listings item attribute data keyed by attribute name.
   * @alias module:listingsItems_2021-08-01/js-client.listingsItems_2021-08-01.model/ItemAttributes
   * @class
   * @param object
   */
  constructor(object) {
    super();
    for (let key in object) {
      if (object.hasOwnProperty(key)) {
        this[key] = object[key];
      }
    }
  }

  /**
   * Constructs a <code>ItemAttributes</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:listingsItems_2021-08-01/js-client.listingsItems_2021-08-01.model/ItemAttributes} obj Optional instance to populate.
   * @return {module:listingsItems_2021-08-01/js-client.listingsItems_2021-08-01.model/ItemAttributes} The populated <code>ItemAttributes</code> instance.
   */
  static constructFromObject(data, obj) {
    if (data) {
      obj = obj || new ItemAttributes(data);
    }
    return obj;
  }
}
