/* 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 CreateScopedApiKeyRequest */ export interface CreateScopedApiKeyRequest { /** * * @type {string} * @memberof CreateScopedApiKeyRequest */ name?: string; /** * Duration such as 90d, 24h, or seconds. Max 365d. * @type {string} * @memberof CreateScopedApiKeyRequest */ ttl?: string; /** * * @type {CreateScopedApiKeyRequestPresetEnum} * @memberof CreateScopedApiKeyRequest */ preset?: CreateScopedApiKeyRequestPresetEnum; /** * * @type {Array} * @memberof CreateScopedApiKeyRequest */ actions?: Array; /** * * @type {Array} * @memberof CreateScopedApiKeyRequest */ boxIds?: Array; /** * * @type {Array} * @memberof CreateScopedApiKeyRequest */ environmentIds?: Array; } /** * @export */ export const CreateScopedApiKeyRequestPresetEnum = { ReadOnly: 'read-only', FullBox: 'full-box', Ci: 'ci', Admin: 'admin' } as const; export type CreateScopedApiKeyRequestPresetEnum = typeof CreateScopedApiKeyRequestPresetEnum[keyof typeof CreateScopedApiKeyRequestPresetEnum]; /** * Check if a given object implements the CreateScopedApiKeyRequest interface. */ export function instanceOfCreateScopedApiKeyRequest(value: object): value is CreateScopedApiKeyRequest { return true; } export function CreateScopedApiKeyRequestFromJSON(json: any): CreateScopedApiKeyRequest { return CreateScopedApiKeyRequestFromJSONTyped(json, false); } export function CreateScopedApiKeyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateScopedApiKeyRequest { if (json == null) { return json; } return { 'name': json['name'] == null ? undefined : json['name'], 'ttl': json['ttl'] == null ? undefined : json['ttl'], 'preset': json['preset'] == null ? undefined : json['preset'], 'actions': json['actions'] == null ? undefined : json['actions'], 'boxIds': json['boxIds'] == null ? undefined : json['boxIds'], 'environmentIds': json['environmentIds'] == null ? undefined : json['environmentIds'], }; } export function CreateScopedApiKeyRequestToJSON(json: any): CreateScopedApiKeyRequest { return CreateScopedApiKeyRequestToJSONTyped(json, false); } export function CreateScopedApiKeyRequestToJSONTyped(value?: CreateScopedApiKeyRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'ttl': value['ttl'], 'preset': value['preset'], 'actions': value['actions'], 'boxIds': value['boxIds'], 'environmentIds': value['environmentIds'], }; }