scraper-api-datachaser
Version:
The scraping SaaS platform provides a RESTful API for developers to perform web scraping tasks. Users can submit scraping tasks, monitor task status, retrieve scraped data, and manage their account through the API.
96 lines (76 loc) • 3.21 kB
JavaScript
/**
* Scraper API
* The scraping SaaS platform provides a RESTful API for developers to perform web scraping tasks. Users can submit scraping tasks, monitor task status, retrieve scraped data, and manage their account through the API.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The DeleteApiKeyRequest model module.
* @module model/DeleteApiKeyRequest
* @version 1.0.0
*/
class DeleteApiKeyRequest {
/**
* Constructs a new <code>DeleteApiKeyRequest</code>.
* @alias module:model/DeleteApiKeyRequest
* @param apikey {String}
*/
constructor(apikey) {
DeleteApiKeyRequest.initialize(this, apikey);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, apikey) {
obj['apikey'] = apikey;
}
/**
* Constructs a <code>DeleteApiKeyRequest</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:model/DeleteApiKeyRequest} obj Optional instance to populate.
* @return {module:model/DeleteApiKeyRequest} The populated <code>DeleteApiKeyRequest</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new DeleteApiKeyRequest();
if (data.hasOwnProperty('apikey')) {
obj['apikey'] = ApiClient.convertToType(data['apikey'], 'String');
}
}
return obj;
}
/**
* Validates the JSON data with respect to <code>DeleteApiKeyRequest</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DeleteApiKeyRequest</code>.
*/
static validateJSON(data) {
// check to make sure all required properties are present in the JSON string
for (const property of DeleteApiKeyRequest.RequiredProperties) {
if (!data.hasOwnProperty(property)) {
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
}
}
// ensure the json data is a string
if (data['apikey'] && !(typeof data['apikey'] === 'string' || data['apikey'] instanceof String)) {
throw new Error("Expected the field `apikey` to be a primitive type in the JSON string but got " + data['apikey']);
}
return true;
}
}
DeleteApiKeyRequest.RequiredProperties = ["apikey"];
/**
* @member {String} apikey
*/
DeleteApiKeyRequest.prototype['apikey'] = undefined;
export default DeleteApiKeyRequest;