originstamp-client-fetch
Version:
TypeScript Fetch client for the OriginStamp service
102 lines (90 loc) • 3.62 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* OriginStamp Timestamping
* OriginStamp Timestamping leverages decentralized blockchain technology to create anonymous, tamper-proof timestamps for digital content. This service enables users to timestamp files, emails, or plain text, and store the resulting hashes on the blockchain. Users can also retrieve and verify timestamps that have been committed. The trusted timestamping mechanism ensures that a hash fingerprint can be generated and used as proof that specific data existed at a given point in time.
*
* The version of the OpenAPI document: 1.0.0
* Contact: support@originstamp.com
*
* 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 { KeyUsageResponseReportsInner } from './KeyUsageResponseReportsInner';
import {
KeyUsageResponseReportsInnerFromJSON,
KeyUsageResponseReportsInnerFromJSONTyped,
KeyUsageResponseReportsInnerToJSON,
KeyUsageResponseReportsInnerToJSONTyped,
} from './KeyUsageResponseReportsInner';
/**
* Usage metric for requested time period and current limits.
* @export
* @interface KeyUsageResponse
*/
export interface KeyUsageResponse {
/**
* Total number of timestamp requests available per month.
* @type {number}
* @memberof KeyUsageResponse
*/
limitTimestamps: number;
/**
* Total number of proof requests available per month.
* @type {number}
* @memberof KeyUsageResponse
*/
limitProofs: number;
/**
* Total number of status requests available per month.
* @type {number}
* @memberof KeyUsageResponse
*/
limitStatus: number;
/**
*
* @type {Array<KeyUsageResponseReportsInner>}
* @memberof KeyUsageResponse
*/
reports: Array<KeyUsageResponseReportsInner>;
}
/**
* Check if a given object implements the KeyUsageResponse interface.
*/
export function instanceOfKeyUsageResponse(value: object): value is KeyUsageResponse {
if (!('limitTimestamps' in value) || value['limitTimestamps'] === undefined) return false;
if (!('limitProofs' in value) || value['limitProofs'] === undefined) return false;
if (!('limitStatus' in value) || value['limitStatus'] === undefined) return false;
if (!('reports' in value) || value['reports'] === undefined) return false;
return true;
}
export function KeyUsageResponseFromJSON(json: any): KeyUsageResponse {
return KeyUsageResponseFromJSONTyped(json, false);
}
export function KeyUsageResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyUsageResponse {
if (json == null) {
return json;
}
return {
'limitTimestamps': json['limitTimestamps'],
'limitProofs': json['limitProofs'],
'limitStatus': json['limitStatus'],
'reports': ((json['reports'] as Array<any>).map(KeyUsageResponseReportsInnerFromJSON)),
};
}
export function KeyUsageResponseToJSON(json: any): KeyUsageResponse {
return KeyUsageResponseToJSONTyped(json, false);
}
export function KeyUsageResponseToJSONTyped(value?: KeyUsageResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'limitTimestamps': value['limitTimestamps'],
'limitProofs': value['limitProofs'],
'limitStatus': value['limitStatus'],
'reports': ((value['reports'] as Array<any>).map(KeyUsageResponseReportsInnerToJSON)),
};
}