/* tslint:disable */ /* eslint-disable */ /** * Fabric 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. */ import { mapValues } from '../runtime'; import type { WebhookLogStatus } from './WebhookLogStatus'; import { WebhookLogStatusFromJSON, WebhookLogStatusFromJSONTyped, WebhookLogStatusToJSON, WebhookLogStatusToJSONTyped, } from './WebhookLogStatus'; /** * * @export * @interface ExtractWebhookLogSummary */ export interface ExtractWebhookLogSummary { /** * * @type {string} * @memberof ExtractWebhookLogSummary */ 'id': string; /** * * @type {string} * @memberof ExtractWebhookLogSummary */ 'traceId': string; /** * * @type {number} * @memberof ExtractWebhookLogSummary */ 'attemptNumber': number; /** * * @type {WebhookLogStatus} * @memberof ExtractWebhookLogSummary */ 'status': WebhookLogStatus; /** * * @type {number} * @memberof ExtractWebhookLogSummary */ 'statusCode': number | null; /** * * @type {string} * @memberof ExtractWebhookLogSummary */ 'errorMessage': string | null; /** * * @type {Date} * @memberof ExtractWebhookLogSummary */ 'firedAt': Date | null; /** * * @type {Date} * @memberof ExtractWebhookLogSummary */ 'createdAt': Date; } /** * Check if a given object implements the ExtractWebhookLogSummary interface. */ export function instanceOfExtractWebhookLogSummary(value: object): value is ExtractWebhookLogSummary { if (!('id' in value) || value['id'] === undefined) return false; if (!('traceId' in value) || value['traceId'] === undefined) return false; if (!('attemptNumber' in value) || value['attemptNumber'] === undefined) return false; if (!('status' in value) || value['status'] === undefined) return false; if (!('statusCode' in value) || value['statusCode'] === undefined) return false; if (!('errorMessage' in value) || value['errorMessage'] === undefined) return false; if (!('firedAt' in value) || value['firedAt'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; return true; } export function ExtractWebhookLogSummaryFromJSON(json: any): ExtractWebhookLogSummary { return ExtractWebhookLogSummaryFromJSONTyped(json, false); } export function ExtractWebhookLogSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExtractWebhookLogSummary { if (json == null) { return json; } const result = { } as ExtractWebhookLogSummary; if (json['id'] !== undefined) { result['id'] = json['id']; } if (json['traceId'] !== undefined) { result['traceId'] = json['traceId']; } if (json['attemptNumber'] !== undefined) { result['attemptNumber'] = json['attemptNumber']; } if (json['status'] !== undefined) { result['status'] = WebhookLogStatusFromJSON(json['status']); } if (json['statusCode'] !== undefined) { if (json['statusCode'] === null) { result['statusCode'] = null; } else { result['statusCode'] = json['statusCode']; } } if (json['errorMessage'] !== undefined) { if (json['errorMessage'] === null) { result['errorMessage'] = null; } else { result['errorMessage'] = json['errorMessage']; } } if (json['firedAt'] !== undefined) { if (json['firedAt'] === null) { result['firedAt'] = null; } else { result['firedAt'] = new Date(json['firedAt']); } } if (json['createdAt'] !== undefined) { result['createdAt'] = new Date(json['createdAt']); } return result; } export function ExtractWebhookLogSummaryToJSON(json: any): ExtractWebhookLogSummary { return ExtractWebhookLogSummaryToJSONTyped(json, false); } export function ExtractWebhookLogSummaryToJSONTyped(value?: ExtractWebhookLogSummary | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'traceId': value['traceId'], 'attemptNumber': value['attemptNumber'], 'status': WebhookLogStatusToJSON(value['status']), 'statusCode': value['statusCode'], 'errorMessage': value['errorMessage'], 'firedAt': value['firedAt'] == null ? value['firedAt'] : value['firedAt'].toISOString(), 'createdAt': value['createdAt'].toISOString(), }; }