/* tslint:disable */ /* eslint-disable */ /** * My API * API documentation for my Laravel app * * 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 { SiteLiteResource } from './SiteLiteResource'; import { SiteLiteResourceFromJSON, SiteLiteResourceFromJSONTyped, SiteLiteResourceToJSON, SiteLiteResourceToJSONTyped, } from './SiteLiteResource'; /** * * @export * @interface SiteNotificationListResource */ export interface SiteNotificationListResource { /** * * @type {number} * @memberof SiteNotificationListResource */ id: number; /** * * @type {string} * @memberof SiteNotificationListResource */ heading?: string | null; /** * * @type {string} * @memberof SiteNotificationListResource */ type?: string | null; /** * * @type {boolean} * @memberof SiteNotificationListResource */ isActive: boolean; /** * * @type {string} * @memberof SiteNotificationListResource */ startDate: string; /** * * @type {string} * @memberof SiteNotificationListResource */ endDate: string; /** * * @type {string} * @memberof SiteNotificationListResource */ text: string; /** * * @type {string} * @memberof SiteNotificationListResource */ textColour: string; /** * * @type {string} * @memberof SiteNotificationListResource */ backgroundColour: string; /** * * @type {SiteLiteResource} * @memberof SiteNotificationListResource */ sites: SiteLiteResource | null; } /** * Check if a given object implements the SiteNotificationListResource interface. */ export function instanceOfSiteNotificationListResource(value: object): value is SiteNotificationListResource { if (!('id' in value) || value['id'] === undefined) return false; if (!('isActive' in value) || value['isActive'] === undefined) return false; if (!('startDate' in value) || value['startDate'] === undefined) return false; if (!('endDate' in value) || value['endDate'] === undefined) return false; if (!('text' in value) || value['text'] === undefined) return false; if (!('textColour' in value) || value['textColour'] === undefined) return false; if (!('backgroundColour' in value) || value['backgroundColour'] === undefined) return false; if (!('sites' in value) || value['sites'] === undefined) return false; return true; } export function SiteNotificationListResourceFromJSON(json: any): SiteNotificationListResource { return SiteNotificationListResourceFromJSONTyped(json, false); } export function SiteNotificationListResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteNotificationListResource { if (json == null) { return json; } return { 'id': json['id'], 'heading': json['heading'] == null ? undefined : json['heading'], 'type': json['type'] == null ? undefined : json['type'], 'isActive': json['isActive'], 'startDate': json['startDate'], 'endDate': json['endDate'], 'text': json['text'], 'textColour': json['textColour'], 'backgroundColour': json['backgroundColour'], 'sites': SiteLiteResourceFromJSON(json['sites']), }; } export function SiteNotificationListResourceToJSON(json: any): SiteNotificationListResource { return SiteNotificationListResourceToJSONTyped(json, false); } export function SiteNotificationListResourceToJSONTyped(value?: SiteNotificationListResource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'heading': value['heading'], 'type': value['type'], 'isActive': value['isActive'], 'startDate': value['startDate'], 'endDate': value['endDate'], 'text': value['text'], 'textColour': value['textColour'], 'backgroundColour': value['backgroundColour'], 'sites': SiteLiteResourceToJSON(value['sites']), }; }