This commit is contained in:
Kyle Bouchard 2024-02-13 23:12:13 -05:00
parent c7fa94fb28
commit bbcfd69a3d
3 changed files with 93 additions and 15 deletions

View File

@ -158,17 +158,17 @@ export class ActuatorsService {
}
/**
* Put Actuators
* Update Actuators
* @param actuator
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public putActuators(actuator: Array<Actuator>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Actuator>;
public putActuators(actuator: Array<Actuator>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Actuator>>;
public putActuators(actuator: Array<Actuator>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Actuator>>;
public putActuators(actuator: Array<Actuator>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
public updateActuators(actuator: Array<Actuator>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Actuator>;
public updateActuators(actuator: Array<Actuator>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Actuator>>;
public updateActuators(actuator: Array<Actuator>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Actuator>>;
public updateActuators(actuator: Array<Actuator>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (actuator === null || actuator === undefined) {
throw new Error('Required parameter actuator was null or undefined when calling putActuators.');
throw new Error('Required parameter actuator was null or undefined when calling updateActuators.');
}
let localVarHeaders = this.defaultHeaders;

View File

@ -236,25 +236,25 @@ export class SensorsService {
/**
* Sensors
* @param sensorType
* @param prototypeId
* @param sensorType
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public sensors(sensorType?: string, prototypeId?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<Sensor>>;
public sensors(sensorType?: string, prototypeId?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<Sensor>>>;
public sensors(sensorType?: string, prototypeId?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<Sensor>>>;
public sensors(sensorType?: string, prototypeId?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
public sensors(prototypeId?: number, sensorType?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<Sensor>>;
public sensors(prototypeId?: number, sensorType?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<Sensor>>>;
public sensors(prototypeId?: number, sensorType?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<Sensor>>>;
public sensors(prototypeId?: number, sensorType?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (sensorType !== undefined && sensorType !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>sensorType, 'sensor_type');
}
if (prototypeId !== undefined && prototypeId !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>prototypeId, 'prototype_id');
}
if (sensorType !== undefined && sensorType !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>sensorType, 'sensor_type');
}
let localVarHeaders = this.defaultHeaders;
@ -307,4 +307,78 @@ export class SensorsService {
);
}
/**
* Update Sensors
* @param sensor
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public updateSensors(sensor: Array<Sensor>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Sensor>;
public updateSensors(sensor: Array<Sensor>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Sensor>>;
public updateSensors(sensor: Array<Sensor>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Sensor>>;
public updateSensors(sensor: Array<Sensor>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (sensor === null || sensor === undefined) {
throw new Error('Required parameter sensor was null or undefined when calling updateSensors.');
}
let localVarHeaders = this.defaultHeaders;
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json'
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/sensors`;
return this.httpClient.request<Sensor>('put', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: sensor,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
}

View File

@ -16,6 +16,10 @@ export interface Sensor {
sensor_type: SensorType;
prototype_id: number;
sensor_id: number;
threshold_critically_low: number;
threshold_low: number;
threshold_high: number;
threshold_critically_high: number;
}
export namespace Sensor {
}