@softchef/cdk-iot-device-management
Version:
IoT device management is composed of things, thing types, thing groups, jobs, files API services. The constructs can be used independently, that are based on full-managed service to create an API Gateway & Lambda function.
113 lines (112 loc) • 4.81 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.IoTDataPlane = void 0;
const DeleteThingShadowCommand_1 = require("./commands/DeleteThingShadowCommand");
const GetRetainedMessageCommand_1 = require("./commands/GetRetainedMessageCommand");
const GetThingShadowCommand_1 = require("./commands/GetThingShadowCommand");
const ListNamedShadowsForThingCommand_1 = require("./commands/ListNamedShadowsForThingCommand");
const ListRetainedMessagesCommand_1 = require("./commands/ListRetainedMessagesCommand");
const PublishCommand_1 = require("./commands/PublishCommand");
const UpdateThingShadowCommand_1 = require("./commands/UpdateThingShadowCommand");
const IoTDataPlaneClient_1 = require("./IoTDataPlaneClient");
class IoTDataPlane extends IoTDataPlaneClient_1.IoTDataPlaneClient {
deleteThingShadow(args, optionsOrCb, cb) {
const command = new DeleteThingShadowCommand_1.DeleteThingShadowCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getRetainedMessage(args, optionsOrCb, cb) {
const command = new GetRetainedMessageCommand_1.GetRetainedMessageCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getThingShadow(args, optionsOrCb, cb) {
const command = new GetThingShadowCommand_1.GetThingShadowCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
listNamedShadowsForThing(args, optionsOrCb, cb) {
const command = new ListNamedShadowsForThingCommand_1.ListNamedShadowsForThingCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
listRetainedMessages(args, optionsOrCb, cb) {
const command = new ListRetainedMessagesCommand_1.ListRetainedMessagesCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
publish(args, optionsOrCb, cb) {
const command = new PublishCommand_1.PublishCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
updateThingShadow(args, optionsOrCb, cb) {
const command = new UpdateThingShadowCommand_1.UpdateThingShadowCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
}
exports.IoTDataPlane = IoTDataPlane;