/* 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 { SiteResource } from './SiteResource'; import { SiteResourceFromJSON, SiteResourceFromJSONTyped, SiteResourceToJSON, SiteResourceToJSONTyped, } from './SiteResource'; /** * * @export * @interface SiteNotificationResource */ export interface SiteNotificationResource { /** * * @type {number} * @memberof SiteNotificationResource */ id: number; /** * * @type {string} * @memberof SiteNotificationResource */ text: string; /** * * @type {string} * @memberof SiteNotificationResource */ startDate: string; /** * * @type {string} * @memberof SiteNotificationResource */ endDate: string; /** * * @type {string} * @memberof SiteNotificationResource */ backgroundColour: string; /** * * @type {string} * @memberof SiteNotificationResource */ textColour: string; /** * * @type {SiteResource} * @memberof SiteNotificationResource */ site: SiteResource | null; } /** * Check if a given object implements the SiteNotificationResource interface. */ export function instanceOfSiteNotificationResource(value: object): value is SiteNotificationResource { if (!('id' in value) || value['id'] === undefined) return false; if (!('text' in value) || value['text'] === undefined) return false; if (!('startDate' in value) || value['startDate'] === undefined) return false; if (!('endDate' in value) || value['endDate'] === undefined) return false; if (!('backgroundColour' in value) || value['backgroundColour'] === undefined) return false; if (!('textColour' in value) || value['textColour'] === undefined) return false; if (!('site' in value) || value['site'] === undefined) return false; return true; } export function SiteNotificationResourceFromJSON(json: any): SiteNotificationResource { return SiteNotificationResourceFromJSONTyped(json, false); } export function SiteNotificationResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteNotificationResource { if (json == null) { return json; } return { 'id': json['id'], 'text': json['text'], 'startDate': json['startDate'], 'endDate': json['endDate'], 'backgroundColour': json['backgroundColour'], 'textColour': json['textColour'], 'site': SiteResourceFromJSON(json['site']), }; } export function SiteNotificationResourceToJSON(json: any): SiteNotificationResource { return SiteNotificationResourceToJSONTyped(json, false); } export function SiteNotificationResourceToJSONTyped(value?: SiteNotificationResource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'text': value['text'], 'startDate': value['startDate'], 'endDate': value['endDate'], 'backgroundColour': value['backgroundColour'], 'textColour': value['textColour'], 'site': SiteResourceToJSON(value['site']), }; }