Ensure the given argument is a valid saved search ID.

 @param id [String] saved search ID
 @return true if valid
 @raise Wavefront::Exceptions::InvalidSavedSearchId if not valid
163408
def wf_savedsearch_id?(id)
      return true if id.is_a?(String) && id =~ /^\w{8}$/
      raise Wavefront::Exception::InvalidSavedSearchId
    end
447985
def valid_id(opts, id_):
    '''
    
    '''
    try:
        if any(x in id_ for x in ('/', '\\', str('\0'))):
            return False
        return bool(clean_path(opts['pki_dir'], id_))
    except (AttributeError, KeyError, TypeError, UnicodeDecodeError):
        return False
514449
function(view_config, id) {

		if (Lava.schema.DEBUG && !Lava.isValidId(id)) Lava.t();
		view_config.id = id;

	}
1126763
public static boolean isValidId(String id) {
		if(id == null) return false;
		int len = id.length();
		if(len == 0) return false;
		// First character must be [A-Za-z]
		char ch = id.charAt(0);
		if(
			(ch<'A' || ch>'Z')
			&& (ch<'a' || ch>'z')
		) {
			return false;
		}
		// Remaining characters must match [A-Za-z0-9:_.-]
		for(int i = 1; i < len; i++) {
			if(
				(ch < 'A' || ch > 'Z')
				&& (ch < 'a' || ch > 'z')
				&& (ch < '0' || ch > '9')
				&& ch != ':'
				&& ch != '_'
				&& ch != '.'
				&& ch != '-'
			) {
				return false;
			}
		}
		return true;
	}
1055657
int flags(int id) {
    int result = 0;
    if (isPersisted(id)) result |= Settings.PERSISTED;
    if (persistValue(id)) result |= Settings.PERSIST_VALUE;
    return result;
  }
1074558
def should_see_id(self, element_id):
    

    elements = ElementSelector(
        world.browser,
        'id("%s")' % element_id,
        filter_displayed=True,
    )
    if not elements:
        raise AssertionError("Expected element with given id.")
280450
def usable_id(cls, id):
        
        try:
            qry_id = int(id)
        except Exception:
            qry_id = None

        if not qry_id:
            msg = 'unknown identifier %s' % id
            cls.error(msg)

        return qry_id
75938
public boolean containsKey(Object id) {
        final String methodName = "containsKey()";
        boolean found = false;

        if (!this.invalidationBuffer.contains(id)) {
            try {
                rwLock.readLock().lock();
                found = object_cache.containsKey(id);
            } catch (Throwable t) {
                com.ibm.ws.ffdc.FFDCFilter.processException(t, "com.ibm.ws.cache.HTODDynacache.containsKey", "1877", this);
                if (tc.isDebugEnabled())
                    Tr.debug(tc, methodName, "cacheName=" + this.cacheName + "\nException: " + ExceptionUtility.getStackTrace(t));
            } finally {
                rwLock.readLock().unlock();
            }
        }
        return found;
    }
588623
public boolean isSelected(String id) {
        for (JQMCheckbox box : checks) {
            if (id.equals(box.getId()))
                return box.isChecked();
        }
        return false;
    }
926019
@SuppressWarnings({"ConstantConditions", "squid:S2583"})
    private static CharSequence validate(CharSequence id) {
        if (id == null) {
            throw new IllegalArgumentException("Exception ID can't be null");
        }
        if (isInvalid(id)) {
            throw new IllegalArgumentException(
                "Invalid ID given as an Exception ID: " + id
            );
        }
        return id;
    }
434992
@InterfaceAudience.Private
    public static boolean isValidDocumentId(String id) {
        // http://wiki.apache.org/couchdb/HTTP_Document_API#Documents
        if (id == null || id.length() == 0)
            return false;
        if (id.charAt(0) == '_')
            return (id.startsWith("_design/"));
        return true;
        // "_local/*" is not a valid document ID.
        // Local docs have their own API and shouldn't get here.
    }
1007600
def type_id=(id)
      type_id = id.to_i

      raise InvalidShippingTypeError,
        "invalid #{id.inspect} type id" unless TYPE.value?(type_id)

      @type_id = type_id
      @type_name = TYPE.key(type_id)
    end
637758
public static void checkId(CmsUUID id, boolean canBeNull) {

        if (canBeNull && (id == null)) {
            return;
        }
        if ((!canBeNull && (id == null)) || id.isNullUUID()) {
            throw new IllegalArgumentException(Messages.get().key(Messages.ERR_INVALID_UUID_1, id));
        }
    }
593477
def id(self, id):
        
        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")
        if id is not None and not re.search('^[A-Za-z0-9]{32}', id):
            raise ValueError("Invalid value for `id`, must be a follow pattern or equal to `/^[A-Za-z0-9]{32}/`")

        self._id = id
921334
public static boolean isResourceTypeIdFree(int id) {

        try {
            OpenCms.getResourceManager().getResourceType(id);
        } catch (CmsLoaderException e) {
            return true;
        }
        return false;
    }
148127
def _validate_logical_id(cls, logical_id):
        
        pattern = re.compile(r'^[A-Za-z0-9]+$')
        if logical_id is not None and pattern.match(logical_id):
            return True
        raise InvalidResourceException(logical_id, "Logical ids must be alphanumeric.")
775399
public boolean isPresentInExternalStore(String id) {
        if (_sessions != null) {
            return ((BackedHashMap) _sessions).isPresent(id);
        }
        return false;
    }