/*
 * Selling Partner API for Feeds
 * The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner.
 *
 * OpenAPI spec version: 2021-06-30
 *
 * 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 CreateFeedDocumentResponse model module.
 * @module feeds_2021-06-30/js-client.feeds_2021-06-30.model/CreateFeedDocumentResponse
 * @version 2021-06-30
 */
export class CreateFeedDocumentResponse {
  /**
   * Constructs a new <code>CreateFeedDocumentResponse</code>.
   * Information required to upload a feed document's contents.
   * @alias module:feeds_2021-06-30/js-client.feeds_2021-06-30.model/CreateFeedDocumentResponse
   * @class
   * @param feedDocumentId {String} The identifier of the feed document.
   * @param url {String} The presigned URL for uploading the feed contents. This URL expires after 5 minutes.
   */
  constructor(feedDocumentId, url) {
    this.feedDocumentId = feedDocumentId;
    this.url = url;
  }

  /**
   * Constructs a <code>CreateFeedDocumentResponse</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:feeds_2021-06-30/js-client.feeds_2021-06-30.model/CreateFeedDocumentResponse} obj Optional instance to populate.
   * @return {module:feeds_2021-06-30/js-client.feeds_2021-06-30.model/CreateFeedDocumentResponse} The populated <code>CreateFeedDocumentResponse</code> instance.
   */
  static constructFromObject(data, obj) {
    if (data) {
      obj = obj || new CreateFeedDocumentResponse();
      if (data.hasOwnProperty("feedDocumentId"))
        obj.feedDocumentId = ApiClient.convertToType(
          data["feedDocumentId"],
          "String",
        );
      if (data.hasOwnProperty("url"))
        obj.url = ApiClient.convertToType(data["url"], "String");
    }
    return obj;
  }
}

/**
 * The identifier of the feed document.
 * @member {String} feedDocumentId
 */
CreateFeedDocumentResponse.prototype.feedDocumentId = undefined;

/**
 * The presigned URL for uploading the feed contents. This URL expires after 5 minutes.
 * @member {String} url
 */
CreateFeedDocumentResponse.prototype.url = undefined;
