Link a device to this service

REST: POST /overTheBox/{serviceName}/linkDevice
@param deviceId [required] The id of the device
@param serviceName [required] The internal name of your overTheBox offer
519133
public void serviceName_linkDevice_POST(String serviceName, String deviceId) throws IOException {
		String qPath = "/overTheBox/{serviceName}/linkDevice";
		StringBuilder sb = path(qPath, serviceName);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "deviceId", deviceId);
		exec(qPath, "POST", sb.toString(), o);
	}
622403
public DeviceTokenEnvelope getDeviceToken(String deviceId) throws ApiException {
        ApiResponse<DeviceTokenEnvelope> resp = getDeviceTokenWithHttpInfo(deviceId);
        return resp.getData();
    }
139763
public void serviceId_suspend_POST(Long serviceId) throws IOException {
		String qPath = "/service/{serviceId}/suspend";
		StringBuilder sb = path(qPath, serviceId);
		exec(qPath, "POST", sb.toString(), null);
	}
454812
@Override
    public void setDeviceProperties(final String deviceName, final Map<String, String[]> properties) throws DevFailed {
        final List<String> args = getArray(properties, deviceName);
        final DeviceData argin = new DeviceData();
        argin.insert(args.toArray(new String[args.size()]));
        database.command_inout("DbPutDeviceProperty", argin);
    }
518695
function (controlPoint, uuid, location, desc, localAddress) {
    EventEmitter.call(this);

    if (TRACE) {
        logger.info({
            method: "UpnpDevice",
            uuid: uuid,
        }, "new device object");
    }
    this.controlPoint = controlPoint;

    this.uuid = uuid;
    this.udn = desc.UDN[0];

    this.forgotten = false
    this.last_seen = (new Date()).getTime();

    this.location = location;

    this.deviceType = desc.deviceType ? desc.deviceType[0] : null;
    this.friendlyName = desc.friendlyName ? desc.friendlyName[0] : null;
    this.manufacturer = desc.manufacturer ? desc.manufacturer[0] : null;
    this.manufacturerUrl = desc.manufacturerURL ? desc.manufacturerURL[0] : null;
    this.modelNumber = desc.modelNumber ? desc.modelNumber[0] : null;
    this.modelDescription = desc.modelDescription ? desc.modelDescription[0] : null;
    this.modelName = desc.modelName ? desc.modelName[0] : null;
    this.modelUrl = desc.modelURL ? desc.modelURL[0] : null;
    this.softwareVersion = desc.softwareVersion ? desc.softwareVersion[0] : null;
    this.hardwareVersion = desc.hardwareVersion ? desc.hardwareVersion[0] : null;
    this.serialNum = desc.serialNum ? desc.serialNum[0] : null;

    var u = url.parse(this.location);
    this.host = u.hostname;
    this.port = u.port;

    this.localAddress = localAddress;

    this.devices = {}; // sub-devices

    this.services = {};

    this._handleDeviceInfo(desc);

    if (seend[this.uuid] === undefined) {
        seend[this.uuid] = true;
        logger.info({
            method: "UpnpDevice",
            device: {
                loction: this.location,
                uuid: this.uuid,
                deviceType: this.deviceType,
                friendlyName: this.friendlyName,
                manufacturer: this.manufacturer,
                manufacturerUrl: this.manufacturerURL,
                modelNumber: this.modelNumber,
                modelDescription: this.modelDescription,
                modelName: this.modelName,
                modelUrl: this.modelURL,
            }
        }, "previously unseen UPnP device");
    }
    // var self = this;
    // this._getDeviceDetails(function(desc) {
    // self._handleDeviceInfo(desc);
    // });

}
586962
public void insert(final DeviceData deviceData, final DevVarDoubleStringArray argin) {
        DevVarDoubleStringArrayHelper.insert(deviceData.getAny(), argin);
    }
562040
public void insert(final DeviceData deviceData, final String argin) {
        DevStringHelper.insert(deviceData.getAny(), argin);
    }
571181
void setDeviceId(int nDeviceId) {
        synchronized (LOCK) {
            // Move this instance inside the HashMaps
            INSTANCES.get(connection()).remove(getDeviceId());
            INSTANCES.get(connection()).put(nDeviceId, this);

            this.deviceId = nDeviceId;
        }
    }
240570
public Device addDevice(String id, String token) throws DuplicateDeviceException, NullIdException, NullDeviceTokenException, Exception {
		if ((id == null) || (id.trim().equals(""))) {
			throw new NullIdException();
		} else if ((token == null) || (token.trim().equals(""))) {
			throw new NullDeviceTokenException();
		} else {
			if (!this.devices.containsKey(id)) {
				token = token.trim().replace(" ", "");
				BasicDevice device = new BasicDevice(id, token, new Timestamp(Calendar.getInstance().getTime().getTime()));
				this.devices.put(id, device);
				return device;
			} else {
				throw new DuplicateDeviceException();
			}
		}
	}
725557
@Override
    public void setDeviceLink(ConnectionLink next) {
        super.setDeviceLink(next);
        this.deviceServiceContext = (TCPConnectionContext) getDeviceLink().getChannelAccessor();
        this.deviceReadInterface = this.deviceServiceContext.getReadInterface();
        this.deviceWriteInterface = this.deviceServiceContext.getWriteInterface();
    }
548112
public function subscribeDevicesToTopic($topicId = null, $deviceTokens = array())
    {
        if(!$topicId || empty($deviceTokens)){
            throw new \InvalidArgumentException("Please check arguments!");
        }

        return $this->client->addTopicSubscription($topicId, $deviceTokens);
    }
669280
def set_device_name(self, newname):
        
        return self.write(request.SetDeviceName(self.seq, *self.prep_str(newname)))
367288
public void resetLink(String linkName) 
    throws SIMPRuntimeOperationFailedException 
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "resetLink", linkName);
    
    try
    {  
      destinationManager.resetLink(linkName);
    }
    catch (Exception e)
    {
      // No FFDC code needed.
      throw new SIMPRuntimeOperationFailedException(e);
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "resetLink");    
	}
1264212
@SuppressLint("CommitPrefEdits")
    String forceUpdateDeviceId(String id) {
        getConfigLogger().verbose(this.config.getAccountId(),"Force updating the device ID to " + id);
        synchronized (deviceIDLock) {
            StorageHelper.putString(context, getDeviceIdStorageKey(), id);
        }
        return id;
    }
818914
public URL copyWithService(String serviceUUID) {
        return new URL(this.protocol, this.adapterAddress, this.deviceAddress, this.deviceAttributes,
                serviceUUID, null, null);
    }
408711
public DeviceTokenEnvelope updateDeviceToken(String deviceId) throws ApiException {
        ApiResponse<DeviceTokenEnvelope> resp = updateDeviceTokenWithHttpInfo(deviceId);
        return resp.getData();
    }
609969
public void serviceName_vpn_id_PUT(String serviceName, Long id, OvhVpn body) throws IOException {
		String qPath = "/router/{serviceName}/vpn/{id}";
		StringBuilder sb = path(qPath, serviceName, id);
		exec(qPath, "PUT", sb.toString(), body);
	}