generated from rmcguire/go-server-with-otel
add set mode option
This commit is contained in:
@@ -67,9 +67,55 @@
|
||||
"EconetService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1alpha1/devices/{serialNumber}/mode": {
|
||||
"post": {
|
||||
"operationId": "EconetService_SetMode",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1alpha1SetModeResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "serialNumber",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EconetServiceSetModeBody"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"EconetService"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"EconetServiceSetModeBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"mode": {
|
||||
"$ref": "#/definitions/v1alpha1Mode"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -190,6 +236,31 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1alpha1Mode": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"MODE_UNSPECIFIED",
|
||||
"MODE_OFF",
|
||||
"MODE_ELECTRIC",
|
||||
"MODE_ENERGY_SAVING",
|
||||
"MODE_HEAT_PUMP",
|
||||
"MODE_HIGH_DEMAND",
|
||||
"MODE_GAS",
|
||||
"MODE_PERFORMANCE",
|
||||
"MODE_VACATION"
|
||||
],
|
||||
"default": "MODE_UNSPECIFIED",
|
||||
"description": "Mode is a settable operating mode for a water heater. The values mirror the\nkebab-case slugs reported in Device.mode. Not every device supports every\nmode; the supported set is device-specific (derived from the unit's reported\nmode list), so SetMode validates against the target device."
|
||||
},
|
||||
"v1alpha1SetModeResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"device": {
|
||||
"$ref": "#/definitions/v1alpha1Device",
|
||||
"description": "Last-known device state. The mode change is applied asynchronously by the\nRheem cloud, so this reflects the requested mode only after a later poll."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user