/* 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 UpdateSiteNotificationRequest */ export interface UpdateSiteNotificationRequest { /** * * @type {string} * @memberof UpdateSiteNotificationRequest */ text: string; /** * * @type {Date} * @memberof UpdateSiteNotificationRequest */ startDate: Date; /** * * @type {Date} * @memberof UpdateSiteNotificationRequest */ endDate: Date; /** * * @type {string} * @memberof UpdateSiteNotificationRequest */ backgroundColour: string; /** * * @type {string} * @memberof UpdateSiteNotificationRequest */ textColour: string; } /** * Check if a given object implements the UpdateSiteNotificationRequest interface. */ export function instanceOfUpdateSiteNotificationRequest(value: object): value is UpdateSiteNotificationRequest { 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 UpdateSiteNotificationRequestFromJSON(json: any): UpdateSiteNotificationRequest { return UpdateSiteNotificationRequestFromJSONTyped(json, false); } export function UpdateSiteNotificationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSiteNotificationRequest { if (json == null) { return json; } return { '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 UpdateSiteNotificationRequestToJSON(json: any): UpdateSiteNotificationRequest { return UpdateSiteNotificationRequestToJSONTyped(json, false); } export function UpdateSiteNotificationRequestToJSONTyped(value?: UpdateSiteNotificationRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'text': value['text'], 'start_date': ((value['startDate']).toISOString()), 'end_date': ((value['endDate']).toISOString()), 'background_colour': value['backgroundColour'], 'text_colour': value['textColour'], }; }