fastcomments-sdk
Version:
FastComments API Client - A SDK for interacting with the FastComments API
65 lines • 3.1 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* fastcomments
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfQuestionResultAggregationOverall = instanceOfQuestionResultAggregationOverall;
exports.QuestionResultAggregationOverallFromJSON = QuestionResultAggregationOverallFromJSON;
exports.QuestionResultAggregationOverallFromJSONTyped = QuestionResultAggregationOverallFromJSONTyped;
exports.QuestionResultAggregationOverallToJSON = QuestionResultAggregationOverallToJSON;
exports.QuestionResultAggregationOverallToJSONTyped = QuestionResultAggregationOverallToJSONTyped;
const runtime_1 = require("../runtime");
const QuestionDatum_1 = require("./QuestionDatum");
/**
* Check if a given object implements the QuestionResultAggregationOverall interface.
*/
function instanceOfQuestionResultAggregationOverall(value) {
if (!('total' in value) || value['total'] === undefined)
return false;
if (!('createdAt' in value) || value['createdAt'] === undefined)
return false;
return true;
}
function QuestionResultAggregationOverallFromJSON(json) {
return QuestionResultAggregationOverallFromJSONTyped(json, false);
}
function QuestionResultAggregationOverallFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'dataByDateBucket': json['dataByDateBucket'] == null ? undefined : ((0, runtime_1.mapValues)(json['dataByDateBucket'], QuestionDatum_1.QuestionDatumFromJSON)),
'dataByUrlId': json['dataByUrlId'] == null ? undefined : ((0, runtime_1.mapValues)(json['dataByUrlId'], QuestionDatum_1.QuestionDatumFromJSON)),
'countsByValue': json['countsByValue'] == null ? undefined : json['countsByValue'],
'total': json['total'],
'average': json['average'] == null ? undefined : json['average'],
'createdAt': (new Date(json['createdAt'])),
};
}
function QuestionResultAggregationOverallToJSON(json) {
return QuestionResultAggregationOverallToJSONTyped(json, false);
}
function QuestionResultAggregationOverallToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'dataByDateBucket': value['dataByDateBucket'] == null ? undefined : ((0, runtime_1.mapValues)(value['dataByDateBucket'], QuestionDatum_1.QuestionDatumToJSON)),
'dataByUrlId': value['dataByUrlId'] == null ? undefined : ((0, runtime_1.mapValues)(value['dataByUrlId'], QuestionDatum_1.QuestionDatumToJSON)),
'countsByValue': value['countsByValue'],
'total': value['total'],
'average': value['average'],
'createdAt': ((value['createdAt']).toISOString()),
};
}
//# sourceMappingURL=QuestionResultAggregationOverall.js.map