/* tslint:disable */ /* eslint-disable */ /** * Boat Public API v1 * Public JSON API for creating, operating, prompting, observing, and exposing Boat sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1. * * 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'; /** * * @export * @interface ApiKeyRequestUsage */ export interface ApiKeyRequestUsage { /** * Requests authenticated with this key during the current UTC day and the previous 29 UTC days. * @type {number} * @memberof ApiKeyRequestUsage */ requests: number; /** * * @type {ApiKeyRequestUsageWindowDaysEnum} * @memberof ApiKeyRequestUsage */ windowDays: ApiKeyRequestUsageWindowDaysEnum; } /** * @export */ export const ApiKeyRequestUsageWindowDaysEnum = { NUMBER_30: 30 } as const; export type ApiKeyRequestUsageWindowDaysEnum = typeof ApiKeyRequestUsageWindowDaysEnum[keyof typeof ApiKeyRequestUsageWindowDaysEnum]; /** * Check if a given object implements the ApiKeyRequestUsage interface. */ export function instanceOfApiKeyRequestUsage(value: object): value is ApiKeyRequestUsage { if (!('requests' in value) || value['requests'] === undefined) return false; if (!('windowDays' in value) || value['windowDays'] === undefined) return false; return true; } export function ApiKeyRequestUsageFromJSON(json: any): ApiKeyRequestUsage { return ApiKeyRequestUsageFromJSONTyped(json, false); } export function ApiKeyRequestUsageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKeyRequestUsage { if (json == null) { return json; } return { 'requests': json['requests'], 'windowDays': json['windowDays'], }; } export function ApiKeyRequestUsageToJSON(json: any): ApiKeyRequestUsage { return ApiKeyRequestUsageToJSONTyped(json, false); } export function ApiKeyRequestUsageToJSONTyped(value?: ApiKeyRequestUsage | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'requests': value['requests'], 'windowDays': value['windowDays'], }; }