UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
102 lines (87 loc) 2.99 kB
/* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API [![status](https://status.asknews.app/api/badge/2/status?style=for-the-badge)](https://status.asknews.app/status/prod) * * The version of the OpenAPI document: 0.24.22 * Contact: contact@emergentmethods.ai * * 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 { OrganizationProfileSubscription } from './OrganizationProfileSubscription'; import { OrganizationProfileSubscriptionFromJSON, OrganizationProfileSubscriptionFromJSONTyped, OrganizationProfileSubscriptionToJSON, OrganizationProfileSubscriptionToJSONTyped, } from './OrganizationProfileSubscription'; /** * * @export * @interface OrganizationProfile */ export interface OrganizationProfile { /** * * @type {string} * @memberof OrganizationProfile */ identityType?: OrganizationProfileIdentityTypeEnum; /** * * @type {string} * @memberof OrganizationProfile */ id: string; /** * * @type {OrganizationProfileSubscription} * @memberof OrganizationProfile */ subscription: OrganizationProfileSubscription; } /** * @export */ export const OrganizationProfileIdentityTypeEnum = { Organization: 'organization' } as const; export type OrganizationProfileIdentityTypeEnum = typeof OrganizationProfileIdentityTypeEnum[keyof typeof OrganizationProfileIdentityTypeEnum]; /** * Check if a given object implements the OrganizationProfile interface. */ export function instanceOfOrganizationProfile(value: object): value is OrganizationProfile { if (!('id' in value) || value['id'] === undefined) return false; if (!('subscription' in value) || value['subscription'] === undefined) return false; return true; } export function OrganizationProfileFromJSON(json: any): OrganizationProfile { return OrganizationProfileFromJSONTyped(json, false); } export function OrganizationProfileFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationProfile { if (json == null) { return json; } return { 'identityType': json['identity_type'] == null ? undefined : json['identity_type'], 'id': json['id'], 'subscription': OrganizationProfileSubscriptionFromJSON(json['subscription']), }; } export function OrganizationProfileToJSON(json: any): OrganizationProfile { return OrganizationProfileToJSONTyped(json, false); } export function OrganizationProfileToJSONTyped(value?: OrganizationProfile | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'identity_type': value['identityType'], 'id': value['id'], 'subscription': OrganizationProfileSubscriptionToJSON(value['subscription']), }; }