"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * Octane API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * 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.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ListCreditGrantsToJSON = exports.ListCreditGrantsFromJSONTyped = exports.ListCreditGrantsFromJSON = void 0;
const runtime_1 = require("../runtime");
const CreditGrant_1 = require("./CreditGrant");
function ListCreditGrantsFromJSON(json) {
    return ListCreditGrantsFromJSONTyped(json, false);
}
exports.ListCreditGrantsFromJSON = ListCreditGrantsFromJSON;
function ListCreditGrantsFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'sortDirection': !(0, runtime_1.exists)(json, 'sort_direction') ? undefined : json['sort_direction'],
        'forwardSecondarySortOffset': !(0, runtime_1.exists)(json, 'forward_secondary_sort_offset') ? undefined : json['forward_secondary_sort_offset'],
        'limit': !(0, runtime_1.exists)(json, 'limit') ? undefined : json['limit'],
        'forwardSortOffset': !(0, runtime_1.exists)(json, 'forward_sort_offset') ? undefined : json['forward_sort_offset'],
        'creditGrants': !(0, runtime_1.exists)(json, 'credit_grants') ? undefined : (json['credit_grants'].map(CreditGrant_1.CreditGrantFromJSON)),
        'sortColumn': !(0, runtime_1.exists)(json, 'sort_column') ? undefined : json['sort_column'],
    };
}
exports.ListCreditGrantsFromJSONTyped = ListCreditGrantsFromJSONTyped;
function ListCreditGrantsToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'sort_direction': value.sortDirection,
        'forward_secondary_sort_offset': value.forwardSecondarySortOffset,
        'limit': value.limit,
        'forward_sort_offset': value.forwardSortOffset,
        'credit_grants': value.creditGrants === undefined ? undefined : (value.creditGrants.map(CreditGrant_1.CreditGrantToJSON)),
        'sort_column':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