Files
recipes/vue3/src/openapi/models/AutomationRequest.ts
2024-03-30 11:01:37 +01:00

125 lines
3.0 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.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 { AutomationTypeEnum } from './AutomationTypeEnum';
import {
AutomationTypeEnumFromJSON,
AutomationTypeEnumFromJSONTyped,
AutomationTypeEnumToJSON,
} from './AutomationTypeEnum';
/**
*
* @export
* @interface AutomationRequest
*/
export interface AutomationRequest {
/**
*
* @type {AutomationTypeEnum}
* @memberof AutomationRequest
*/
type: AutomationTypeEnum;
/**
*
* @type {string}
* @memberof AutomationRequest
*/
name?: string;
/**
*
* @type {string}
* @memberof AutomationRequest
*/
description?: string;
/**
*
* @type {string}
* @memberof AutomationRequest
*/
param1?: string;
/**
*
* @type {string}
* @memberof AutomationRequest
*/
param2?: string;
/**
*
* @type {string}
* @memberof AutomationRequest
*/
param3?: string;
/**
*
* @type {number}
* @memberof AutomationRequest
*/
order?: number;
/**
*
* @type {boolean}
* @memberof AutomationRequest
*/
disabled?: boolean;
}
/**
* Check if a given object implements the AutomationRequest interface.
*/
export function instanceOfAutomationRequest(value: object): boolean {
if (!('type' in value)) return false;
return true;
}
export function AutomationRequestFromJSON(json: any): AutomationRequest {
return AutomationRequestFromJSONTyped(json, false);
}
export function AutomationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutomationRequest {
if (json == null) {
return json;
}
return {
'type': AutomationTypeEnumFromJSON(json['type']),
'name': json['name'] == null ? undefined : json['name'],
'description': json['description'] == null ? undefined : json['description'],
'param1': json['param_1'] == null ? undefined : json['param_1'],
'param2': json['param_2'] == null ? undefined : json['param_2'],
'param3': json['param_3'] == null ? undefined : json['param_3'],
'order': json['order'] == null ? undefined : json['order'],
'disabled': json['disabled'] == null ? undefined : json['disabled'],
};
}
export function AutomationRequestToJSON(value?: AutomationRequest | null): any {
if (value == null) {
return value;
}
return {
'type': AutomationTypeEnumToJSON(value['type']),
'name': value['name'],
'description': value['description'],
'param_1': value['param1'],
'param_2': value['param2'],
'param_3': value['param3'],
'order': value['order'],
'disabled': value['disabled'],
};
}