/* 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 { ProductRegistrationCustomerLiteResource } from './ProductRegistrationCustomerLiteResource'; import { ProductRegistrationCustomerLiteResourceFromJSON, ProductRegistrationCustomerLiteResourceFromJSONTyped, ProductRegistrationCustomerLiteResourceToJSON, ProductRegistrationCustomerLiteResourceToJSONTyped, } from './ProductRegistrationCustomerLiteResource'; /** * * @export * @interface ProductRegistrationListResource */ export interface ProductRegistrationListResource { /** * * @type {number} * @memberof ProductRegistrationListResource */ id?: number | null; /** * * @type {Date} * @memberof ProductRegistrationListResource */ purchasedDate: Date; /** * * @type {ProductRegistrationCustomerLiteResource} * @memberof ProductRegistrationListResource */ customer: ProductRegistrationCustomerLiteResource | null; /** * * @type {number} * @memberof ProductRegistrationListResource */ productChildrenCount: number; /** * * @type {Date} * @memberof ProductRegistrationListResource */ createdAt?: Date | null; } /** * Check if a given object implements the ProductRegistrationListResource interface. */ export function instanceOfProductRegistrationListResource(value: object): value is ProductRegistrationListResource { if (!('purchasedDate' in value) || value['purchasedDate'] === undefined) return false; if (!('customer' in value) || value['customer'] === undefined) return false; if (!('productChildrenCount' in value) || value['productChildrenCount'] === undefined) return false; return true; } export function ProductRegistrationListResourceFromJSON(json: any): ProductRegistrationListResource { return ProductRegistrationListResourceFromJSONTyped(json, false); } export function ProductRegistrationListResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductRegistrationListResource { if (json == null) { return json; } return { 'id': json['id'] == null ? undefined : json['id'], 'purchasedDate': (new Date(json['purchasedDate'])), 'customer': ProductRegistrationCustomerLiteResourceFromJSON(json['customer']), 'productChildrenCount': json['productChildrenCount'], 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])), }; } export function ProductRegistrationListResourceToJSON(json: any): ProductRegistrationListResource { return ProductRegistrationListResourceToJSONTyped(json, false); } export function ProductRegistrationListResourceToJSONTyped(value?: ProductRegistrationListResource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'purchasedDate': ((value['purchasedDate']).toISOString()), 'customer': ProductRegistrationCustomerLiteResourceToJSON(value['customer']), 'productChildrenCount': value['productChildrenCount'], 'createdAt': value['createdAt'] === null ? null : ((value['createdAt'] as any)?.toISOString()), }; }