forked from loafle/openapi-generator-original
[typescript-fetch] Fix ToJSON for non-descriminator oneOf constructs (#12513)
* [typescript-fetch] Fix ToJSON for non-descriminator oneOf constructs * [typescript-fetch] Update samples for oneOf fix
This commit is contained in:
parent
a00ae4631d
commit
ef583c53dd
@ -20,6 +20,20 @@ import {
|
|||||||
{{/discriminator}}
|
{{/discriminator}}
|
||||||
{{>modelGenericInterfaces}}
|
{{>modelGenericInterfaces}}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the {{classname}} interface.
|
||||||
|
*/
|
||||||
|
export function instanceOf{{classname}}(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
{{#vars}}
|
||||||
|
{{#required}}
|
||||||
|
isInstance = isInstance && "{{name}}" in value;
|
||||||
|
{{/required}}
|
||||||
|
{{/vars}}
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function {{classname}}FromJSON(json: any): {{classname}} {
|
export function {{classname}}FromJSON(json: any): {{classname}} {
|
||||||
return {{classname}}FromJSONTyped(json, false);
|
return {{classname}}FromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
{{#oneOf}}
|
{{#oneOf}}
|
||||||
import {
|
import {
|
||||||
{{{.}}},
|
{{{.}}},
|
||||||
|
instanceOf{{{.}}},
|
||||||
{{{.}}}FromJSON,
|
{{{.}}}FromJSON,
|
||||||
{{{.}}}FromJSONTyped,
|
{{{.}}}FromJSONTyped,
|
||||||
{{{.}}}ToJSON,
|
{{{.}}}ToJSON,
|
||||||
@ -51,7 +52,14 @@ export function {{classname}}ToJSON(value?: {{classname}} | null): any {
|
|||||||
throw new Error(`No variant of {{classname}} exists with '{{discriminator.propertyName}}=${value['{{discriminator.propertyName}}']}'`);
|
throw new Error(`No variant of {{classname}} exists with '{{discriminator.propertyName}}=${value['{{discriminator.propertyName}}']}'`);
|
||||||
}
|
}
|
||||||
{{/discriminator}}
|
{{/discriminator}}
|
||||||
|
|
||||||
{{^discriminator}}
|
{{^discriminator}}
|
||||||
return { {{#oneOf}}...{{{.}}}ToJSON(value){{^-last}}, {{/-last}}{{/oneOf}} };
|
{{#oneOf}}
|
||||||
|
if (instanceOf{{{.}}}(value)) {
|
||||||
|
return {{{.}}}ToJSON(value as {{{.}}});
|
||||||
|
}
|
||||||
|
{{/oneOf}}
|
||||||
|
|
||||||
|
return {};
|
||||||
{{/discriminator}}
|
{{/discriminator}}
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface AdditionalPropertiesClass {
|
|||||||
mapOfMapProperty?: { [key: string]: { [key: string]: string; }; };
|
mapOfMapProperty?: { [key: string]: { [key: string]: string; }; };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the AdditionalPropertiesClass interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfAdditionalPropertiesClass(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function AdditionalPropertiesClassFromJSON(json: any): AdditionalPropertiesClass {
|
export function AdditionalPropertiesClassFromJSON(json: any): AdditionalPropertiesClass {
|
||||||
return AdditionalPropertiesClassFromJSONTyped(json, false);
|
return AdditionalPropertiesClassFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,15 @@ export interface AllOfWithSingleRef {
|
|||||||
singleRefType?: SingleRefType | null;
|
singleRefType?: SingleRefType | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the AllOfWithSingleRef interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfAllOfWithSingleRef(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function AllOfWithSingleRefFromJSON(json: any): AllOfWithSingleRef {
|
export function AllOfWithSingleRefFromJSON(json: any): AllOfWithSingleRef {
|
||||||
return AllOfWithSingleRefFromJSONTyped(json, false);
|
return AllOfWithSingleRefFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,16 @@ export interface Animal {
|
|||||||
color?: string;
|
color?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Animal interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfAnimal(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "className" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function AnimalFromJSON(json: any): Animal {
|
export function AnimalFromJSON(json: any): Animal {
|
||||||
return AnimalFromJSONTyped(json, false);
|
return AnimalFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,15 @@ export interface ArrayOfArrayOfNumberOnly {
|
|||||||
arrayArrayNumber?: Array<Array<number>>;
|
arrayArrayNumber?: Array<Array<number>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ArrayOfArrayOfNumberOnly interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfArrayOfArrayOfNumberOnly(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ArrayOfArrayOfNumberOnlyFromJSON(json: any): ArrayOfArrayOfNumberOnly {
|
export function ArrayOfArrayOfNumberOnlyFromJSON(json: any): ArrayOfArrayOfNumberOnly {
|
||||||
return ArrayOfArrayOfNumberOnlyFromJSONTyped(json, false);
|
return ArrayOfArrayOfNumberOnlyFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,15 @@ export interface ArrayOfNumberOnly {
|
|||||||
arrayNumber?: Array<number>;
|
arrayNumber?: Array<number>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ArrayOfNumberOnly interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfArrayOfNumberOnly(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ArrayOfNumberOnlyFromJSON(json: any): ArrayOfNumberOnly {
|
export function ArrayOfNumberOnlyFromJSON(json: any): ArrayOfNumberOnly {
|
||||||
return ArrayOfNumberOnlyFromJSONTyped(json, false);
|
return ArrayOfNumberOnlyFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,15 @@ export interface ArrayTest {
|
|||||||
arrayArrayOfModel?: Array<Array<ReadOnlyFirst>>;
|
arrayArrayOfModel?: Array<Array<ReadOnlyFirst>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ArrayTest interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfArrayTest(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ArrayTestFromJSON(json: any): ArrayTest {
|
export function ArrayTestFromJSON(json: any): ArrayTest {
|
||||||
return ArrayTestFromJSONTyped(json, false);
|
return ArrayTestFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,15 @@ export interface Capitalization {
|
|||||||
aTTNAME?: string;
|
aTTNAME?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Capitalization interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfCapitalization(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function CapitalizationFromJSON(json: any): Capitalization {
|
export function CapitalizationFromJSON(json: any): Capitalization {
|
||||||
return CapitalizationFromJSONTyped(json, false);
|
return CapitalizationFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,15 @@ export interface Cat extends Animal {
|
|||||||
declawed?: boolean;
|
declawed?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Cat interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfCat(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function CatFromJSON(json: any): Cat {
|
export function CatFromJSON(json: any): Cat {
|
||||||
return CatFromJSONTyped(json, false);
|
return CatFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,15 @@ export interface CatAllOf {
|
|||||||
declawed?: boolean;
|
declawed?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the CatAllOf interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfCatAllOf(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function CatAllOfFromJSON(json: any): CatAllOf {
|
export function CatAllOfFromJSON(json: any): CatAllOf {
|
||||||
return CatAllOfFromJSONTyped(json, false);
|
return CatAllOfFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,16 @@ export interface Category {
|
|||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Category interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfCategory(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "name" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function CategoryFromJSON(json: any): Category {
|
export function CategoryFromJSON(json: any): Category {
|
||||||
return CategoryFromJSONTyped(json, false);
|
return CategoryFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,15 @@ export interface ClassModel {
|
|||||||
_class?: string;
|
_class?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ClassModel interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfClassModel(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ClassModelFromJSON(json: any): ClassModel {
|
export function ClassModelFromJSON(json: any): ClassModel {
|
||||||
return ClassModelFromJSONTyped(json, false);
|
return ClassModelFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,15 @@ export interface Client {
|
|||||||
client?: string;
|
client?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Client interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfClient(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ClientFromJSON(json: any): Client {
|
export function ClientFromJSON(json: any): Client {
|
||||||
return ClientFromJSONTyped(json, false);
|
return ClientFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,15 @@ export interface DeprecatedObject {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the DeprecatedObject interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfDeprecatedObject(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function DeprecatedObjectFromJSON(json: any): DeprecatedObject {
|
export function DeprecatedObjectFromJSON(json: any): DeprecatedObject {
|
||||||
return DeprecatedObjectFromJSONTyped(json, false);
|
return DeprecatedObjectFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,15 @@ export interface Dog extends Animal {
|
|||||||
breed?: string;
|
breed?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Dog interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfDog(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function DogFromJSON(json: any): Dog {
|
export function DogFromJSON(json: any): Dog {
|
||||||
return DogFromJSONTyped(json, false);
|
return DogFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,15 @@ export interface DogAllOf {
|
|||||||
breed?: string;
|
breed?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the DogAllOf interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfDogAllOf(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function DogAllOfFromJSON(json: any): DogAllOf {
|
export function DogAllOfFromJSON(json: any): DogAllOf {
|
||||||
return DogAllOfFromJSONTyped(json, false);
|
return DogAllOfFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -53,6 +53,15 @@ export const EnumArraysArrayEnumEnum = {
|
|||||||
export type EnumArraysArrayEnumEnum = typeof EnumArraysArrayEnumEnum[keyof typeof EnumArraysArrayEnumEnum];
|
export type EnumArraysArrayEnumEnum = typeof EnumArraysArrayEnumEnum[keyof typeof EnumArraysArrayEnumEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the EnumArrays interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfEnumArrays(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function EnumArraysFromJSON(json: any): EnumArrays {
|
export function EnumArraysFromJSON(json: any): EnumArrays {
|
||||||
return EnumArraysFromJSONTyped(json, false);
|
return EnumArraysFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -134,6 +134,16 @@ export const EnumTestEnumNumberEnum = {
|
|||||||
export type EnumTestEnumNumberEnum = typeof EnumTestEnumNumberEnum[keyof typeof EnumTestEnumNumberEnum];
|
export type EnumTestEnumNumberEnum = typeof EnumTestEnumNumberEnum[keyof typeof EnumTestEnumNumberEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the EnumTest interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfEnumTest(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "enumStringRequired" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function EnumTestFromJSON(json: any): EnumTest {
|
export function EnumTestFromJSON(json: any): EnumTest {
|
||||||
return EnumTestFromJSONTyped(json, false);
|
return EnumTestFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface FileSchemaTestClass {
|
|||||||
files?: Array<any>;
|
files?: Array<any>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the FileSchemaTestClass interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfFileSchemaTestClass(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function FileSchemaTestClassFromJSON(json: any): FileSchemaTestClass {
|
export function FileSchemaTestClassFromJSON(json: any): FileSchemaTestClass {
|
||||||
return FileSchemaTestClassFromJSONTyped(json, false);
|
return FileSchemaTestClassFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,15 @@ export interface Foo {
|
|||||||
bar?: string;
|
bar?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Foo interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfFoo(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function FooFromJSON(json: any): Foo {
|
export function FooFromJSON(json: any): Foo {
|
||||||
return FooFromJSONTyped(json, false);
|
return FooFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,15 @@ export interface FooGetDefaultResponse {
|
|||||||
string?: Foo;
|
string?: Foo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the FooGetDefaultResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfFooGetDefaultResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function FooGetDefaultResponseFromJSON(json: any): FooGetDefaultResponse {
|
export function FooGetDefaultResponseFromJSON(json: any): FooGetDefaultResponse {
|
||||||
return FooGetDefaultResponseFromJSONTyped(json, false);
|
return FooGetDefaultResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -124,6 +124,19 @@ export interface FormatTest {
|
|||||||
patternWithDigitsAndDelimiter?: string;
|
patternWithDigitsAndDelimiter?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the FormatTest interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfFormatTest(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "number" in value;
|
||||||
|
isInstance = isInstance && "_byte" in value;
|
||||||
|
isInstance = isInstance && "date" in value;
|
||||||
|
isInstance = isInstance && "password" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function FormatTestFromJSON(json: any): FormatTest {
|
export function FormatTestFromJSON(json: any): FormatTest {
|
||||||
return FormatTestFromJSONTyped(json, false);
|
return FormatTestFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface HasOnlyReadOnly {
|
|||||||
readonly foo?: string;
|
readonly foo?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the HasOnlyReadOnly interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfHasOnlyReadOnly(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function HasOnlyReadOnlyFromJSON(json: any): HasOnlyReadOnly {
|
export function HasOnlyReadOnlyFromJSON(json: any): HasOnlyReadOnly {
|
||||||
return HasOnlyReadOnlyFromJSONTyped(json, false);
|
return HasOnlyReadOnlyFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,15 @@ export interface HealthCheckResult {
|
|||||||
nullableMessage?: string | null;
|
nullableMessage?: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the HealthCheckResult interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfHealthCheckResult(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function HealthCheckResultFromJSON(json: any): HealthCheckResult {
|
export function HealthCheckResultFromJSON(json: any): HealthCheckResult {
|
||||||
return HealthCheckResultFromJSONTyped(json, false);
|
return HealthCheckResultFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,15 @@ export interface List {
|
|||||||
_123list?: string;
|
_123list?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the List interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfList(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ListFromJSON(json: any): List {
|
export function ListFromJSON(json: any): List {
|
||||||
return ListFromJSONTyped(json, false);
|
return ListFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,15 @@ export const MapTestMapOfEnumStringEnum = {
|
|||||||
export type MapTestMapOfEnumStringEnum = typeof MapTestMapOfEnumStringEnum[keyof typeof MapTestMapOfEnumStringEnum];
|
export type MapTestMapOfEnumStringEnum = typeof MapTestMapOfEnumStringEnum[keyof typeof MapTestMapOfEnumStringEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the MapTest interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfMapTest(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function MapTestFromJSON(json: any): MapTest {
|
export function MapTestFromJSON(json: any): MapTest {
|
||||||
return MapTestFromJSONTyped(json, false);
|
return MapTestFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,15 @@ export interface MixedPropertiesAndAdditionalPropertiesClass {
|
|||||||
map?: { [key: string]: Animal; };
|
map?: { [key: string]: Animal; };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the MixedPropertiesAndAdditionalPropertiesClass interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfMixedPropertiesAndAdditionalPropertiesClass(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function MixedPropertiesAndAdditionalPropertiesClassFromJSON(json: any): MixedPropertiesAndAdditionalPropertiesClass {
|
export function MixedPropertiesAndAdditionalPropertiesClassFromJSON(json: any): MixedPropertiesAndAdditionalPropertiesClass {
|
||||||
return MixedPropertiesAndAdditionalPropertiesClassFromJSONTyped(json, false);
|
return MixedPropertiesAndAdditionalPropertiesClassFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Model200Response {
|
|||||||
_class?: string;
|
_class?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Model200Response interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfModel200Response(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function Model200ResponseFromJSON(json: any): Model200Response {
|
export function Model200ResponseFromJSON(json: any): Model200Response {
|
||||||
return Model200ResponseFromJSONTyped(json, false);
|
return Model200ResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,15 @@ export interface ModelApiResponse {
|
|||||||
message?: string;
|
message?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ModelApiResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfModelApiResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
||||||
return ModelApiResponseFromJSONTyped(json, false);
|
return ModelApiResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,15 @@ export interface ModelFile {
|
|||||||
sourceURI?: string;
|
sourceURI?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ModelFile interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfModelFile(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ModelFileFromJSON(json: any): ModelFile {
|
export function ModelFileFromJSON(json: any): ModelFile {
|
||||||
return ModelFileFromJSONTyped(json, false);
|
return ModelFileFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,16 @@ export interface Name {
|
|||||||
readonly _123number?: number;
|
readonly _123number?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Name interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfName(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "name" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function NameFromJSON(json: any): Name {
|
export function NameFromJSON(json: any): Name {
|
||||||
return NameFromJSONTyped(json, false);
|
return NameFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -94,6 +94,15 @@ export interface NullableClass {
|
|||||||
objectItemsNullable?: { [key: string]: object; };
|
objectItemsNullable?: { [key: string]: object; };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the NullableClass interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfNullableClass(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function NullableClassFromJSON(json: any): NullableClass {
|
export function NullableClassFromJSON(json: any): NullableClass {
|
||||||
return NullableClassFromJSONTyped(json, false);
|
return NullableClassFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,15 @@ export interface NumberOnly {
|
|||||||
justNumber?: number;
|
justNumber?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the NumberOnly interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfNumberOnly(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function NumberOnlyFromJSON(json: any): NumberOnly {
|
export function NumberOnlyFromJSON(json: any): NumberOnly {
|
||||||
return NumberOnlyFromJSONTyped(json, false);
|
return NumberOnlyFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,15 @@ export interface ObjectWithDeprecatedFields {
|
|||||||
bars?: Array<string>;
|
bars?: Array<string>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ObjectWithDeprecatedFields interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfObjectWithDeprecatedFields(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ObjectWithDeprecatedFieldsFromJSON(json: any): ObjectWithDeprecatedFields {
|
export function ObjectWithDeprecatedFieldsFromJSON(json: any): ObjectWithDeprecatedFields {
|
||||||
return ObjectWithDeprecatedFieldsFromJSONTyped(json, false);
|
return ObjectWithDeprecatedFieldsFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,15 @@ export const OrderStatusEnum = {
|
|||||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Order interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfOrder(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function OrderFromJSON(json: any): Order {
|
export function OrderFromJSON(json: any): Order {
|
||||||
return OrderFromJSONTyped(json, false);
|
return OrderFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,15 @@ export interface OuterComposite {
|
|||||||
myBoolean?: boolean;
|
myBoolean?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the OuterComposite interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfOuterComposite(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function OuterCompositeFromJSON(json: any): OuterComposite {
|
export function OuterCompositeFromJSON(json: any): OuterComposite {
|
||||||
return OuterCompositeFromJSONTyped(json, false);
|
return OuterCompositeFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,16 @@ export interface OuterObjectWithEnumProperty {
|
|||||||
value: OuterEnumInteger;
|
value: OuterEnumInteger;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the OuterObjectWithEnumProperty interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfOuterObjectWithEnumProperty(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "value" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function OuterObjectWithEnumPropertyFromJSON(json: any): OuterObjectWithEnumProperty {
|
export function OuterObjectWithEnumPropertyFromJSON(json: any): OuterObjectWithEnumProperty {
|
||||||
return OuterObjectWithEnumPropertyFromJSONTyped(json, false);
|
return OuterObjectWithEnumPropertyFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -82,6 +82,17 @@ export const PetStatusEnum = {
|
|||||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Pet interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfPet(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "name" in value;
|
||||||
|
isInstance = isInstance && "photoUrls" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function PetFromJSON(json: any): Pet {
|
export function PetFromJSON(json: any): Pet {
|
||||||
return PetFromJSONTyped(json, false);
|
return PetFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface ReadOnlyFirst {
|
|||||||
baz?: string;
|
baz?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ReadOnlyFirst interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfReadOnlyFirst(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ReadOnlyFirstFromJSON(json: any): ReadOnlyFirst {
|
export function ReadOnlyFirstFromJSON(json: any): ReadOnlyFirst {
|
||||||
return ReadOnlyFirstFromJSONTyped(json, false);
|
return ReadOnlyFirstFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,15 @@ export interface Return {
|
|||||||
_return?: number;
|
_return?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Return interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfReturn(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ReturnFromJSON(json: any): Return {
|
export function ReturnFromJSON(json: any): Return {
|
||||||
return ReturnFromJSONTyped(json, false);
|
return ReturnFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,15 @@ export interface SpecialModelName {
|
|||||||
$specialPropertyName?: number;
|
$specialPropertyName?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the SpecialModelName interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfSpecialModelName(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function SpecialModelNameFromJSON(json: any): SpecialModelName {
|
export function SpecialModelNameFromJSON(json: any): SpecialModelName {
|
||||||
return SpecialModelNameFromJSONTyped(json, false);
|
return SpecialModelNameFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Tag {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Tag interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfTag(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function TagFromJSON(json: any): Tag {
|
export function TagFromJSON(json: any): Tag {
|
||||||
return TagFromJSONTyped(json, false);
|
return TagFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,15 @@ export interface User {
|
|||||||
userStatus?: number;
|
userStatus?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the User interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfUser(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function UserFromJSON(json: any): User {
|
export function UserFromJSON(json: any): User {
|
||||||
return UserFromJSONTyped(json, false);
|
return UserFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Category {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Category interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfCategory(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function CategoryFromJSON(json: any): Category {
|
export function CategoryFromJSON(json: any): Category {
|
||||||
return CategoryFromJSONTyped(json, false);
|
return CategoryFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,15 @@ export interface ModelApiResponse {
|
|||||||
message?: string;
|
message?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ModelApiResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfModelApiResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
||||||
return ModelApiResponseFromJSONTyped(json, false);
|
return ModelApiResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,15 @@ export const OrderStatusEnum = {
|
|||||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Order interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfOrder(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function OrderFromJSON(json: any): Order {
|
export function OrderFromJSON(json: any): Order {
|
||||||
return OrderFromJSONTyped(json, false);
|
return OrderFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -82,6 +82,17 @@ export const PetStatusEnum = {
|
|||||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Pet interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfPet(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "name" in value;
|
||||||
|
isInstance = isInstance && "photoUrls" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function PetFromJSON(json: any): Pet {
|
export function PetFromJSON(json: any): Pet {
|
||||||
return PetFromJSONTyped(json, false);
|
return PetFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Tag {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Tag interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfTag(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function TagFromJSON(json: any): Tag {
|
export function TagFromJSON(json: any): Tag {
|
||||||
return TagFromJSONTyped(json, false);
|
return TagFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,15 @@ export interface User {
|
|||||||
userStatus?: number;
|
userStatus?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the User interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfUser(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function UserFromJSON(json: any): User {
|
export function UserFromJSON(json: any): User {
|
||||||
return UserFromJSONTyped(json, false);
|
return UserFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,15 @@ export interface EnumPatternObject {
|
|||||||
nullableNumberEnum?: NumberEnum | null;
|
nullableNumberEnum?: NumberEnum | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the EnumPatternObject interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfEnumPatternObject(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function EnumPatternObjectFromJSON(json: any): EnumPatternObject {
|
export function EnumPatternObjectFromJSON(json: any): EnumPatternObject {
|
||||||
return EnumPatternObjectFromJSONTyped(json, false);
|
return EnumPatternObjectFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -87,6 +87,15 @@ export const FakeEnumRequestGetInline200ResponseNullableNumberEnumEnum = {
|
|||||||
export type FakeEnumRequestGetInline200ResponseNullableNumberEnumEnum = typeof FakeEnumRequestGetInline200ResponseNullableNumberEnumEnum[keyof typeof FakeEnumRequestGetInline200ResponseNullableNumberEnumEnum];
|
export type FakeEnumRequestGetInline200ResponseNullableNumberEnumEnum = typeof FakeEnumRequestGetInline200ResponseNullableNumberEnumEnum[keyof typeof FakeEnumRequestGetInline200ResponseNullableNumberEnumEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the FakeEnumRequestGetInline200Response interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfFakeEnumRequestGetInline200Response(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function FakeEnumRequestGetInline200ResponseFromJSON(json: any): FakeEnumRequestGetInline200Response {
|
export function FakeEnumRequestGetInline200ResponseFromJSON(json: any): FakeEnumRequestGetInline200Response {
|
||||||
return FakeEnumRequestGetInline200ResponseFromJSONTyped(json, false);
|
return FakeEnumRequestGetInline200ResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Category {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Category interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfCategory(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function CategoryFromJSON(json: any): Category {
|
export function CategoryFromJSON(json: any): Category {
|
||||||
return CategoryFromJSONTyped(json, false);
|
return CategoryFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,15 @@ export interface ModelApiResponse {
|
|||||||
message?: string;
|
message?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ModelApiResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfModelApiResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
||||||
return ModelApiResponseFromJSONTyped(json, false);
|
return ModelApiResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,15 @@ export const OrderStatusEnum = {
|
|||||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Order interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfOrder(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function OrderFromJSON(json: any): Order {
|
export function OrderFromJSON(json: any): Order {
|
||||||
return OrderFromJSONTyped(json, false);
|
return OrderFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -82,6 +82,17 @@ export const PetStatusEnum = {
|
|||||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Pet interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfPet(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "name" in value;
|
||||||
|
isInstance = isInstance && "photoUrls" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function PetFromJSON(json: any): Pet {
|
export function PetFromJSON(json: any): Pet {
|
||||||
return PetFromJSONTyped(json, false);
|
return PetFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Tag {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Tag interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfTag(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function TagFromJSON(json: any): Tag {
|
export function TagFromJSON(json: any): Tag {
|
||||||
return TagFromJSONTyped(json, false);
|
return TagFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,15 @@ export interface User {
|
|||||||
userStatus?: number;
|
userStatus?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the User interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfUser(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function UserFromJSON(json: any): User {
|
export function UserFromJSON(json: any): User {
|
||||||
return UserFromJSONTyped(json, false);
|
return UserFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Category {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Category interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfCategory(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function CategoryFromJSON(json: any): Category {
|
export function CategoryFromJSON(json: any): Category {
|
||||||
return CategoryFromJSONTyped(json, false);
|
return CategoryFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,15 @@ export interface ModelApiResponse {
|
|||||||
message?: string;
|
message?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ModelApiResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfModelApiResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
||||||
return ModelApiResponseFromJSONTyped(json, false);
|
return ModelApiResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,15 @@ export const OrderStatusEnum = {
|
|||||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Order interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfOrder(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function OrderFromJSON(json: any): Order {
|
export function OrderFromJSON(json: any): Order {
|
||||||
return OrderFromJSONTyped(json, false);
|
return OrderFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -82,6 +82,17 @@ export const PetStatusEnum = {
|
|||||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Pet interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfPet(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "name" in value;
|
||||||
|
isInstance = isInstance && "photoUrls" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function PetFromJSON(json: any): Pet {
|
export function PetFromJSON(json: any): Pet {
|
||||||
return PetFromJSONTyped(json, false);
|
return PetFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Tag {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Tag interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfTag(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function TagFromJSON(json: any): Tag {
|
export function TagFromJSON(json: any): Tag {
|
||||||
return TagFromJSONTyped(json, false);
|
return TagFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,15 @@ export interface User {
|
|||||||
userStatus?: number;
|
userStatus?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the User interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfUser(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function UserFromJSON(json: any): User {
|
export function UserFromJSON(json: any): User {
|
||||||
return UserFromJSONTyped(json, false);
|
return UserFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Category {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Category interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfCategory(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function CategoryFromJSON(json: any): Category {
|
export function CategoryFromJSON(json: any): Category {
|
||||||
return CategoryFromJSONTyped(json, false);
|
return CategoryFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,15 @@ export interface ModelApiResponse {
|
|||||||
message?: string;
|
message?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ModelApiResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfModelApiResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
||||||
return ModelApiResponseFromJSONTyped(json, false);
|
return ModelApiResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,15 @@ export const OrderStatusEnum = {
|
|||||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Order interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfOrder(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function OrderFromJSON(json: any): Order {
|
export function OrderFromJSON(json: any): Order {
|
||||||
return OrderFromJSONTyped(json, false);
|
return OrderFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -82,6 +82,17 @@ export const PetStatusEnum = {
|
|||||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Pet interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfPet(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "name" in value;
|
||||||
|
isInstance = isInstance && "photoUrls" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function PetFromJSON(json: any): Pet {
|
export function PetFromJSON(json: any): Pet {
|
||||||
return PetFromJSONTyped(json, false);
|
return PetFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Tag {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Tag interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfTag(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function TagFromJSON(json: any): Tag {
|
export function TagFromJSON(json: any): Tag {
|
||||||
return TagFromJSONTyped(json, false);
|
return TagFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,15 @@ export interface User {
|
|||||||
userStatus?: number;
|
userStatus?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the User interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfUser(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function UserFromJSON(json: any): User {
|
export function UserFromJSON(json: any): User {
|
||||||
return UserFromJSONTyped(json, false);
|
return UserFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Category {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Category interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfCategory(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function CategoryFromJSON(json: any): Category {
|
export function CategoryFromJSON(json: any): Category {
|
||||||
return CategoryFromJSONTyped(json, false);
|
return CategoryFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,16 @@ export interface DefaultMetaOnlyResponse {
|
|||||||
meta: ResponseMeta;
|
meta: ResponseMeta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the DefaultMetaOnlyResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfDefaultMetaOnlyResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "meta" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function DefaultMetaOnlyResponseFromJSON(json: any): DefaultMetaOnlyResponse {
|
export function DefaultMetaOnlyResponseFromJSON(json: any): DefaultMetaOnlyResponse {
|
||||||
return DefaultMetaOnlyResponseFromJSONTyped(json, false);
|
return DefaultMetaOnlyResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,16 @@ export interface FindPetsByStatusResponse {
|
|||||||
data?: Array<Pet>;
|
data?: Array<Pet>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the FindPetsByStatusResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfFindPetsByStatusResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "meta" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function FindPetsByStatusResponseFromJSON(json: any): FindPetsByStatusResponse {
|
export function FindPetsByStatusResponseFromJSON(json: any): FindPetsByStatusResponse {
|
||||||
return FindPetsByStatusResponseFromJSONTyped(json, false);
|
return FindPetsByStatusResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,16 @@ export interface FindPetsByUserResponse {
|
|||||||
data?: Array<User>;
|
data?: Array<User>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the FindPetsByUserResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfFindPetsByUserResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "meta" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function FindPetsByUserResponseFromJSON(json: any): FindPetsByUserResponse {
|
export function FindPetsByUserResponseFromJSON(json: any): FindPetsByUserResponse {
|
||||||
return FindPetsByUserResponseFromJSONTyped(json, false);
|
return FindPetsByUserResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,16 @@ export interface GetBehaviorPermissionsResponse {
|
|||||||
data?: { [key: string]: boolean; };
|
data?: { [key: string]: boolean; };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the GetBehaviorPermissionsResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfGetBehaviorPermissionsResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "meta" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function GetBehaviorPermissionsResponseFromJSON(json: any): GetBehaviorPermissionsResponse {
|
export function GetBehaviorPermissionsResponseFromJSON(json: any): GetBehaviorPermissionsResponse {
|
||||||
return GetBehaviorPermissionsResponseFromJSONTyped(json, false);
|
return GetBehaviorPermissionsResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,16 @@ export interface GetBehaviorTypeResponse {
|
|||||||
data?: BehaviorType;
|
data?: BehaviorType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the GetBehaviorTypeResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfGetBehaviorTypeResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "meta" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function GetBehaviorTypeResponseFromJSON(json: any): GetBehaviorTypeResponse {
|
export function GetBehaviorTypeResponseFromJSON(json: any): GetBehaviorTypeResponse {
|
||||||
return GetBehaviorTypeResponseFromJSONTyped(json, false);
|
return GetBehaviorTypeResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,16 @@ export interface GetMatchingPartsResponse {
|
|||||||
data?: MatchingParts;
|
data?: MatchingParts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the GetMatchingPartsResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfGetMatchingPartsResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "meta" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function GetMatchingPartsResponseFromJSON(json: any): GetMatchingPartsResponse {
|
export function GetMatchingPartsResponseFromJSON(json: any): GetMatchingPartsResponse {
|
||||||
return GetMatchingPartsResponseFromJSONTyped(json, false);
|
return GetMatchingPartsResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,16 @@ export interface GetPetPartTypeResponse {
|
|||||||
data?: PetPartType;
|
data?: PetPartType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the GetPetPartTypeResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfGetPetPartTypeResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "meta" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function GetPetPartTypeResponseFromJSON(json: any): GetPetPartTypeResponse {
|
export function GetPetPartTypeResponseFromJSON(json: any): GetPetPartTypeResponse {
|
||||||
return GetPetPartTypeResponseFromJSONTyped(json, false);
|
return GetPetPartTypeResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,17 @@ export interface ItemId {
|
|||||||
type: string;
|
type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ItemId interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfItemId(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "id" in value;
|
||||||
|
isInstance = isInstance && "type" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ItemIdFromJSON(json: any): ItemId {
|
export function ItemIdFromJSON(json: any): ItemId {
|
||||||
return ItemIdFromJSONTyped(json, false);
|
return ItemIdFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,17 @@ export interface MatchingParts {
|
|||||||
related: Array<Part>;
|
related: Array<Part>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the MatchingParts interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfMatchingParts(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "connected" in value;
|
||||||
|
isInstance = isInstance && "related" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function MatchingPartsFromJSON(json: any): MatchingParts {
|
export function MatchingPartsFromJSON(json: any): MatchingParts {
|
||||||
return MatchingPartsFromJSONTyped(json, false);
|
return MatchingPartsFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,15 @@ export interface ModelApiResponse {
|
|||||||
message?: string;
|
message?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ModelApiResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfModelApiResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
||||||
return ModelApiResponseFromJSONTyped(json, false);
|
return ModelApiResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,16 @@ export interface ModelError {
|
|||||||
exception?: string;
|
exception?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ModelError interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfModelError(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "type" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ModelErrorFromJSON(json: any): ModelError {
|
export function ModelErrorFromJSON(json: any): ModelError {
|
||||||
return ModelErrorFromJSONTyped(json, false);
|
return ModelErrorFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,15 @@ export const OrderStatusEnum = {
|
|||||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Order interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfOrder(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function OrderFromJSON(json: any): Order {
|
export function OrderFromJSON(json: any): Order {
|
||||||
return OrderFromJSONTyped(json, false);
|
return OrderFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,17 @@ export interface Part {
|
|||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Part interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfPart(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "id" in value;
|
||||||
|
isInstance = isInstance && "name" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function PartFromJSON(json: any): Part {
|
export function PartFromJSON(json: any): Part {
|
||||||
return PartFromJSONTyped(json, false);
|
return PartFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -184,6 +184,29 @@ export const PetStatusEnum = {
|
|||||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Pet interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfPet(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "id" in value;
|
||||||
|
isInstance = isInstance && "otherFriendIds" in value;
|
||||||
|
isInstance = isInstance && "friendAge" in value;
|
||||||
|
isInstance = isInstance && "age" in value;
|
||||||
|
isInstance = isInstance && "isHappy" in value;
|
||||||
|
isInstance = isInstance && "isTall" in value;
|
||||||
|
isInstance = isInstance && "category" in value;
|
||||||
|
isInstance = isInstance && "name" in value;
|
||||||
|
isInstance = isInstance && "photoUrls" in value;
|
||||||
|
isInstance = isInstance && "warningStatus" in value;
|
||||||
|
isInstance = isInstance && "alternateStatus" in value;
|
||||||
|
isInstance = isInstance && "otherDepStatuses" in value;
|
||||||
|
isInstance = isInstance && "tags" in value;
|
||||||
|
isInstance = isInstance && "status" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function PetFromJSON(json: any): Pet {
|
export function PetFromJSON(json: any): Pet {
|
||||||
return PetFromJSONTyped(json, false);
|
return PetFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,16 @@ export interface PetRegionsResponse {
|
|||||||
data?: Array<Array<number>>;
|
data?: Array<Array<number>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the PetRegionsResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfPetRegionsResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "meta" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function PetRegionsResponseFromJSON(json: any): PetRegionsResponse {
|
export function PetRegionsResponseFromJSON(json: any): PetRegionsResponse {
|
||||||
return PetRegionsResponseFromJSONTyped(json, false);
|
return PetRegionsResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,16 @@ export const ResponseMetaCodeEnum = {
|
|||||||
export type ResponseMetaCodeEnum = typeof ResponseMetaCodeEnum[keyof typeof ResponseMetaCodeEnum];
|
export type ResponseMetaCodeEnum = typeof ResponseMetaCodeEnum[keyof typeof ResponseMetaCodeEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ResponseMeta interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfResponseMeta(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "code" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ResponseMetaFromJSON(json: any): ResponseMeta {
|
export function ResponseMetaFromJSON(json: any): ResponseMeta {
|
||||||
return ResponseMetaFromJSONTyped(json, false);
|
return ResponseMetaFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Tag {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Tag interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfTag(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function TagFromJSON(json: any): Tag {
|
export function TagFromJSON(json: any): Tag {
|
||||||
return TagFromJSONTyped(json, false);
|
return TagFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -81,6 +81,17 @@ export interface User {
|
|||||||
subUser2: User;
|
subUser2: User;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the User interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfUser(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "id" in value;
|
||||||
|
isInstance = isInstance && "subUser2" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function UserFromJSON(json: any): User {
|
export function UserFromJSON(json: any): User {
|
||||||
return UserFromJSONTyped(json, false);
|
return UserFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Category {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Category interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfCategory(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function CategoryFromJSON(json: any): Category {
|
export function CategoryFromJSON(json: any): Category {
|
||||||
return CategoryFromJSONTyped(json, false);
|
return CategoryFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,15 @@ export interface ModelApiResponse {
|
|||||||
message?: string;
|
message?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ModelApiResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfModelApiResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
||||||
return ModelApiResponseFromJSONTyped(json, false);
|
return ModelApiResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,15 @@ export const OrderStatusEnum = {
|
|||||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Order interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfOrder(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function OrderFromJSON(json: any): Order {
|
export function OrderFromJSON(json: any): Order {
|
||||||
return OrderFromJSONTyped(json, false);
|
return OrderFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -82,6 +82,17 @@ export const PetStatusEnum = {
|
|||||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Pet interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfPet(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "name" in value;
|
||||||
|
isInstance = isInstance && "photoUrls" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function PetFromJSON(json: any): Pet {
|
export function PetFromJSON(json: any): Pet {
|
||||||
return PetFromJSONTyped(json, false);
|
return PetFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Tag {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Tag interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfTag(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function TagFromJSON(json: any): Tag {
|
export function TagFromJSON(json: any): Tag {
|
||||||
return TagFromJSONTyped(json, false);
|
return TagFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,15 @@ export interface User {
|
|||||||
userStatus?: number;
|
userStatus?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the User interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfUser(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function UserFromJSON(json: any): User {
|
export function UserFromJSON(json: any): User {
|
||||||
return UserFromJSONTyped(json, false);
|
return UserFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Category {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Category interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfCategory(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function CategoryFromJSON(json: any): Category {
|
export function CategoryFromJSON(json: any): Category {
|
||||||
return CategoryFromJSONTyped(json, false);
|
return CategoryFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,15 @@ export interface ModelApiResponse {
|
|||||||
message?: string;
|
message?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the ModelApiResponse interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfModelApiResponse(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
||||||
return ModelApiResponseFromJSONTyped(json, false);
|
return ModelApiResponseFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,15 @@ export const OrderStatusEnum = {
|
|||||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Order interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfOrder(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function OrderFromJSON(json: any): Order {
|
export function OrderFromJSON(json: any): Order {
|
||||||
return OrderFromJSONTyped(json, false);
|
return OrderFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -82,6 +82,17 @@ export const PetStatusEnum = {
|
|||||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Pet interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfPet(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
isInstance = isInstance && "name" in value;
|
||||||
|
isInstance = isInstance && "photoUrls" in value;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function PetFromJSON(json: any): Pet {
|
export function PetFromJSON(json: any): Pet {
|
||||||
return PetFromJSONTyped(json, false);
|
return PetFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,15 @@ export interface Tag {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given object implements the Tag interface.
|
||||||
|
*/
|
||||||
|
export function instanceOfTag(value: object): boolean {
|
||||||
|
let isInstance = true;
|
||||||
|
|
||||||
|
return isInstance;
|
||||||
|
}
|
||||||
|
|
||||||
export function TagFromJSON(json: any): Tag {
|
export function TagFromJSON(json: any): Tag {
|
||||||
return TagFromJSONTyped(json, false);
|
return TagFromJSONTyped(json, false);
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user