/*
 * 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";
import { ItemVendorDetailsCategory } from "./ItemVendorDetailsCategory.js";

/**
 * The ItemVendorDetailsByMarketplace model module.
 * @module catalogItems_2022-04-01/js-client.catalogItems_2022-04-01.model/ItemVendorDetailsByMarketplace
 * @version 2022-04-01
 */
export class ItemVendorDetailsByMarketplace {
  /**
   * Constructs a new <code>ItemVendorDetailsByMarketplace</code>.
   * Vendor details associated with an Amazon catalog item for the indicated Amazon marketplace.
   * @alias module:catalogItems_2022-04-01/js-client.catalogItems_2022-04-01.model/ItemVendorDetailsByMarketplace
   * @class
   * @param marketplaceId {String} Amazon marketplace identifier.
   */
  constructor(marketplaceId) {
    this.marketplaceId = marketplaceId;
  }

  /**
   * Constructs a <code>ItemVendorDetailsByMarketplace</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/ItemVendorDetailsByMarketplace} obj Optional instance to populate.
   * @return {module:catalogItems_2022-04-01/js-client.catalogItems_2022-04-01.model/ItemVendorDetailsByMarketplace} The populated <code>ItemVendorDetailsByMarketplace</code> instance.
   */
  static constructFromObject(data, obj) {
    if (data) {
      obj = obj || new ItemVendorDetailsByMarketplace();
      if (data.hasOwnProperty("marketplaceId"))
        obj.marketplaceId = ApiClient.convertToType(
          data["marketplaceId"],
          "String",
        );
      if (data.hasOwnProperty("brandCode"))
        obj.brandCode = ApiClient.convertToType(data["brandCode"], "String");
      if (data.hasOwnProperty("manufacturerCode"))
        obj.manufacturerCode = ApiClient.convertToType(
          data["manufacturerCode"],
          "String",
        );
      if (data.hasOwnProperty("manufacturerCodeParent"))
        obj.manufacturerCodeParent = ApiClient.convertToType(
          data["manufacturerCodeParent"],
          "String",
        );
      if (data.hasOwnProperty("productCategory"))
        obj.productCategory = ItemVendorDetailsCategory.constructFromObject(
          data["productCategory"],
        );
      if (data.hasOwnProperty("productGroup"))
        obj.productGroup = ApiClient.convertToType(
          data["productGroup"],
          "String",
        );
      if (data.hasOwnProperty("productSubcategory"))
        obj.productSubcategory = ItemVendorDetailsCategory.constructFromObject(
          data["productSubcategory"],
        );
      if (data.hasOwnProperty("replenishmentCategory"))
        obj.replenishmentCategory = ApiClient.convertToType(
          data["replenishmentCategory"],
          "String",
        );
    }
    return obj;
  }
}

/**
 * Amazon marketplace identifier.
 * @member {String} marketplaceId
 */
ItemVendorDetailsByMarketplace.prototype.marketplaceId = undefined;

/**
 * Brand code associated with an Amazon catalog item.
 * @member {String} brandCode
 */
ItemVendorDetailsByMarketplace.prototype.brandCode = undefined;

/**
 * Manufacturer code associated with an Amazon catalog item.
 * @member {String} manufacturerCode
 */
ItemVendorDetailsByMarketplace.prototype.manufacturerCode = undefined;

/**
 * Parent vendor code of the manufacturer code.
 * @member {String} manufacturerCodeParent
 */
ItemVendorDetailsByMarketplace.prototype.manufacturerCodeParent = undefined;

/**
 * Product category associated with an Amazon catalog item.
 * @member {module:catalogItems_2022-04-01/js-client.catalogItems_2022-04-01.model/ItemVendorDetailsCategory} productCategory
 */
ItemVendorDetailsByMarketplace.prototype.productCategory = undefined;

/**
 * Product group associated with an Amazon catalog item.
 * @member {String} productGroup
 */
ItemVendorDetailsByMarketplace.prototype.productGroup = undefined;

/**
 * Product subcategory associated with an Amazon catalog item.
 * @member {module:catalogItems_2022-04-01/js-client.catalogItems_2022-04-01.model/ItemVendorDetailsCategory} productSubcategory
 */
ItemVendorDetailsByMarketplace.prototype.productSubcategory = undefined;

/**
 * Allowed values for the <code>replenishmentCategory</code> property.
 * @enum {String}
 * @readonly
 */
ItemVendorDetailsByMarketplace.ReplenishmentCategoryEnum = {
  /**
   * value: "ALLOCATED"
   * @const
   */
  ALLOCATED: "ALLOCATED",

  /**
   * value: "BASIC_REPLENISHMENT"
   * @const
   */
  BASIC_REPLENISHMENT: "BASIC_REPLENISHMENT",

  /**
   * value: "IN_SEASON"
   * @const
   */
  IN_SEASON: "IN_SEASON",

  /**
   * value: "LIMITED_REPLENISHMENT"
   * @const
   */
  LIMITED_REPLENISHMENT: "LIMITED_REPLENISHMENT",

  /**
   * value: "MANUFACTURER_OUT_OF_STOCK"
   * @const
   */
  MANUFACTURER_OUT_OF_STOCK: "MANUFACTURER_OUT_OF_STOCK",

  /**
   * value: "NEW_PRODUCT"
   * @const
   */
  NEW_PRODUCT: "NEW_PRODUCT",

  /**
   * value: "NON_REPLENISHABLE"
   * @const
   */
  NON_REPLENISHABLE: "NON_REPLENISHABLE",

  /**
   * value: "NON_STOCKUPABLE"
   * @const
   */
  NON_STOCKUPABLE: "NON_STOCKUPABLE",

  /**
   * value: "OBSOLETE"
   * @const
   */
  OBSOLETE: "OBSOLETE",

  /**
   * value: "PLANNED_REPLENISHMENT"
   * @const
   */
  PLANNED_REPLENISHMENT: "PLANNED_REPLENISHMENT",
};

/**
 * Replenishment category associated with an Amazon catalog item.
 * @member {module:catalogItems_2022-04-01/js-client.catalogItems_2022-04-01.model/ItemVendorDetailsByMarketplace.ReplenishmentCategoryEnum} replenishmentCategory
 */
ItemVendorDetailsByMarketplace.prototype.replenishmentCategory = undefined;
