/*
 * Selling Partner API for Catalog Items
 * The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog.  For more information, refer to the [Catalog Items API Use Case Guide](doc:catalog-items-api-v2022-04-01-use-case-guide).
 *
 * OpenAPI spec version: 2022-04-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 catalogItems_2022-04-01/js-client.catalogItems_2022-04-01.model/ItemAttributes
 * @version 2022-04-01
 */
export class ItemAttributes extends Object {
  /**
   * Constructs a new <code>ItemAttributes</code>.
   * A JSON object that contains structured item attribute data keyed by attribute name. Catalog item attributes conform to the related product type definitions available in the Selling Partner API for Product Type Definitions.
   * @alias module:catalogItems_2022-04-01/js-client.catalogItems_2022-04-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:catalogItems_2022-04-01/js-client.catalogItems_2022-04-01.model/ItemAttributes} obj Optional instance to populate.
   * @return {module:catalogItems_2022-04-01/js-client.catalogItems_2022-04-01.model/ItemAttributes} The populated <code>ItemAttributes</code> instance.
   */
  static constructFromObject(data, obj) {
    if (data) {
      obj = obj || new ItemAttributes(data);
    }
    return obj;
  }
}
