<pre>
Describes all violations in a client request.
</pre>

<code>repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;</code>
6970
public java.util.List<com.google.rpc.BadRequest.FieldViolation> getFieldViolationsList() {
    return fieldViolations_;
  }
1102392
def violations(self):
        
        return self._all_violations if self.config.fail_on == FAIL_ON_ANY else self._diff_violations
569178
private boolean isAllowed(Field field) {
        return ClassUtils.isPrimitiveOrWrapper(field.getType())
                || CharSequence.class.isAssignableFrom(field.getType())
                || List.class.isAssignableFrom(field.getType());
    }
1069938
public IterableOfProtosFluentAssertion<M> usingDoubleToleranceForFields(
      double tolerance, int firstFieldNumber, int... rest) {
    return usingConfig(
        config.usingDoubleToleranceForFields(tolerance, asList(firstFieldNumber, rest)));
  }
1319426
@ExceptionHandler(MethodArgumentNotValidException.class)
  @ResponseStatus(HttpStatus.BAD_REQUEST)
  @ResponseBody
  public ValidationResultInterface processValidationError(
      final MethodArgumentNotValidException pexception) {
    final BindingResult result = pexception.getBindingResult();
    final List<FieldError> fieldErrors = result.getFieldErrors();

    return processFieldErrors(fieldErrors);
  }
932314
public static String repeatedGetCountMethodName(Field field) {
        if (field.isRepeated()) {
            return GETTER_PREFIX + Formatter.toPascalCase(field.getName()) + "Count";
        }
        throw new IllegalArgumentException(field.toString());
    }
368050
@Override
    public FieldVisitor visitField(final int access, final String name,
            final String desc, final String signature, final Object value) {
        if (computeSVUID) {
            if ("serialVersionUID".equals(name)) {
                // since the class already has SVUID, we won't be computing it.
                computeSVUID = false;
                hasSVUID = true;
            }
            /*
             * Remember field for SVUID computation For field modifiers, only
             * the ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC,
             * ACC_FINAL, ACC_VOLATILE, and ACC_TRANSIENT flags are used when
             * computing serialVersionUID values.
             */
            if ((access & Opcodes.ACC_PRIVATE) == 0
                    || (access & (Opcodes.ACC_STATIC | Opcodes.ACC_TRANSIENT)) == 0) {
                int mods = access
                        & (Opcodes.ACC_PUBLIC | Opcodes.ACC_PRIVATE
                                | Opcodes.ACC_PROTECTED | Opcodes.ACC_STATIC
                                | Opcodes.ACC_FINAL | Opcodes.ACC_VOLATILE | Opcodes.ACC_TRANSIENT);
                svuidFields.add(new Item(name, mods, desc));
            }
        }

        return super.visitField(access, name, desc, signature, value);
    }
965202
public void rejectValue(final String field, final Class<?> fieldType, final String[] errorCodes, 
            final Map<String, Object> messageVariables, final String defaultMessage) {
        
        String[] codes = new String[0];
        for(String errorCode : errorCodes) {
            codes = Utils.concat(codes, messageCodeGenerator.generateCodes(errorCode, getObjectName(), field, fieldType));
        }
        
        addError(new CsvFieldError(getObjectName(), field, false, codes, messageVariables, defaultMessage));
        
    }
547633
private Violation isFieldImmutable(
      Optional<Tree> tree,
      ImmutableSet<String> immutableTyParams,
      ClassSymbol classSym,
      ClassType classType,
      VarSymbol var,
      ViolationReporter reporter) {
    if (bugChecker.isSuppressed(var)) {
      return Violation.absent();
    }
    if (!var.getModifiers().contains(Modifier.FINAL)
        && !ASTHelpers.hasAnnotation(var, LazyInit.class, state)) {

      Violation info =
          Violation.of(
              String.format(
                  "'%s' has non-final field '%s'",
                  threadSafety.getPrettyName(classSym), var.getSimpleName()));
      if (tree.isPresent()) {
        // If we have a tree to attach diagnostics to, report the error immediately instead of
        // accumulating the path to the error from the top-level class being checked
        state.reportMatch(
            reporter.report(
                tree.get(), info, SuggestedFixes.addModifiers(tree.get(), state, Modifier.FINAL)));
        return Violation.absent();
      }
      return info;
    }
    Type varType = state.getTypes().memberType(classType, var);
    Violation info =
        threadSafety.isThreadSafeType(
            /* allowContainerTypeParameters= */ true, immutableTyParams, varType);
    if (info.isPresent()) {
      info =
          info.plus(
              String.format(
                  "'%s' has field '%s' of type '%s'",
                  threadSafety.getPrettyName(classSym), var.getSimpleName(), varType));
      if (tree.isPresent()) {
        // If we have a tree to attach diagnostics to, report the error immediately instead of
        // accumulating the path to the error from the top-level class being checked
        state.reportMatch(reporter.report(tree.get(), info, Optional.empty()));
        return Violation.absent();
      }
      return info;
    }
    return Violation.absent();
  }
747679
public InternalFieldErrorBuilder createFieldError(final String field, final String errorCode) {
        
        return createFieldError(field, new String[]{errorCode});
        
    }
1167970
public FieldDescriptor[] getAllRwFields()
    {
        if (m_RwFieldDescriptors == null)
        {
            FieldDescriptor[] fields = getFieldDescriptions();
            Collection rwFields = new ArrayList();

            for (int i = 0; i < fields.length; i++)
            {
                FieldDescriptor fd = fields[i];
                /*
                arminw: if locking is enabled and the increment of locking
                values is done by the database, the field is read-only
                */
                if(fd.isAccessReadOnly() || (fd.isLocking() && !fd.isUpdateLock()))
                {
                    continue;
                }
                rwFields.add(fd);
            }
            m_RwFieldDescriptors =
                (FieldDescriptor[]) rwFields.toArray(new FieldDescriptor[rwFields.size()]);
        }

        return m_RwFieldDescriptors;
    }
197755
@Override
    public void isValid() throws Exception {
        if (numStmnts() >= 2) {
            if (primaryJoinableHooks.size() > 0) {
                for (String joinField:primaryJoinableHooks) {
                    if (joinField.equals("timestamp")) {// timestamp is implicitly present in the result.
                        continue;
                    }
                    for (QueryMeta query: getAllStmnts()) {
                        boolean isPresent = false;
                        if (query instanceof BaseAggQueryMeta) {// Since BaseAggQueryMeta is also a PlainDimQueryMeta we go with former first.
                            for (AggItem item:((BaseAggQueryMeta)query).aggregations) {
                                if (joinField.equals(item.fieldName) || (item.asName != null && joinField.equals(item.asName))) {
                                    isPresent = true;
                                }
                            }
                        }
                        if (query instanceof PlainDimQueryMeta) {
                            Map<String, String> dims = ((PlainDimQueryMeta)query).fetchDimensions;
                            for (Map.Entry<String, String> entry :dims.entrySet()) {
                                if (joinField.equals(entry.getKey()) || (entry.getValue() != null && joinField.equals(entry.getValue()))) {
                                    isPresent = true;
                                }
                            }
                        }
                        if (!isPresent) {
                            String error = joinField + " mentioned in the composite key should appear in all the data sources being queried and joined.";
                            throw new Exception(error);
                        }
                    }
                }
            } else {
                String error = "Need atleast one field to join on";
                throw new Exception(error);
            }
        }
    }
148234
public static <C> UnsafeFieldAccess<C> get(Field f) {
		
		Class<?> type = f.getType();
		
		if (type.isPrimitive()) {
			if (java.lang.Boolean.TYPE == type) {
				return new UnsafeBooleanFieldAccess<C>(f);
			} else if (java.lang.Byte.TYPE == type) {
				return new UnsafeByteFieldAccess<C>(f);
			} else if (java.lang.Character.TYPE == type) {
				return new UnsafeCharFieldAccess<C>(f);
			} else if (java.lang.Short.TYPE == type) {
				return new UnsafeShortFieldAccess<C>(f);
			} else if (java.lang.Integer.TYPE == type) {
				return new UnsafeIntFieldAccess<C>(f);
			} else if (java.lang.Long.TYPE == type) {
				return new UnsafeLongFieldAccess<C>(f);
			} else if (java.lang.Float.TYPE == type) {
				return new UnsafeFloatFieldAccess<C>(f);
			} else if (java.lang.Double.TYPE == type) {
				return new UnsafeDoubleFieldAccess<C>(f);
			}
		}
		return new UnsafeFieldAccess<C>(f);
	}
882427
public void rejectValue(final String field, final String errorCode) {
        rejectValue(field, null, errorCode, Collections.emptyMap(), null);
        
    }
289676
@Override
    @SuppressWarnings("deprecation")
    public RequestCtx handleRequest(HttpServletRequest request,
                                    HttpServletResponse response)
            throws IOException, ServletException {
        if (request.getPathInfo() != null) {
            logger.error("Bad request: " + request.getRequestURI());
            throw new ServletException("Bad request: "
                    + request.getRequestURI());
        }

        RequestCtx req = null;

        String pid = request.getParameter("PID");
        String dissID = "sDefPID";
        String methodName = request.getParameter("methodName");
        String dateTime = request.getParameter("asOfDateTime");

        if (logger.isDebugEnabled()) {
            logger.debug("PID: {} sDefPID {} methodName {}", pid, dissID, methodName);
        }

        Map<URI, AttributeValue> actions = new HashMap<URI, AttributeValue>();
        Map<URI, AttributeValue> resAttr;

        String logAction = null;

        // Starting assumption is that we are doing a GetObjectProfile
        actions.put(Constants.ACTION.ID.getURI(),
                    Constants.ACTION.GET_DISSEMINATION
                            .getStringAttribute());
        logAction =
                Constants.ACTION.GET_DISSEMINATION.uri;

        try {
            resAttr = ResourceAttributes.getResources(pid);
            
            if (dissID != null && !dissID.isEmpty()) {
                resAttr.put(Constants.DISSEMINATOR.ID.getURI(),
                            new StringAttribute(dissID));
            }
            if (methodName != null && !methodName.isEmpty()) {
                resAttr.put(Constants.DISSEMINATOR.METHOD.getURI(),
                            new StringAttribute(methodName));
            }
            if (dateTime != null && !dateTime.isEmpty()) {
                resAttr.put(Constants.DATASTREAM.AS_OF_DATETIME.getURI(),
                            DateTimeAttribute.getInstance(dateTime));
            }

            actions.put(Constants.ACTION.API.getURI(),
                        Constants.ACTION.APIA.getStringAttribute());

            req =
                    getContextHandler().buildRequest(getSubjects(request),
                                                     actions,
                                                     resAttr,
                                                     getEnvironment(request));

            LogUtil.statLog(request.getRemoteUser(), logAction, pid, dissID);
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            throw new ServletException(e);
        }

        return req;
    }
826164
public MapWithProtoValuesFluentAssertion<M> usingDoubleToleranceForFieldDescriptorsForValues(
      double tolerance, FieldDescriptor firstFieldDescriptor, FieldDescriptor... rest) {
    return usingConfig(
        config.usingDoubleToleranceForFieldDescriptors(
            tolerance, asList(firstFieldDescriptor, rest)));
  }
474149
protected boolean complianceViolation(HttpComplianceSection violation, String reason) {
        if (_compliances.contains(violation))
            return true;
        if (reason == null)
            reason = violation.description;
        if (_complianceHandler != null)
            _complianceHandler.onComplianceViolation(_compliance, violation, reason);

        return false;
    }