import { SERVICE_CALLS } from './service-calls';
import { AbstractService } from '@iotize/tap';
export class MqttService extends AbstractService {
    constructor() {
        super(...arguments);
        this.resources = SERVICE_CALLS;
    }
    /**
     * Get mqtt relay client id.. For firmware version <= 1.86, use serial number (resource /3//2)
     *
     * LWM2M path: /1024//52
     *
     * @tapVersion(">=1.86")
     * @return
     */
    getClientId() {
        return this.serviceCallRunner.execute(this.getClientIdCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//52
     *
     * @tapVersion(">=1.86")
     * @return call options
     */
    getClientIdCall() {
        const callOptions = Object.assign({}, this.resources.getClientId);
        return callOptions;
    }
    /**
     * Write mqtt relay client id. For firmware version <= 1.86, use serial number (resource /3//2)
     *
     * LWM2M path: /1024//52
     *
     * @tapVersion(">=1.86")
     * @param url input
     * @return
     */
    putClientId(
    /*
     *
     */
    url) {
        return this.serviceCallRunner.execute(this.putClientIdCall(url));
    }
    /**
     *
     *
     * LWM2M path: /1024//52
     *
     * @tapVersion(">=1.86")
     * @param url input
     * @return call options
     */
    putClientIdCall(
    /*
     *
     */
    url) {
        const callOptions = Object.assign({}, this.resources.putClientId);
        callOptions.body = url;
        return callOptions;
    }
    /**
     * Get mqtt relay login. For firmware version <= 1.86, use serial number (resource /3//2)
     *
     * LWM2M path: /1024//53
     *
     * @deprecated
     * @tapVersion(">=1.86")
     * @return
     */
    getUsername() {
        return this.serviceCallRunner.execute(this.getUsernameCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//53
     *
     * @deprecated
     * @tapVersion(">=1.86")
     * @return call options
     */
    getUsernameCall() {
        const callOptions = Object.assign({}, this.resources.getUsername);
        return callOptions;
    }
    /**
     * Write mqtt relay password id. For firmware version <= 1.86, use serial number (resource /3//2)
     *
     * LWM2M path: /1024//53
     *
     * @tapVersion(">=1.86")
     * @param url input
     * @return
     */
    putUsername(
    /*
     *
     */
    url) {
        return this.serviceCallRunner.execute(this.putUsernameCall(url));
    }
    /**
     *
     *
     * LWM2M path: /1024//53
     *
     * @tapVersion(">=1.86")
     * @param url input
     * @return call options
     */
    putUsernameCall(
    /*
     *
     */
    url) {
        const callOptions = Object.assign({}, this.resources.putUsername);
        callOptions.body = url;
        return callOptions;
    }
    /**
     * Get mqtt broker hostname
     *
     * LWM2M path: /1024//50
     *
     * @tapVersion(">=")
     * @return
     */
    getBrokerHostname() {
        return this.serviceCallRunner.execute(this.getBrokerHostnameCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//50
     *
     * @tapVersion(">=")
     * @return call options
     */
    getBrokerHostnameCall() {
        const callOptions = Object.assign({}, this.resources.getBrokerHostname);
        return callOptions;
    }
    /**
     * Write mqtt relay host
     *
     * LWM2M path: /1024//50
     *
     * @tapVersion(">=")
     * @param url input
     * @return
     */
    putBrokerHostname(
    /*
     *
     */
    url) {
        return this.serviceCallRunner.execute(this.putBrokerHostnameCall(url));
    }
    /**
     *
     *
     * LWM2M path: /1024//50
     *
     * @tapVersion(">=")
     * @param url input
     * @return call options
     */
    putBrokerHostnameCall(
    /*
     *
     */
    url) {
        const callOptions = Object.assign({}, this.resources.putBrokerHostname);
        callOptions.body = url;
        return callOptions;
    }
    /**
     * Get port of the mqtt broker
     *
     * LWM2M path: /1024//51
     *
     * @tapVersion(">=")
     * @return
     */
    getBrokerPort() {
        return this.serviceCallRunner.execute(this.getBrokerPortCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//51
     *
     * @tapVersion(">=")
     * @return call options
     */
    getBrokerPortCall() {
        const callOptions = Object.assign({}, this.resources.getBrokerPort);
        return callOptions;
    }
    /**
     * Write service name of the mqtt broker
     *
     * LWM2M path: /1024//51
     *
     * @tapVersion(">=")
     * @param url input
     * @return
     */
    putBrokerPort(
    /*
     *
     */
    url) {
        return this.serviceCallRunner.execute(this.putBrokerPortCall(url));
    }
    /**
     *
     *
     * LWM2M path: /1024//51
     *
     * @tapVersion(">=")
     * @param url input
     * @return call options
     */
    putBrokerPortCall(
    /*
     *
     */
    url) {
        const callOptions = Object.assign({}, this.resources.putBrokerPort);
        callOptions.body = url;
        return callOptions;
    }
    /**
     * Get the mqtt broker password
     *
     * LWM2M path: /1024//54
     *
     * @tapVersion(">=")
     * @return
     */
    getPassword() {
        return this.serviceCallRunner.execute(this.getPasswordCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//54
     *
     * @tapVersion(">=")
     * @return call options
     */
    getPasswordCall() {
        const callOptions = Object.assign({}, this.resources.getPassword);
        return callOptions;
    }
    /**
     * Write mqtt broker password
     *
     * LWM2M path: /1024//54
     *
     * @tapVersion(">=")
     * @param url input
     * @return
     */
    putPassword(
    /*
     *
     */
    url) {
        return this.serviceCallRunner.execute(this.putPasswordCall(url));
    }
    /**
     *
     *
     * LWM2M path: /1024//54
     *
     * @tapVersion(">=")
     * @param url input
     * @return call options
     */
    putPasswordCall(
    /*
     *
     */
    url) {
        const callOptions = Object.assign({}, this.resources.putPassword);
        callOptions.body = url;
        return callOptions;
    }
    /**
     * Get the mqtt relay net key for the server
     *
     * LWM2M path: /1024//55
     *
     * @tapVersion(">=")
     * @return
     */
    getRelayNetKey() {
        return this.serviceCallRunner.execute(this.getRelayNetKeyCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//55
     *
     * @tapVersion(">=")
     * @return call options
     */
    getRelayNetKeyCall() {
        const callOptions = Object.assign({}, this.resources.getRelayNetKey);
        return callOptions;
    }
    /**
     * Write mqtt relay net key
     *
     * LWM2M path: /1024//55
     *
     * @tapVersion(">=")
     * @param netkey input
     * @return
     */
    putRelayNetKey(
    /*
     *
     */
    netkey) {
        return this.serviceCallRunner.execute(this.putRelayNetKeyCall(netkey));
    }
    /**
     *
     *
     * LWM2M path: /1024//55
     *
     * @tapVersion(">=")
     * @param netkey input
     * @return call options
     */
    putRelayNetKeyCall(
    /*
     *
     */
    netkey) {
        const callOptions = Object.assign({}, this.resources.putRelayNetKey);
        callOptions.body = netkey;
        return callOptions;
    }
    /**
     * MQTT broker certificate data in PEM format for SSL mutual authentication, default is NULL
     *
     * LWM2M path: /1024//57
     *
     * @tapVersion(">=1.86")
     * @param value input
     * @return
     */
    putBrokerCertificate(
    /*
     * Up to 16kB
     */
    value) {
        return this.serviceCallRunner.execute(this.putBrokerCertificateCall(value));
    }
    putBrokerCertificateAppendCalls(
    /*
     * Up to 16kB
     */
    value, chunkSize) {
        return this.serviceCallRunner.createAppendCalls(this.putBrokerCertificateCall(value), chunkSize);
    }
    /**
     *
     *
     * LWM2M path: /1024//57
     *
     * @tapVersion(">=1.86")
     * @param value input
     * @return call options
     */
    putBrokerCertificateCall(
    /*
     * Up to 16kB
     */
    value) {
        const callOptions = Object.assign({}, this.resources.putBrokerCertificate);
        callOptions.body = value;
        return callOptions;
    }
    /**
     * Get MQTT relay topic prefix
     *
     * LWM2M path: /1024//58
     *
     * @tapVersion(">=1.86")
     * @return
     */
    getTopicPrefix() {
        return this.serviceCallRunner.execute(this.getTopicPrefixCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//58
     *
     * @tapVersion(">=1.86")
     * @return call options
     */
    getTopicPrefixCall() {
        const callOptions = Object.assign({}, this.resources.getTopicPrefix);
        return callOptions;
    }
    /**
     * Put MQTT relay topic prefix
     *
     * LWM2M path: /1024//58
     *
     * @tapVersion(">=1.86")
     * @param topicPrefix input
     * @return
     */
    putTopicPrefix(
    /*
     *
     */
    topicPrefix) {
        return this.serviceCallRunner.execute(this.putTopicPrefixCall(topicPrefix));
    }
    /**
     *
     *
     * LWM2M path: /1024//58
     *
     * @tapVersion(">=1.86")
     * @param topicPrefix input
     * @return call options
     */
    putTopicPrefixCall(
    /*
     *
     */
    topicPrefix) {
        const callOptions = Object.assign({}, this.resources.putTopicPrefix);
        callOptions.body = topicPrefix;
        return callOptions;
    }
    /**
     * Get mqtt request topic
     *
     * LWM2M path: /1024//58
     *
     * @tapVersion(">=1.86")
     * @return
     */
    getRequestTopic() {
        return this.serviceCallRunner.execute(this.getRequestTopicCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//58
     *
     * @tapVersion(">=1.86")
     * @return call options
     */
    getRequestTopicCall() {
        const callOptions = Object.assign({}, this.resources.getRequestTopic);
        return callOptions;
    }
    /**
     * Put mqtt request topic
     *
     * LWM2M path: /1024//58
     *
     * @tapVersion(">=1.86")
     * @param topic input
     * @return
     */
    putRequestTopic(
    /*
     *
     */
    topic) {
        return this.serviceCallRunner.execute(this.putRequestTopicCall(topic));
    }
    /**
     *
     *
     * LWM2M path: /1024//58
     *
     * @tapVersion(">=1.86")
     * @param topic input
     * @return call options
     */
    putRequestTopicCall(
    /*
     *
     */
    topic) {
        const callOptions = Object.assign({}, this.resources.putRequestTopic);
        callOptions.body = topic;
        return callOptions;
    }
    /**
     * Get MQTT response topic
     *
     * LWM2M path: /1024//59
     *
     * @tapVersion(">=1.107")
     * @return
     */
    getResponseTopic() {
        return this.serviceCallRunner.execute(this.getResponseTopicCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//59
     *
     * @tapVersion(">=1.107")
     * @return call options
     */
    getResponseTopicCall() {
        const callOptions = Object.assign({}, this.resources.getResponseTopic);
        return callOptions;
    }
    /**
     * Put MQTT response topic
     *
     * LWM2M path: /1024//59
     *
     * @tapVersion(">=1.107")
     * @param topic input
     * @return
     */
    putResponseTopic(
    /*
     *
     */
    topic) {
        return this.serviceCallRunner.execute(this.putResponseTopicCall(topic));
    }
    /**
     *
     *
     * LWM2M path: /1024//59
     *
     * @tapVersion(">=1.107")
     * @param topic input
     * @return call options
     */
    putResponseTopicCall(
    /*
     *
     */
    topic) {
        const callOptions = Object.assign({}, this.resources.putResponseTopic);
        callOptions.body = topic;
        return callOptions;
    }
}
//# sourceMappingURL=data:application/json;base64, 