/* 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 { ApiKeyScopeBoxes } from './ApiKeyScopeBoxes'; import { ApiKeyScopeBoxesFromJSON, ApiKeyScopeBoxesFromJSONTyped, ApiKeyScopeBoxesToJSON, ApiKeyScopeBoxesToJSONTyped, } from './ApiKeyScopeBoxes'; /** * * @export * @interface ApiKeyScope */ export interface ApiKeyScope { /** * * @type {Date} * @memberof ApiKeyScope */ expiresAt?: Date | null; /** * * @type {Array} * @memberof ApiKeyScope */ actions?: Array; /** * * @type {ApiKeyScopeBoxes} * @memberof ApiKeyScope */ boxes?: ApiKeyScopeBoxes; /** * * @type {ApiKeyScopeBoxes} * @memberof ApiKeyScope */ environments?: ApiKeyScopeBoxes; /** * * @type {boolean} * @memberof ApiKeyScope */ grandfathered?: boolean; } /** * Check if a given object implements the ApiKeyScope interface. */ export function instanceOfApiKeyScope(value: object): value is ApiKeyScope { return true; } export function ApiKeyScopeFromJSON(json: any): ApiKeyScope { return ApiKeyScopeFromJSONTyped(json, false); } export function ApiKeyScopeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKeyScope { if (json == null) { return json; } return { 'expiresAt': json['expiresAt'] == null ? undefined : (new Date(json['expiresAt'])), 'actions': json['actions'] == null ? undefined : json['actions'], 'boxes': json['boxes'] == null ? undefined : ApiKeyScopeBoxesFromJSON(json['boxes']), 'environments': json['environments'] == null ? undefined : ApiKeyScopeBoxesFromJSON(json['environments']), 'grandfathered': json['grandfathered'] == null ? undefined : json['grandfathered'], }; } export function ApiKeyScopeToJSON(json: any): ApiKeyScope { return ApiKeyScopeToJSONTyped(json, false); } export function ApiKeyScopeToJSONTyped(value?: ApiKeyScope | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'expiresAt': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(), 'actions': value['actions'], 'boxes': ApiKeyScopeBoxesToJSON(value['boxes']), 'environments': ApiKeyScopeBoxesToJSON(value['environments']), 'grandfathered': value['grandfathered'], }; }