/* 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'; /** * * @export * @interface CreateSiteNotificationRequest */ export interface CreateSiteNotificationRequest { /** * * @type {number} * @memberof CreateSiteNotificationRequest */ siteId: number; /** * * @type {string} * @memberof CreateSiteNotificationRequest */ text: string; /** * * @type {Date} * @memberof CreateSiteNotificationRequest */ startDate: Date; /** * * @type {Date} * @memberof CreateSiteNotificationRequest */ endDate: Date; /** * * @type {string} * @memberof CreateSiteNotificationRequest */ backgroundColour: string; /** * * @type {string} * @memberof CreateSiteNotificationRequest */ textColour: string; } /** * Check if a given object implements the CreateSiteNotificationRequest interface. */ export function instanceOfCreateSiteNotificationRequest(value: object): value is CreateSiteNotificationRequest { if (!('siteId' in value) || value['siteId'] === 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; return true; } export function CreateSiteNotificationRequestFromJSON(json: any): CreateSiteNotificationRequest { return CreateSiteNotificationRequestFromJSONTyped(json, false); } export function CreateSiteNotificationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSiteNotificationRequest { if (json == null) { return json; } return { 'siteId': json['site_id'], 'text': json['text'], 'startDate': (new Date(json['start_date'])), 'endDate': (new Date(json['end_date'])), 'backgroundColour': json['background_colour'], 'textColour': json['text_colour'], }; } export function CreateSiteNotificationRequestToJSON(json: any): CreateSiteNotificationRequest { return CreateSiteNotificationRequestToJSONTyped(json, false); } export function CreateSiteNotificationRequestToJSONTyped(value?: CreateSiteNotificationRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'site_id': value['siteId'], 'text': value['text'], 'start_date': ((value['startDate']).toISOString()), 'end_date': ((value['endDate']).toISOString()), 'background_colour': value['backgroundColour'], 'text_colour': value['textColour'], }; }