UNPKG

fastcomments-sdk

Version:

FastComments API Client - A SDK for interacting with the FastComments API

64 lines 2.73 kB
"use strict"; /* 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.instanceOfAggregationRequest = instanceOfAggregationRequest; exports.AggregationRequestFromJSON = AggregationRequestFromJSON; exports.AggregationRequestFromJSONTyped = AggregationRequestFromJSONTyped; exports.AggregationRequestToJSON = AggregationRequestToJSON; exports.AggregationRequestToJSONTyped = AggregationRequestToJSONTyped; const QueryPredicate_1 = require("./QueryPredicate"); const AggregationRequestSort_1 = require("./AggregationRequestSort"); const AggregationOperation_1 = require("./AggregationOperation"); /** * Check if a given object implements the AggregationRequest interface. */ function instanceOfAggregationRequest(value) { if (!('resourceName' in value) || value['resourceName'] === undefined) return false; if (!('operations' in value) || value['operations'] === undefined) return false; return true; } function AggregationRequestFromJSON(json) { return AggregationRequestFromJSONTyped(json, false); } function AggregationRequestFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'query': json['query'] == null ? undefined : (json['query'].map(QueryPredicate_1.QueryPredicateFromJSON)), 'resourceName': json['resourceName'], 'groupBy': json['groupBy'] == null ? undefined : json['groupBy'], 'operations': (json['operations'].map(AggregationOperation_1.AggregationOperationFromJSON)), 'sort': json['sort'] == null ? undefined : (0, AggregationRequestSort_1.AggregationRequestSortFromJSON)(json['sort']), }; } function AggregationRequestToJSON(json) { return AggregationRequestToJSONTyped(json, false); } function AggregationRequestToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'query': value['query'] == null ? undefined : (value['query'].map(QueryPredicate_1.QueryPredicateToJSON)), 'resourceName': value['resourceName'], 'groupBy': value['groupBy'], 'operations': (value['operations'].map(AggregationOperation_1.AggregationOperationToJSON)), 'sort': (0, AggregationRequestSort_1.AggregationRequestSortToJSON)(value['sort']), }; } //# sourceMappingURL=AggregationRequest.js.map