@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
58 lines (57 loc) • 2.02 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* AskNews API
* AskNews API
*
* The version of the OpenAPI document: 0.21.1
* Contact: contact@emergentmethods.ai
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.WebSourceParamsToJSONTyped = exports.WebSourceParamsToJSON = exports.WebSourceParamsFromJSONTyped = exports.WebSourceParamsFromJSON = exports.instanceOfWebSourceParams = void 0;
/**
* Check if a given object implements the WebSourceParams interface.
*/
function instanceOfWebSourceParams(value) {
if (!('queries' in value) || value['queries'] === undefined)
return false;
return true;
}
exports.instanceOfWebSourceParams = instanceOfWebSourceParams;
function WebSourceParamsFromJSON(json) {
return WebSourceParamsFromJSONTyped(json, false);
}
exports.WebSourceParamsFromJSON = WebSourceParamsFromJSON;
function WebSourceParamsFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'queries': json['queries'],
'domains': json['domains'] == null ? undefined : json['domains'],
'strict': json['strict'] == null ? undefined : json['strict'],
'lookback': json['lookback'] == null ? undefined : json['lookback'],
};
}
exports.WebSourceParamsFromJSONTyped = WebSourceParamsFromJSONTyped;
function WebSourceParamsToJSON(json) {
return WebSourceParamsToJSONTyped(json, false);
}
exports.WebSourceParamsToJSON = WebSourceParamsToJSON;
function WebSourceParamsToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'queries': value['queries'],
'domains': value['domains'],
'strict': value['strict'],
'lookback': value['lookback'],
};
}
exports.WebSourceParamsToJSONTyped = WebSourceParamsToJSONTyped;
;