/* 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 { CreateProductCategoryRequestAutomationRulesInner } from './CreateProductCategoryRequestAutomationRulesInner'; import { CreateProductCategoryRequestAutomationRulesInnerFromJSON, CreateProductCategoryRequestAutomationRulesInnerFromJSONTyped, CreateProductCategoryRequestAutomationRulesInnerToJSON, CreateProductCategoryRequestAutomationRulesInnerToJSONTyped, } from './CreateProductCategoryRequestAutomationRulesInner'; /** * * @export * @interface PreviewAutomationRulesRequest */ export interface PreviewAutomationRulesRequest { /** * * @type {number} * @memberof PreviewAutomationRulesRequest */ siteId: number; /** * * @type {string} * @memberof PreviewAutomationRulesRequest */ automatedConditionType: PreviewAutomationRulesRequestAutomatedConditionTypeEnum; /** * * @type {Array} * @memberof PreviewAutomationRulesRequest */ automationRules: Array; } /** * @export */ export const PreviewAutomationRulesRequestAutomatedConditionTypeEnum = { And: 'and', Or: 'or' } as const; export type PreviewAutomationRulesRequestAutomatedConditionTypeEnum = typeof PreviewAutomationRulesRequestAutomatedConditionTypeEnum[keyof typeof PreviewAutomationRulesRequestAutomatedConditionTypeEnum]; /** * Check if a given object implements the PreviewAutomationRulesRequest interface. */ export function instanceOfPreviewAutomationRulesRequest(value: object): value is PreviewAutomationRulesRequest { if (!('siteId' in value) || value['siteId'] === undefined) return false; if (!('automatedConditionType' in value) || value['automatedConditionType'] === undefined) return false; if (!('automationRules' in value) || value['automationRules'] === undefined) return false; return true; } export function PreviewAutomationRulesRequestFromJSON(json: any): PreviewAutomationRulesRequest { return PreviewAutomationRulesRequestFromJSONTyped(json, false); } export function PreviewAutomationRulesRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreviewAutomationRulesRequest { if (json == null) { return json; } return { 'siteId': json['site_id'], 'automatedConditionType': json['automated_condition_type'], 'automationRules': ((json['automation_rules'] as Array).map(CreateProductCategoryRequestAutomationRulesInnerFromJSON)), }; } export function PreviewAutomationRulesRequestToJSON(json: any): PreviewAutomationRulesRequest { return PreviewAutomationRulesRequestToJSONTyped(json, false); } export function PreviewAutomationRulesRequestToJSONTyped(value?: PreviewAutomationRulesRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'site_id': value['siteId'], 'automated_condition_type': value['automatedConditionType'], 'automation_rules': ((value['automationRules'] as Array).map(CreateProductCategoryRequestAutomationRulesInnerToJSON)), }; }