<pre>
Unique name for the device containing the resource.
</pre>

<code>optional string device = 1;</code>
420877
public java.lang.String getDevice() {
    java.lang.Object ref = device_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      device_ = s;
      return s;
    }
  }
1091703
protected static String uniqueClassName(String name) {
    // Make a unique class name
    String cname = xml2jname(name);
    if( CLASS_NAMES.contains(cname) ) {
      int i=0;
      while( CLASS_NAMES.contains(cname+i) ) i++;
      cname = cname+i;
    }
    CLASS_NAMES.add(cname);
    return cname;
  }
657086
public synchronized ObjectName uniqueObjectName(MBeanServer server, String on)
    {
        ObjectName oName=null;
        try{oName=new ObjectName(on+",config="+_config.getClass().getName());}
        catch(Exception e){log.warn(LogSupport.EXCEPTION,e);}
        
        return oName;
    }
591175
static String determineResourceName(final AttachmentResource attachmentResource, final boolean includeExtension) {
		final String datasourceName = attachmentResource.getDataSource().getName();

		String resourceName;

		if (!valueNullOrEmpty(attachmentResource.getName())) {
			resourceName = attachmentResource.getName();
		} else if (!valueNullOrEmpty(datasourceName)) {
			resourceName = datasourceName;
		} else {
			resourceName = "resource" + UUID.randomUUID();
		}
		if (includeExtension && !valueNullOrEmpty(datasourceName)) {
			@SuppressWarnings("UnnecessaryLocalVariable")
			final String possibleFilename = datasourceName;
			if (!resourceName.contains(".") && possibleFilename.contains(".")) {
				final String extension = possibleFilename.substring(possibleFilename.lastIndexOf("."));
				if (!resourceName.endsWith(extension)) {
					resourceName += extension;
				}
			}
		} else if (!includeExtension && resourceName.contains(".") && resourceName.equals(datasourceName)) {
			final String extension = resourceName.substring(resourceName.lastIndexOf("."));
			resourceName = resourceName.replace(extension, "");
		}
		return resourceName;
	}
368839
@Override
	public String getUniqueId() {
		final String sourceMethod = "getUniqueId"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(AggregatorExtension.class.getName(), sourceMethod);
			log.exiting(AggregatorExtension.class.getName(), sourceMethod, uniqueId);
		}
		return uniqueId;
	}
427027
def _new_device_id(self, key):
        
        device_id = Id.SERVER + 1
        if key in self._key2deviceId:
            return self._key2deviceId[key]
        while device_id in self._clients:
            device_id += 1
        return device_id
727000
public static String createUniqueIdentifier() {
		String id;
		do {
			id = UUID.randomUUID().toString();
		} while (getSREFromId(id) != null);
		return id;
	}
1329118
public UniqueModel unique(String uniqueName) {
		checkReadOnly();
		UniqueModel unique = new UniqueModel();
		unique.setName(uniqueName);
		unique.setTableModel(this);
		getUniqueConsts().add(unique);
		return unique;
	}
83025
private String getCallerUniqueName() throws WIMApplicationException {
        String uniqueName = null;
        Subject subject = null;
        WSCredential cred = null;

        try {
            /* Get the subject */
            if ((subject = WSSubject.getRunAsSubject()) == null) {
                subject = WSSubject.getCallerSubject();
            }

            /* Get the credential */
            if (subject != null) {
                Iterator<WSCredential> iter = subject.getPublicCredentials(WSCredential.class).iterator();
                if (iter.hasNext()) {
                    cred = iter.next();
                }
                //check if credentials is null , then throw exception
                if (null == cred) {
                    throw new WIMApplicationException(WIMMessageKey.AUTH_SUBJECT_CRED_FAILURE, Tr.formatMessage(tc, WIMMessageKey.AUTH_SUBJECT_CRED_FAILURE));
                }
            }
            //throw exception when subject is null
            else {
                throw new WIMApplicationException(WIMMessageKey.AUTH_SUBJECT_FAILURE, Tr.formatMessage(tc, WIMMessageKey.AUTH_SUBJECT_FAILURE));
            }

            /* Get the unique name */
            uniqueName = cred.getUniqueSecurityName();
            if (null == uniqueName) {
                throw new WIMApplicationException(WIMMessageKey.AUTH_SUBJECT_CRED_FAILURE, Tr.formatMessage(tc, WIMMessageKey.AUTH_SUBJECT_CRED_FAILURE));
            }
        } //throw exception in case there is some issue while retrieving authentication details from subject
        catch (Exception excp) {
            //check if Auth subject failure OR auth credential failure to give relevant message in exception
            if (WIMMessageKey.AUTH_SUBJECT_FAILURE.equals(excp.getMessage())) {
                throw new WIMApplicationException(WIMMessageKey.AUTH_SUBJECT_FAILURE, Tr.formatMessage(tc, WIMMessageKey.AUTH_SUBJECT_FAILURE));
            } else {
                throw new WIMApplicationException(WIMMessageKey.AUTH_SUBJECT_CRED_FAILURE, Tr.formatMessage(tc, WIMMessageKey.AUTH_SUBJECT_CRED_FAILURE));
            }
        }

        //return unique name obtained from subject
        return uniqueName;
    }
784046
private static UsbDevice findDeviceByNameLowLevel(final String name) throws KNXException
	{
		final List<String> list = getDeviceDescriptionsLowLevel();
		if (name.isEmpty())
			list.removeIf(i -> !isKnxInterfaceId(i.substring(i.indexOf("ID") + 3, i.indexOf("\n"))));
		else
			list.removeIf(i -> i.toLowerCase().indexOf(name.toLowerCase()) == -1);
		if (list.isEmpty())
			throw new KNXException("no USB device found with name matching '" + name + "'");

		final String desc = list.get(0);
		final String id = desc.substring(desc.indexOf("ID") + 3, desc.indexOf("\n"));
		return findDevice(id);
	}
471700
function (identifier)  {
    var path;
    if (identifier) {
      path = this.constructPath(constants.DEVICES, identifier);
      return this.Core.DELETE(path);
    } else {
      return this.rejectRequest('Bad Request: A device identifier is required.');
    }
  }
395866
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
    public static String generateDeviceId(@NonNull Context context) {

        String deviceId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);

        if (TextUtils.isEmpty(deviceId)) {
            deviceId = getMacAddress(context);
        }

        if (TextUtils.isEmpty(deviceId)) {
            try {
                deviceId = FirebaseInstanceId.getInstance().getId();
            } catch (IllegalStateException e) {
                //Continue.
            }
        }

        if (TextUtils.isEmpty(deviceId)) {
            deviceId = UUID.randomUUID().toString();
        }

        return deviceId;
    }
572093
@Nullable public Hardware getHardware(final String hardwareUUID, final String locationUUID)
        throws FlexiantException {

        checkNotNull(hardwareUUID);

        String[] parts = hardwareUUID.split(":");

        checkArgument(parts.length == 2, "Expected hardwareUUID to contain :");

        final ProductOffer machineOffer =
            this.getResource(parts[0], ResourceType.PRODUCTOFFER, ProductOffer.class);
        final ProductOffer diskOffer =
            this.getResource(parts[1], ResourceType.PRODUCTOFFER, ProductOffer.class);


        if (machineOffer == null || diskOffer == null) {
            return null;
        }
        return Hardware.from(machineOffer, diskOffer, locationUUID);
    }
1363818
public String createUniqueName(String name) {
		if (!isDuplicateName(name)) {
			return name;
		}
		if (name.matches(".*\\(\\d*\\)")) { //$NON-NLS-1$
			final int start = name.lastIndexOf('(');
			final int end = name.lastIndexOf(')');
			final String stringInt = name.substring(start + 1, end);
			final int numericValue = Integer.parseInt(stringInt);
			final String newName = name.substring(0, start + 1) + (numericValue + 1) + ")"; //$NON-NLS-1$
			return createUniqueName(newName);
		}
		return createUniqueName(name + " (1)"); //$NON-NLS-1$
	}
914015
@Override
    public StringColumn unique() {
        List<String> strings = new ArrayList<>(lookupTable.asSet());
        return StringColumn.create(name() + " Unique values", strings);
    }
379049
function (containerId) {
			for (var property in winble.deviceManager.deviceList) {
				if (winble.deviceManager.deviceList[property] && winble.deviceManager.deviceList[property].containerId == containerId)
					return (winble.deviceManager.deviceList[property]);
			}
			return (null);
		}
871349
def new_device(self, name, type):
        
        # at least android client also includes a "cid" with is derived from the unique device id
        # and encrypted with a public key in the apk.  The field appears to be optional
        url = posixpath.join(self.rootpath, name)
        r = self.post(url, {'type': type})
        return r