/* 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'; import type { ApiKeyCatalogScopeResources } from './ApiKeyCatalogScopeResources'; import { ApiKeyCatalogScopeResourcesFromJSON, ApiKeyCatalogScopeResourcesFromJSONTyped, ApiKeyCatalogScopeResourcesToJSON, ApiKeyCatalogScopeResourcesToJSONTyped, } from './ApiKeyCatalogScopeResources'; /** * * @export * @interface ApiKeyCatalog */ export interface ApiKeyCatalog { /** * * @type {Array} * @memberof ApiKeyCatalog */ actions: Array; /** * * @type {{ [key: string]: Array; }} * @memberof ApiKeyCatalog */ presets: { [key: string]: Array; }; /** * * @type {string} * @memberof ApiKeyCatalog */ defaultTtl: string; /** * * @type {string} * @memberof ApiKeyCatalog */ maxTtl: string; /** * Whether POST /api-keys/scoped currently accepts creation requests. * @type {boolean} * @memberof ApiKeyCatalog */ scopedCreationEnabled: boolean; /** * * @type {ApiKeyCatalogScopeResources} * @memberof ApiKeyCatalog */ scopeResources?: ApiKeyCatalogScopeResources; } /** * Check if a given object implements the ApiKeyCatalog interface. */ export function instanceOfApiKeyCatalog(value: object): value is ApiKeyCatalog { if (!('actions' in value) || value['actions'] === undefined) return false; if (!('presets' in value) || value['presets'] === undefined) return false; if (!('defaultTtl' in value) || value['defaultTtl'] === undefined) return false; if (!('maxTtl' in value) || value['maxTtl'] === undefined) return false; if (!('scopedCreationEnabled' in value) || value['scopedCreationEnabled'] === undefined) return false; return true; } export function ApiKeyCatalogFromJSON(json: any): ApiKeyCatalog { return ApiKeyCatalogFromJSONTyped(json, false); } export function ApiKeyCatalogFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKeyCatalog { if (json == null) { return json; } return { 'actions': json['actions'], 'presets': json['presets'], 'defaultTtl': json['defaultTtl'], 'maxTtl': json['maxTtl'], 'scopedCreationEnabled': json['scopedCreationEnabled'], 'scopeResources': json['scopeResources'] == null ? undefined : ApiKeyCatalogScopeResourcesFromJSON(json['scopeResources']), }; } export function ApiKeyCatalogToJSON(json: any): ApiKeyCatalog { return ApiKeyCatalogToJSONTyped(json, false); } export function ApiKeyCatalogToJSONTyped(value?: ApiKeyCatalog | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'actions': value['actions'], 'presets': value['presets'], 'defaultTtl': value['defaultTtl'], 'maxTtl': value['maxTtl'], 'scopedCreationEnabled': value['scopedCreationEnabled'], 'scopeResources': ApiKeyCatalogScopeResourcesToJSON(value['scopeResources']), }; }