parent
4c3d2643c1
commit
2b38044271
52
src/models/responses/ResponseStatsClient.ts
Normal file
52
src/models/responses/ResponseStatsClient.ts
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
import {
|
||||||
|
IsBoolean,
|
||||||
|
|
||||||
|
IsInt,
|
||||||
|
|
||||||
|
IsOptional,
|
||||||
|
IsString
|
||||||
|
} from "class-validator";
|
||||||
|
import { StatsClient } from '../entities/StatsClient';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines the statsClient response.
|
||||||
|
*/
|
||||||
|
export class ResponseStatsClient {
|
||||||
|
/**
|
||||||
|
* The client's id.
|
||||||
|
*/
|
||||||
|
@IsInt()
|
||||||
|
id: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The client's description.
|
||||||
|
*/
|
||||||
|
@IsString()
|
||||||
|
@IsOptional()
|
||||||
|
description?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is the client enabled?
|
||||||
|
*/
|
||||||
|
@IsBoolean()
|
||||||
|
enabled: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The client's api key.
|
||||||
|
* Only visible on creation or regeneration.
|
||||||
|
*/
|
||||||
|
@IsString()
|
||||||
|
@IsOptional()
|
||||||
|
key: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a ResponseStatsClient object from a statsClient.
|
||||||
|
* @param client The statsClient the response shall be build for.
|
||||||
|
*/
|
||||||
|
public constructor(client: StatsClient) {
|
||||||
|
this.id = client.id;
|
||||||
|
this.description = client.description;
|
||||||
|
this.enabled = client.enabled;
|
||||||
|
this.key = "Only visible on creation/update.";
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user