/* tslint:disable */ /* eslint-disable */ /** * authentik Blueprint Registry * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: * Contact: hello@goauthentik.io * * 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 { BlueprintVersion } from './BlueprintVersion'; import { BlueprintVersionFromJSON, BlueprintVersionFromJSONTyped, BlueprintVersionToJSON, BlueprintVersionToJSONTyped, } from './BlueprintVersion'; import type { Organization } from './Organization'; import { OrganizationFromJSON, OrganizationFromJSONTyped, OrganizationToJSON, OrganizationToJSONTyped, } from './Organization'; import type { User } from './User'; import { UserFromJSON, UserFromJSONTyped, UserToJSON, UserToJSONTyped, } from './User'; /** * * @export * @interface Blueprint */ export interface Blueprint { /** * * @type {number} * @memberof Blueprint */ readonly id: number; /** * * @type {string} * @memberof Blueprint */ ownerOrg?: string | null; /** * * @type {Organization} * @memberof Blueprint */ ownerOrgObj: Organization; /** * * @type {string} * @memberof Blueprint */ ownerUser?: string | null; /** * * @type {User} * @memberof Blueprint */ ownerUserObj: User; /** * * @type {string} * @memberof Blueprint */ slug: string; /** * * @type {string} * @memberof Blueprint */ summary?: string; /** * * @type {BlueprintVersion} * @memberof Blueprint */ latestVersion?: BlueprintVersion; /** * * @type {Array} * @memberof Blueprint */ tags: Array; } /** * Check if a given object implements the Blueprint interface. */ export function instanceOfBlueprint(value: object): value is Blueprint { if (!('id' in value) || value['id'] === undefined) return false; if (!('ownerOrgObj' in value) || value['ownerOrgObj'] === undefined) return false; if (!('ownerUserObj' in value) || value['ownerUserObj'] === undefined) return false; if (!('slug' in value) || value['slug'] === undefined) return false; if (!('tags' in value) || value['tags'] === undefined) return false; return true; } export function BlueprintFromJSON(json: any): Blueprint { return BlueprintFromJSONTyped(json, false); } export function BlueprintFromJSONTyped(json: any, ignoreDiscriminator: boolean): Blueprint { if (json == null) { return json; } return { 'id': json['id'], 'ownerOrg': json['owner_org'] == null ? undefined : json['owner_org'], 'ownerOrgObj': OrganizationFromJSON(json['owner_org_obj']), 'ownerUser': json['owner_user'] == null ? undefined : json['owner_user'], 'ownerUserObj': UserFromJSON(json['owner_user_obj']), 'slug': json['slug'], 'summary': json['summary'] == null ? undefined : json['summary'], 'latestVersion': json['latest_version'] == null ? undefined : BlueprintVersionFromJSON(json['latest_version']), 'tags': json['tags'], }; } export function BlueprintToJSON(json: any): Blueprint { return BlueprintToJSONTyped(json, false); } export function BlueprintToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'owner_org': value['ownerOrg'], 'owner_org_obj': OrganizationToJSON(value['ownerOrgObj']), 'owner_user': value['ownerUser'], 'owner_user_obj': UserToJSON(value['ownerUserObj']), 'slug': value['slug'], 'summary': value['summary'], 'latest_version': BlueprintVersionToJSON(value['latestVersion']), 'tags': value['tags'], }; }