mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
open api
This commit is contained in:
parent
0232655da2
commit
f33a662f48
107
cli/src/api/open-api/api.ts
generated
107
cli/src/api/open-api/api.ts
generated
@ -2311,62 +2311,6 @@ export interface MergePersonDto {
|
||||
*/
|
||||
'ids': Array<string>;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface MetricServerInfoConfig
|
||||
*/
|
||||
export interface MetricServerInfoConfig {
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MetricServerInfoConfig
|
||||
*/
|
||||
'cpuCount': boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MetricServerInfoConfig
|
||||
*/
|
||||
'cpuModel': boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MetricServerInfoConfig
|
||||
*/
|
||||
'memory': boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MetricServerInfoConfig
|
||||
*/
|
||||
'version': boolean;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface MetricsAssetCountConfig
|
||||
*/
|
||||
export interface MetricsAssetCountConfig {
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MetricsAssetCountConfig
|
||||
*/
|
||||
'image': boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MetricsAssetCountConfig
|
||||
*/
|
||||
'total': boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MetricsAssetCountConfig
|
||||
*/
|
||||
'video': boolean;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@ -3982,24 +3926,12 @@ export interface SystemConfigMapDto {
|
||||
* @interface SystemConfigMetricsDto
|
||||
*/
|
||||
export interface SystemConfigMetricsDto {
|
||||
/**
|
||||
*
|
||||
* @type {MetricsAssetCountConfig}
|
||||
* @memberof SystemConfigMetricsDto
|
||||
*/
|
||||
'assetCount': MetricsAssetCountConfig;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SystemConfigMetricsDto
|
||||
*/
|
||||
'enabled': boolean;
|
||||
/**
|
||||
*
|
||||
* @type {MetricServerInfoConfig}
|
||||
* @memberof SystemConfigMetricsDto
|
||||
*/
|
||||
'serverInfo': MetricServerInfoConfig;
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -12793,13 +12725,10 @@ export const MetricsApiAxiosParamCreator = function (configuration?: Configurati
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {SystemConfigMetricsDto} systemConfigMetricsDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getMetrics: async (systemConfigMetricsDto: SystemConfigMetricsDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'systemConfigMetricsDto' is not null or undefined
|
||||
assertParamExists('getMetrics', 'systemConfigMetricsDto', systemConfigMetricsDto)
|
||||
getMetrics: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/metrics`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
@ -12808,7 +12737,7 @@ export const MetricsApiAxiosParamCreator = function (configuration?: Configurati
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
@ -12823,12 +12752,9 @@ export const MetricsApiAxiosParamCreator = function (configuration?: Configurati
|
||||
|
||||
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(systemConfigMetricsDto, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
@ -12847,12 +12773,11 @@ export const MetricsApiFp = function(configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {SystemConfigMetricsDto} systemConfigMetricsDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getMetrics(systemConfigMetricsDto: SystemConfigMetricsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getMetrics(systemConfigMetricsDto, options);
|
||||
async getMetrics(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getMetrics(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
}
|
||||
@ -12867,30 +12792,15 @@ export const MetricsApiFactory = function (configuration?: Configuration, basePa
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {MetricsApiGetMetricsRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getMetrics(requestParameters: MetricsApiGetMetricsRequest, options?: AxiosRequestConfig): AxiosPromise<object> {
|
||||
return localVarFp.getMetrics(requestParameters.systemConfigMetricsDto, options).then((request) => request(axios, basePath));
|
||||
getMetrics(options?: AxiosRequestConfig): AxiosPromise<object> {
|
||||
return localVarFp.getMetrics(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for getMetrics operation in MetricsApi.
|
||||
* @export
|
||||
* @interface MetricsApiGetMetricsRequest
|
||||
*/
|
||||
export interface MetricsApiGetMetricsRequest {
|
||||
/**
|
||||
*
|
||||
* @type {SystemConfigMetricsDto}
|
||||
* @memberof MetricsApiGetMetrics
|
||||
*/
|
||||
readonly systemConfigMetricsDto: SystemConfigMetricsDto
|
||||
}
|
||||
|
||||
/**
|
||||
* MetricsApi - object-oriented interface
|
||||
* @export
|
||||
@ -12900,13 +12810,12 @@ export interface MetricsApiGetMetricsRequest {
|
||||
export class MetricsApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @param {MetricsApiGetMetricsRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof MetricsApi
|
||||
*/
|
||||
public getMetrics(requestParameters: MetricsApiGetMetricsRequest, options?: AxiosRequestConfig) {
|
||||
return MetricsApiFp(this.configuration).getMetrics(requestParameters.systemConfigMetricsDto, options).then((request) => request(this.axios, this.basePath));
|
||||
public getMetrics(options?: AxiosRequestConfig) {
|
||||
return MetricsApiFp(this.configuration).getMetrics(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
|
6
mobile/openapi/.openapi-generator/FILES
generated
6
mobile/openapi/.openapi-generator/FILES
generated
@ -89,9 +89,7 @@ doc/MapMarkerResponseDto.md
|
||||
doc/MapTheme.md
|
||||
doc/MemoryLaneResponseDto.md
|
||||
doc/MergePersonDto.md
|
||||
doc/MetricServerInfoConfig.md
|
||||
doc/MetricsApi.md
|
||||
doc/MetricsAssetCountConfig.md
|
||||
doc/ModelType.md
|
||||
doc/OAuthApi.md
|
||||
doc/OAuthAuthorizeResponseDto.md
|
||||
@ -287,8 +285,6 @@ lib/model/map_marker_response_dto.dart
|
||||
lib/model/map_theme.dart
|
||||
lib/model/memory_lane_response_dto.dart
|
||||
lib/model/merge_person_dto.dart
|
||||
lib/model/metric_server_info_config.dart
|
||||
lib/model/metrics_asset_count_config.dart
|
||||
lib/model/model_type.dart
|
||||
lib/model/o_auth_authorize_response_dto.dart
|
||||
lib/model/o_auth_callback_dto.dart
|
||||
@ -456,9 +452,7 @@ test/map_marker_response_dto_test.dart
|
||||
test/map_theme_test.dart
|
||||
test/memory_lane_response_dto_test.dart
|
||||
test/merge_person_dto_test.dart
|
||||
test/metric_server_info_config_test.dart
|
||||
test/metrics_api_test.dart
|
||||
test/metrics_asset_count_config_test.dart
|
||||
test/model_type_test.dart
|
||||
test/o_auth_api_test.dart
|
||||
test/o_auth_authorize_response_dto_test.dart
|
||||
|
4
mobile/openapi/README.md
generated
4
mobile/openapi/README.md
generated
@ -145,7 +145,7 @@ Class | Method | HTTP request | Description
|
||||
*LibraryApi* | [**removeOfflineFiles**](doc//LibraryApi.md#removeofflinefiles) | **POST** /library/{id}/removeOffline |
|
||||
*LibraryApi* | [**scanLibrary**](doc//LibraryApi.md#scanlibrary) | **POST** /library/{id}/scan |
|
||||
*LibraryApi* | [**updateLibrary**](doc//LibraryApi.md#updatelibrary) | **PUT** /library/{id} |
|
||||
*MetricsApi* | [**getMetrics**](doc//MetricsApi.md#getmetrics) | **PUT** /metrics |
|
||||
*MetricsApi* | [**getMetrics**](doc//MetricsApi.md#getmetrics) | **GET** /metrics |
|
||||
*OAuthApi* | [**finishOAuth**](doc//OAuthApi.md#finishoauth) | **POST** /oauth/callback |
|
||||
*OAuthApi* | [**generateOAuthConfig**](doc//OAuthApi.md#generateoauthconfig) | **POST** /oauth/config |
|
||||
*OAuthApi* | [**linkOAuthAccount**](doc//OAuthApi.md#linkoauthaccount) | **POST** /oauth/link |
|
||||
@ -289,8 +289,6 @@ Class | Method | HTTP request | Description
|
||||
- [MapTheme](doc//MapTheme.md)
|
||||
- [MemoryLaneResponseDto](doc//MemoryLaneResponseDto.md)
|
||||
- [MergePersonDto](doc//MergePersonDto.md)
|
||||
- [MetricServerInfoConfig](doc//MetricServerInfoConfig.md)
|
||||
- [MetricsAssetCountConfig](doc//MetricsAssetCountConfig.md)
|
||||
- [ModelType](doc//ModelType.md)
|
||||
- [OAuthAuthorizeResponseDto](doc//OAuthAuthorizeResponseDto.md)
|
||||
- [OAuthCallbackDto](doc//OAuthCallbackDto.md)
|
||||
|
18
mobile/openapi/doc/MetricServerInfoConfig.md
generated
18
mobile/openapi/doc/MetricServerInfoConfig.md
generated
@ -1,18 +0,0 @@
|
||||
# openapi.model.MetricServerInfoConfig
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**cpuCount** | **bool** | |
|
||||
**cpuModel** | **bool** | |
|
||||
**memory** | **bool** | |
|
||||
**version** | **bool** | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
14
mobile/openapi/doc/MetricsApi.md
generated
14
mobile/openapi/doc/MetricsApi.md
generated
@ -9,11 +9,11 @@ All URIs are relative to */api*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**getMetrics**](MetricsApi.md#getmetrics) | **PUT** /metrics |
|
||||
[**getMetrics**](MetricsApi.md#getmetrics) | **GET** /metrics |
|
||||
|
||||
|
||||
# **getMetrics**
|
||||
> Object getMetrics(systemConfigMetricsDto)
|
||||
> Object getMetrics()
|
||||
|
||||
|
||||
|
||||
@ -36,10 +36,9 @@ import 'package:openapi/api.dart';
|
||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||
|
||||
final api_instance = MetricsApi();
|
||||
final systemConfigMetricsDto = SystemConfigMetricsDto(); // SystemConfigMetricsDto |
|
||||
|
||||
try {
|
||||
final result = api_instance.getMetrics(systemConfigMetricsDto);
|
||||
final result = api_instance.getMetrics();
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling MetricsApi->getMetrics: $e\n');
|
||||
@ -47,10 +46,7 @@ try {
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**systemConfigMetricsDto** | [**SystemConfigMetricsDto**](SystemConfigMetricsDto.md)| |
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
@ -62,7 +58,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
17
mobile/openapi/doc/MetricsAssetCountConfig.md
generated
17
mobile/openapi/doc/MetricsAssetCountConfig.md
generated
@ -1,17 +0,0 @@
|
||||
# openapi.model.MetricsAssetCountConfig
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**image** | **bool** | |
|
||||
**total** | **bool** | |
|
||||
**video** | **bool** | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
2
mobile/openapi/doc/SystemConfigMetricsDto.md
generated
2
mobile/openapi/doc/SystemConfigMetricsDto.md
generated
@ -8,9 +8,7 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**assetCount** | [**MetricsAssetCountConfig**](MetricsAssetCountConfig.md) | |
|
||||
**enabled** | **bool** | |
|
||||
**serverInfo** | [**MetricServerInfoConfig**](MetricServerInfoConfig.md) | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
2
mobile/openapi/lib/api.dart
generated
2
mobile/openapi/lib/api.dart
generated
@ -125,8 +125,6 @@ part 'model/map_marker_response_dto.dart';
|
||||
part 'model/map_theme.dart';
|
||||
part 'model/memory_lane_response_dto.dart';
|
||||
part 'model/merge_person_dto.dart';
|
||||
part 'model/metric_server_info_config.dart';
|
||||
part 'model/metrics_asset_count_config.dart';
|
||||
part 'model/model_type.dart';
|
||||
part 'model/o_auth_authorize_response_dto.dart';
|
||||
part 'model/o_auth_callback_dto.dart';
|
||||
|
20
mobile/openapi/lib/api/metrics_api.dart
generated
20
mobile/openapi/lib/api/metrics_api.dart
generated
@ -16,27 +16,24 @@ class MetricsApi {
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'PUT /metrics' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SystemConfigMetricsDto] systemConfigMetricsDto (required):
|
||||
Future<Response> getMetricsWithHttpInfo(SystemConfigMetricsDto systemConfigMetricsDto,) async {
|
||||
/// Performs an HTTP 'GET /metrics' operation and returns the [Response].
|
||||
Future<Response> getMetricsWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/metrics';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = systemConfigMetricsDto;
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
path,
|
||||
'PUT',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
@ -45,11 +42,8 @@ class MetricsApi {
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SystemConfigMetricsDto] systemConfigMetricsDto (required):
|
||||
Future<Object?> getMetrics(SystemConfigMetricsDto systemConfigMetricsDto,) async {
|
||||
final response = await getMetricsWithHttpInfo(systemConfigMetricsDto,);
|
||||
Future<Object?> getMetrics() async {
|
||||
final response = await getMetricsWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
|
4
mobile/openapi/lib/api_client.dart
generated
4
mobile/openapi/lib/api_client.dart
generated
@ -335,10 +335,6 @@ class ApiClient {
|
||||
return MemoryLaneResponseDto.fromJson(value);
|
||||
case 'MergePersonDto':
|
||||
return MergePersonDto.fromJson(value);
|
||||
case 'MetricServerInfoConfig':
|
||||
return MetricServerInfoConfig.fromJson(value);
|
||||
case 'MetricsAssetCountConfig':
|
||||
return MetricsAssetCountConfig.fromJson(value);
|
||||
case 'ModelType':
|
||||
return ModelTypeTypeTransformer().decode(value);
|
||||
case 'OAuthAuthorizeResponseDto':
|
||||
|
122
mobile/openapi/lib/model/metric_server_info_config.dart
generated
122
mobile/openapi/lib/model/metric_server_info_config.dart
generated
@ -1,122 +0,0 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class MetricServerInfoConfig {
|
||||
/// Returns a new [MetricServerInfoConfig] instance.
|
||||
MetricServerInfoConfig({
|
||||
required this.cpuCount,
|
||||
required this.cpuModel,
|
||||
required this.memory,
|
||||
required this.version,
|
||||
});
|
||||
|
||||
bool cpuCount;
|
||||
|
||||
bool cpuModel;
|
||||
|
||||
bool memory;
|
||||
|
||||
bool version;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is MetricServerInfoConfig &&
|
||||
other.cpuCount == cpuCount &&
|
||||
other.cpuModel == cpuModel &&
|
||||
other.memory == memory &&
|
||||
other.version == version;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(cpuCount.hashCode) +
|
||||
(cpuModel.hashCode) +
|
||||
(memory.hashCode) +
|
||||
(version.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'MetricServerInfoConfig[cpuCount=$cpuCount, cpuModel=$cpuModel, memory=$memory, version=$version]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'cpuCount'] = this.cpuCount;
|
||||
json[r'cpuModel'] = this.cpuModel;
|
||||
json[r'memory'] = this.memory;
|
||||
json[r'version'] = this.version;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [MetricServerInfoConfig] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static MetricServerInfoConfig? fromJson(dynamic value) {
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return MetricServerInfoConfig(
|
||||
cpuCount: mapValueOfType<bool>(json, r'cpuCount')!,
|
||||
cpuModel: mapValueOfType<bool>(json, r'cpuModel')!,
|
||||
memory: mapValueOfType<bool>(json, r'memory')!,
|
||||
version: mapValueOfType<bool>(json, r'version')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<MetricServerInfoConfig> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <MetricServerInfoConfig>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = MetricServerInfoConfig.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, MetricServerInfoConfig> mapFromJson(dynamic json) {
|
||||
final map = <String, MetricServerInfoConfig>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = MetricServerInfoConfig.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of MetricServerInfoConfig-objects as value to a dart map
|
||||
static Map<String, List<MetricServerInfoConfig>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<MetricServerInfoConfig>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = MetricServerInfoConfig.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'cpuCount',
|
||||
'cpuModel',
|
||||
'memory',
|
||||
'version',
|
||||
};
|
||||
}
|
||||
|
114
mobile/openapi/lib/model/metrics_asset_count_config.dart
generated
114
mobile/openapi/lib/model/metrics_asset_count_config.dart
generated
@ -1,114 +0,0 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class MetricsAssetCountConfig {
|
||||
/// Returns a new [MetricsAssetCountConfig] instance.
|
||||
MetricsAssetCountConfig({
|
||||
required this.image,
|
||||
required this.total,
|
||||
required this.video,
|
||||
});
|
||||
|
||||
bool image;
|
||||
|
||||
bool total;
|
||||
|
||||
bool video;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is MetricsAssetCountConfig &&
|
||||
other.image == image &&
|
||||
other.total == total &&
|
||||
other.video == video;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(image.hashCode) +
|
||||
(total.hashCode) +
|
||||
(video.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'MetricsAssetCountConfig[image=$image, total=$total, video=$video]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'image'] = this.image;
|
||||
json[r'total'] = this.total;
|
||||
json[r'video'] = this.video;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [MetricsAssetCountConfig] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static MetricsAssetCountConfig? fromJson(dynamic value) {
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return MetricsAssetCountConfig(
|
||||
image: mapValueOfType<bool>(json, r'image')!,
|
||||
total: mapValueOfType<bool>(json, r'total')!,
|
||||
video: mapValueOfType<bool>(json, r'video')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<MetricsAssetCountConfig> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <MetricsAssetCountConfig>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = MetricsAssetCountConfig.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, MetricsAssetCountConfig> mapFromJson(dynamic json) {
|
||||
final map = <String, MetricsAssetCountConfig>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = MetricsAssetCountConfig.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of MetricsAssetCountConfig-objects as value to a dart map
|
||||
static Map<String, List<MetricsAssetCountConfig>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<MetricsAssetCountConfig>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = MetricsAssetCountConfig.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'image',
|
||||
'total',
|
||||
'video',
|
||||
};
|
||||
}
|
||||
|
@ -13,38 +13,26 @@ part of openapi.api;
|
||||
class SystemConfigMetricsDto {
|
||||
/// Returns a new [SystemConfigMetricsDto] instance.
|
||||
SystemConfigMetricsDto({
|
||||
required this.assetCount,
|
||||
required this.enabled,
|
||||
required this.serverInfo,
|
||||
});
|
||||
|
||||
MetricsAssetCountConfig assetCount;
|
||||
|
||||
bool enabled;
|
||||
|
||||
MetricServerInfoConfig serverInfo;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SystemConfigMetricsDto &&
|
||||
other.assetCount == assetCount &&
|
||||
other.enabled == enabled &&
|
||||
other.serverInfo == serverInfo;
|
||||
other.enabled == enabled;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(assetCount.hashCode) +
|
||||
(enabled.hashCode) +
|
||||
(serverInfo.hashCode);
|
||||
(enabled.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SystemConfigMetricsDto[assetCount=$assetCount, enabled=$enabled, serverInfo=$serverInfo]';
|
||||
String toString() => 'SystemConfigMetricsDto[enabled=$enabled]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'assetCount'] = this.assetCount;
|
||||
json[r'enabled'] = this.enabled;
|
||||
json[r'serverInfo'] = this.serverInfo;
|
||||
return json;
|
||||
}
|
||||
|
||||
@ -56,9 +44,7 @@ class SystemConfigMetricsDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return SystemConfigMetricsDto(
|
||||
assetCount: MetricsAssetCountConfig.fromJson(json[r'assetCount'])!,
|
||||
enabled: mapValueOfType<bool>(json, r'enabled')!,
|
||||
serverInfo: MetricServerInfoConfig.fromJson(json[r'serverInfo'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
@ -106,9 +92,7 @@ class SystemConfigMetricsDto {
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'assetCount',
|
||||
'enabled',
|
||||
'serverInfo',
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1,42 +0,0 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// tests for MetricServerInfoConfig
|
||||
void main() {
|
||||
// final instance = MetricServerInfoConfig();
|
||||
|
||||
group('test MetricServerInfoConfig', () {
|
||||
// bool cpuCount
|
||||
test('to test the property `cpuCount`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// bool cpuModel
|
||||
test('to test the property `cpuModel`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// bool memory
|
||||
test('to test the property `memory`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// bool version
|
||||
test('to test the property `version`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
2
mobile/openapi/test/metrics_api_test.dart
generated
2
mobile/openapi/test/metrics_api_test.dart
generated
@ -17,7 +17,7 @@ void main() {
|
||||
// final instance = MetricsApi();
|
||||
|
||||
group('tests for MetricsApi', () {
|
||||
//Future<Object> getMetrics(SystemConfigMetricsDto systemConfigMetricsDto) async
|
||||
//Future<Object> getMetrics() async
|
||||
test('test getMetrics', () async {
|
||||
// TODO
|
||||
});
|
||||
|
@ -1,37 +0,0 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// tests for MetricsAssetCountConfig
|
||||
void main() {
|
||||
// final instance = MetricsAssetCountConfig();
|
||||
|
||||
group('test MetricsAssetCountConfig', () {
|
||||
// bool image
|
||||
test('to test the property `image`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// bool total
|
||||
test('to test the property `total`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// bool video
|
||||
test('to test the property `video`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
@ -16,21 +16,11 @@ void main() {
|
||||
// final instance = SystemConfigMetricsDto();
|
||||
|
||||
group('test SystemConfigMetricsDto', () {
|
||||
// MetricsAssetCountConfig assetCount
|
||||
test('to test the property `assetCount`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// bool enabled
|
||||
test('to test the property `enabled`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// MetricServerInfoConfig serverInfo
|
||||
test('to test the property `serverInfo`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
107
web/src/api/open-api/api.ts
generated
107
web/src/api/open-api/api.ts
generated
@ -2311,62 +2311,6 @@ export interface MergePersonDto {
|
||||
*/
|
||||
'ids': Array<string>;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface MetricServerInfoConfig
|
||||
*/
|
||||
export interface MetricServerInfoConfig {
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MetricServerInfoConfig
|
||||
*/
|
||||
'cpuCount': boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MetricServerInfoConfig
|
||||
*/
|
||||
'cpuModel': boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MetricServerInfoConfig
|
||||
*/
|
||||
'memory': boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MetricServerInfoConfig
|
||||
*/
|
||||
'version': boolean;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface MetricsAssetCountConfig
|
||||
*/
|
||||
export interface MetricsAssetCountConfig {
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MetricsAssetCountConfig
|
||||
*/
|
||||
'image': boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MetricsAssetCountConfig
|
||||
*/
|
||||
'total': boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MetricsAssetCountConfig
|
||||
*/
|
||||
'video': boolean;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@ -3982,24 +3926,12 @@ export interface SystemConfigMapDto {
|
||||
* @interface SystemConfigMetricsDto
|
||||
*/
|
||||
export interface SystemConfigMetricsDto {
|
||||
/**
|
||||
*
|
||||
* @type {MetricsAssetCountConfig}
|
||||
* @memberof SystemConfigMetricsDto
|
||||
*/
|
||||
'assetCount': MetricsAssetCountConfig;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SystemConfigMetricsDto
|
||||
*/
|
||||
'enabled': boolean;
|
||||
/**
|
||||
*
|
||||
* @type {MetricServerInfoConfig}
|
||||
* @memberof SystemConfigMetricsDto
|
||||
*/
|
||||
'serverInfo': MetricServerInfoConfig;
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -12793,13 +12725,10 @@ export const MetricsApiAxiosParamCreator = function (configuration?: Configurati
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {SystemConfigMetricsDto} systemConfigMetricsDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getMetrics: async (systemConfigMetricsDto: SystemConfigMetricsDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'systemConfigMetricsDto' is not null or undefined
|
||||
assertParamExists('getMetrics', 'systemConfigMetricsDto', systemConfigMetricsDto)
|
||||
getMetrics: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/metrics`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
@ -12808,7 +12737,7 @@ export const MetricsApiAxiosParamCreator = function (configuration?: Configurati
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
@ -12823,12 +12752,9 @@ export const MetricsApiAxiosParamCreator = function (configuration?: Configurati
|
||||
|
||||
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(systemConfigMetricsDto, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
@ -12847,12 +12773,11 @@ export const MetricsApiFp = function(configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {SystemConfigMetricsDto} systemConfigMetricsDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getMetrics(systemConfigMetricsDto: SystemConfigMetricsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getMetrics(systemConfigMetricsDto, options);
|
||||
async getMetrics(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getMetrics(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
}
|
||||
@ -12867,30 +12792,15 @@ export const MetricsApiFactory = function (configuration?: Configuration, basePa
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {MetricsApiGetMetricsRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getMetrics(requestParameters: MetricsApiGetMetricsRequest, options?: AxiosRequestConfig): AxiosPromise<object> {
|
||||
return localVarFp.getMetrics(requestParameters.systemConfigMetricsDto, options).then((request) => request(axios, basePath));
|
||||
getMetrics(options?: AxiosRequestConfig): AxiosPromise<object> {
|
||||
return localVarFp.getMetrics(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for getMetrics operation in MetricsApi.
|
||||
* @export
|
||||
* @interface MetricsApiGetMetricsRequest
|
||||
*/
|
||||
export interface MetricsApiGetMetricsRequest {
|
||||
/**
|
||||
*
|
||||
* @type {SystemConfigMetricsDto}
|
||||
* @memberof MetricsApiGetMetrics
|
||||
*/
|
||||
readonly systemConfigMetricsDto: SystemConfigMetricsDto
|
||||
}
|
||||
|
||||
/**
|
||||
* MetricsApi - object-oriented interface
|
||||
* @export
|
||||
@ -12900,13 +12810,12 @@ export interface MetricsApiGetMetricsRequest {
|
||||
export class MetricsApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @param {MetricsApiGetMetricsRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof MetricsApi
|
||||
*/
|
||||
public getMetrics(requestParameters: MetricsApiGetMetricsRequest, options?: AxiosRequestConfig) {
|
||||
return MetricsApiFp(this.configuration).getMetrics(requestParameters.systemConfigMetricsDto, options).then((request) => request(this.axios, this.basePath));
|
||||
public getMetrics(options?: AxiosRequestConfig) {
|
||||
return MetricsApiFp(this.configuration).getMetrics(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user