<p>
validate.
</p>

@param request
a {@link com.apitrary.api.request.Request} object.
@param <T>
a T object.
@throws com.apitrary.api.client.exception.ValidationConstraintViolationException
if any.
162734
public static <T> void validate(Request<T> request) throws ValidationConstraintViolationException {
		if (request != null) {
			Class<?> clazz = request.getClass();
			List<ConstraintViolation> leafs = new LinkedList<ConstraintViolation>();

			Field[] fields = clazz.getDeclaredFields();
			for (Field field : fields) {
				if (null != field.getAnnotation(Required.class)) {

					field.setAccessible(true);
					Object value = null;
					try {
						value = field.get(request);
					} catch (Exception e) {
						// not cool...
						throw new ValidationConstraintViolationException(e);
					}

					if (value == null || value instanceof String && ((String) value).isEmpty()) {
						ConstraintViolation violation = ConstraintViolation.newConstraintViolation("@" + Required.class.getSimpleName(), field);
						leafs.add(violation);
					}
				}
			}

			if (!leafs.isEmpty()) {
				throw new ValidationConstraintViolationException(preMessage, leafs);
			}
		}
	}
68176
@Override
    public void validate() throws Exception {
        super.validate();
        this.parse();
        Assert.assertTrue(
                String.format(
                        "Lower bound %d should be less than upper bound %d",
                        lower,
                        upper),
                lower <= upper);
        Assert.assertFalse(
                "The range is empty",
                !this.includeLower
                    && !this.includeUpper
                    && (this.upper - this.lower) <= 1);
        Assert.assertFalse(
                "The range is empty",
                !(this.includeLower && this.includeUpper)
                    && (this.upper - this.lower) < 1);
    }
329230
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSString withdefaults_validator = new MPSString();
		withdefaults_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 32);
		withdefaults_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		withdefaults_validator.validate(operationType, withdefaults, "\"withdefaults\"");
		
		MPSString response_validator = new MPSString();
		response_validator.validate(operationType, response, "\"response\"");
		
		MPSIPAddress ns_ip_address_validator = new MPSIPAddress();
		ns_ip_address_validator.validate(operationType, ns_ip_address, "\"ns_ip_address\"");
		
	}
175666
private void validateRequest( DownloadRequest dreq )
            throws ErrorResponseException
    {
        String path = dreq.getPath();
        if ( path.endsWith( ResourceCatalog.VERSION_XML_FILENAME ) || path.indexOf( "__" ) != -1 )
        {
            throw new ErrorResponseException( DownloadResponse.getNoContentResponse() );
        }
    }
661688
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSIPAddress device_ipaddress_validator = new MPSIPAddress();
		device_ipaddress_validator.validate(operationType, device_ipaddress, "\"device_ipaddress\"");
		
		MPSString traceroute_status_validator = new MPSString();
		traceroute_status_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 1024);
		traceroute_status_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		traceroute_status_validator.validate(operationType, traceroute_status, "\"traceroute_status\"");
		
	}
1290932
public void validate(String path, String exceptionMessagePrefix) {
    if (!matches(path)) {
      throw new ValidationException(
          String.format(
              "%s: Parameter \"%s\" must be in the form \"%s\"",
              exceptionMessagePrefix, path, this.toString()));
    }
  }
699787
private void validateRequest(CmdbRequest request) throws HygieiaException {
        String busServiceName = request.getConfigurationItemBusServName();
        if(!StringUtils.isEmpty( busServiceName ) && cmdbRepository.findByConfigurationItemAndItemType( busServiceName, APP_TYPE ) == null){
            throw new HygieiaException("Configuration Item " + busServiceName + " does not exist", HygieiaException.BAD_DATA);
        }

        Cmdb cmdb = cmdbRepository.findByConfigurationItemIgnoreCaseOrCommonNameIgnoreCase(request.getConfigurationItem(), request.getCommonName());
        if(cmdb != null){
            throw new HygieiaException("Configuration Item " + cmdb.getConfigurationItem() + " already exists", HygieiaException.DUPLICATE_DATA);
        }

        List<Collector> collectors = collectorRepository.findByCollectorTypeAndName(CollectorType.CMDB, request.getToolName());
        if (CollectionUtils.isEmpty(collectors)) {
            throw new HygieiaException(request.getToolName() + " collector is not available.", HygieiaException.BAD_DATA);
        }
    }
999767
public void validateConstraints(Entity entity) {
		for (String propertyName : requiredProperties) {
            Object value = entity.getProperty(propertyName);
			if (value == null || (value instanceof String && ((String) value).length() == 0)) {
				throw new RequiredFieldException("Required property '" + this.persistentClass.getSimpleName() + "." + propertyName + "' is not set");
			}
		}
	}
737521
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSString id_validator = new MPSString();
		id_validator.setConstraintIsReq(MPSConstants.DELETE_CONSTRAINT, true);
		id_validator.setConstraintIsReq(MPSConstants.MODIFY_CONSTRAINT, true);
		id_validator.validate(operationType, id, "\"id\"");
		
		MPSString uuid_validator = new MPSString();
		uuid_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 128);
		uuid_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		uuid_validator.validate(operationType, uuid, "\"uuid\"");
		
		MPSInt number_validator = new MPSInt();
		number_validator.validate(operationType, number, "\"number\"");
		
		MPSDouble cpu_usage_validator = new MPSDouble();
		cpu_usage_validator.validate(operationType, cpu_usage, "\"cpu_usage\"");
		
		MPSString vendor_validator = new MPSString();
		vendor_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 128);
		vendor_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		vendor_validator.validate(operationType, vendor, "\"vendor\"");
		
		MPSInt speed_validator = new MPSInt();
		speed_validator.validate(operationType, speed, "\"speed\"");
		
		MPSString modelname_validator = new MPSString();
		modelname_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 128);
		modelname_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		modelname_validator.validate(operationType, modelname, "\"modelname\"");
		
		MPSInt family_validator = new MPSInt();
		family_validator.validate(operationType, family, "\"family\"");
		
		MPSInt model_validator = new MPSInt();
		model_validator.validate(operationType, model, "\"model\"");
		
		MPSString stepping_validator = new MPSString();
		stepping_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 128);
		stepping_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		stepping_validator.validate(operationType, stepping, "\"stepping\"");
		
		MPSString flags_validator = new MPSString();
		flags_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 512);
		flags_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		flags_validator.validate(operationType, flags, "\"flags\"");
		
		MPSString features_validator = new MPSString();
		features_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 128);
		features_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		features_validator.validate(operationType, features, "\"features\"");
		
	}
1170875
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSString uuid_validator = new MPSString();
		uuid_validator.setConstraintCharSetRegEx(MPSConstants.GENERIC_CONSTRAINT,"[ a-zA-Z0-9_#.:@=-]+");
		uuid_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 128);
		uuid_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		uuid_validator.validate(operationType, uuid, "\"uuid\"");
		
		MPSString template_name_validator = new MPSString();
		template_name_validator.setConstraintCharSetRegEx(MPSConstants.GENERIC_CONSTRAINT,"[ a-zA-Z0-9_#.:@=-]+");
		template_name_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 128);
		template_name_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		template_name_validator.validate(operationType, template_name, "\"template_name\"");
		
		MPSString image_name_validator = new MPSString();
		image_name_validator.setConstraintCharSetRegEx(MPSConstants.GENERIC_CONSTRAINT,"[ a-zA-Z0-9_#.:@=-]+");
		image_name_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 128);
		image_name_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		image_name_validator.validate(operationType, image_name, "\"image_name\"");
		
		MPSString virtual_functions_validator = new MPSString();
		virtual_functions_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 512);
		virtual_functions_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		virtual_functions_validator.validate(operationType, virtual_functions, "\"virtual_functions\"");
		
		MPSString ssl_virtual_functions_validator = new MPSString();
		ssl_virtual_functions_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 256);
		ssl_virtual_functions_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		ssl_virtual_functions_validator.validate(operationType, ssl_virtual_functions, "\"ssl_virtual_functions\"");
		
		MPSString vm_state_validator = new MPSString();
		vm_state_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 64);
		vm_state_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		vm_state_validator.validate(operationType, vm_state, "\"vm_state\"");
		
		MPSDouble vm_cpu_usage_validator = new MPSDouble();
		vm_cpu_usage_validator.validate(operationType, vm_cpu_usage, "\"vm_cpu_usage\"");
		
		MPSDoubleLong vm_memory_total_validator = new MPSDoubleLong();
		vm_memory_total_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 1024);
		vm_memory_total_validator.validate(operationType, vm_memory_total, "\"vm_memory_total\"");
		
		MPSDoubleLong vm_memory_free_validator = new MPSDoubleLong();
		vm_memory_free_validator.validate(operationType, vm_memory_free, "\"vm_memory_free\"");
		
		MPSDouble vm_memory_usage_validator = new MPSDouble();
		vm_memory_usage_validator.validate(operationType, vm_memory_usage, "\"vm_memory_usage\"");
		
		MPSDouble vm_tx_validator = new MPSDouble();
		vm_tx_validator.validate(operationType, vm_tx, "\"vm_tx\"");
		
		MPSDouble vm_rx_validator = new MPSDouble();
		vm_rx_validator.validate(operationType, vm_rx, "\"vm_rx\"");
		
		MPSString uptime_validator = new MPSString();
		uptime_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 128);
		uptime_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		uptime_validator.validate(operationType, uptime, "\"uptime\"");
		
		MPSInt number_of_ssl_cores_validator = new MPSInt();
		number_of_ssl_cores_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		number_of_ssl_cores_validator.validate(operationType, number_of_ssl_cores, "\"number_of_ssl_cores\"");
		
		MPSString cpu_core_mgmt_validator = new MPSString();
		cpu_core_mgmt_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 32);
		cpu_core_mgmt_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		cpu_core_mgmt_validator.validate(operationType, cpu_core_mgmt, "\"cpu_core_mgmt\"");
		
		MPSString cpu_core_pe_validator = new MPSString();
		cpu_core_pe_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 32);
		cpu_core_pe_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		cpu_core_pe_validator.validate(operationType, cpu_core_pe, "\"cpu_core_pe\"");
		
		MPSDoubleLong domid_validator = new MPSDoubleLong();
		domid_validator.validate(operationType, domid, "\"domid\"");
		
		MPSString mac_eth0_validator = new MPSString();
		mac_eth0_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 32);
		mac_eth0_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		mac_eth0_validator.validate(operationType, mac_eth0, "\"mac_eth0\"");
		
		MPSString vm_description_validator = new MPSString();
		vm_description_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 64);
		vm_description_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		vm_description_validator.validate(operationType, vm_description, "\"vm_description\"");
		
		MPSDoubleLong throughput_validator = new MPSDoubleLong();
		throughput_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		throughput_validator.validate(operationType, throughput, "\"throughput\"");
		
		MPSDoubleLong disk_space_validator = new MPSDoubleLong();
		disk_space_validator.validate(operationType, disk_space, "\"disk_space\"");
		
		MPSString disk_allocation_validator = new MPSString();
		disk_allocation_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 512);
		disk_allocation_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		disk_allocation_validator.validate(operationType, disk_allocation, "\"disk_allocation\"");
		
		MPSInt number_of_cores_validator = new MPSInt();
		number_of_cores_validator.validate(operationType, number_of_cores, "\"number_of_cores\"");
		
		MPSBoolean provision_with_xva_validator = new MPSBoolean();
		provision_with_xva_validator.validate(operationType, provision_with_xva, "\"provision_with_xva\"");
		
		if(network_interfaces != null)
		{
			for(int i=0; i<network_interfaces.length; i++)
			{
				network_interfaces[i].validate(operationType);
			}
		}
		
		MPSBoolean has_sdxtools_validator = new MPSBoolean();
		has_sdxtools_validator.validate(operationType, has_sdxtools, "\"has_sdxtools\"");
		
		MPSInt sdxtools_http_port_validator = new MPSInt();
		sdxtools_http_port_validator.validate(operationType, sdxtools_http_port, "\"sdxtools_http_port\"");
		
		MPSString sdxtools_public_key_validator = new MPSString();
		sdxtools_public_key_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 4096);
		sdxtools_public_key_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		sdxtools_public_key_validator.validate(operationType, sdxtools_public_key, "\"sdxtools_public_key\"");
		
		MPSString domain_name_validator = new MPSString();
		domain_name_validator.setConstraintCharSetRegEx(MPSConstants.GENERIC_CONSTRAINT,"[a-zA-Z0-9_#.:@=-]+");
		domain_name_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 128);
		domain_name_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		domain_name_validator.validate(operationType, domain_name, "\"domain_name\"");
		
		MPSBoolean la_mgmt_validator = new MPSBoolean();
		la_mgmt_validator.validate(operationType, la_mgmt, "\"la_mgmt\"");
		
		MPSString sdxtools_version_validator = new MPSString();
		sdxtools_version_validator.validate(operationType, sdxtools_version, "\"sdxtools_version\"");
		
		MPSInt vlan_id_0_1_validator = new MPSInt();
		vlan_id_0_1_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_id_0_1_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_id_0_1_validator.validate(operationType, vlan_id_0_1, "\"vlan_id_0_1\"");
		
		MPSInt vlan_id_0_2_validator = new MPSInt();
		vlan_id_0_2_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_id_0_2_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_id_0_2_validator.validate(operationType, vlan_id_0_2, "\"vlan_id_0_2\"");
		
		MPSString preferred_cpu_socket_validator = new MPSString();
		preferred_cpu_socket_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 24);
		preferred_cpu_socket_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		preferred_cpu_socket_validator.validate(operationType, preferred_cpu_socket, "\"preferred_cpu_socket\"");
		
		MPSString assigned_cpu_socket_validator = new MPSString();
		assigned_cpu_socket_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 24);
		assigned_cpu_socket_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		assigned_cpu_socket_validator.validate(operationType, assigned_cpu_socket, "\"assigned_cpu_socket\"");
		
		MPSInt vlan_10_1_validator = new MPSInt();
		vlan_10_1_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_10_1_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_10_1_validator.validate(operationType, vlan_10_1, "\"vlan_10_1\"");
		
		MPSInt vlan_10_2_validator = new MPSInt();
		vlan_10_2_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_10_2_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_10_2_validator.validate(operationType, vlan_10_2, "\"vlan_10_2\"");
		
		MPSInt vlan_10_3_validator = new MPSInt();
		vlan_10_3_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_10_3_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_10_3_validator.validate(operationType, vlan_10_3, "\"vlan_10_3\"");
		
		MPSInt vlan_10_4_validator = new MPSInt();
		vlan_10_4_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_10_4_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_10_4_validator.validate(operationType, vlan_10_4, "\"vlan_10_4\"");
		
		MPSInt vlan_10_5_validator = new MPSInt();
		vlan_10_5_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_10_5_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_10_5_validator.validate(operationType, vlan_10_5, "\"vlan_10_5\"");
		
		MPSInt vlan_10_6_validator = new MPSInt();
		vlan_10_6_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_10_6_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_10_6_validator.validate(operationType, vlan_10_6, "\"vlan_10_6\"");
		
		MPSInt vlan_10_7_validator = new MPSInt();
		vlan_10_7_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_10_7_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_10_7_validator.validate(operationType, vlan_10_7, "\"vlan_10_7\"");
		
		MPSInt vlan_10_8_validator = new MPSInt();
		vlan_10_8_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_10_8_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_10_8_validator.validate(operationType, vlan_10_8, "\"vlan_10_8\"");
		
		MPSInt vlan_1_1_validator = new MPSInt();
		vlan_1_1_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_1_1_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_1_1_validator.validate(operationType, vlan_1_1, "\"vlan_1_1\"");
		
		MPSInt vlan_1_2_validator = new MPSInt();
		vlan_1_2_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_1_2_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_1_2_validator.validate(operationType, vlan_1_2, "\"vlan_1_2\"");
		
		MPSInt vlan_1_3_validator = new MPSInt();
		vlan_1_3_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_1_3_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_1_3_validator.validate(operationType, vlan_1_3, "\"vlan_1_3\"");
		
		MPSInt vlan_1_4_validator = new MPSInt();
		vlan_1_4_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_1_4_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_1_4_validator.validate(operationType, vlan_1_4, "\"vlan_1_4\"");
		
		MPSInt vlan_1_5_validator = new MPSInt();
		vlan_1_5_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_1_5_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_1_5_validator.validate(operationType, vlan_1_5, "\"vlan_1_5\"");
		
		MPSInt vlan_1_6_validator = new MPSInt();
		vlan_1_6_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_1_6_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_1_6_validator.validate(operationType, vlan_1_6, "\"vlan_1_6\"");
		
		MPSInt vlan_1_7_validator = new MPSInt();
		vlan_1_7_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_1_7_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_1_7_validator.validate(operationType, vlan_1_7, "\"vlan_1_7\"");
		
		MPSInt vlan_1_8_validator = new MPSInt();
		vlan_1_8_validator.setConstraintMinValue(MPSConstants.GENERIC_CONSTRAINT, 0);
		vlan_1_8_validator.setConstraintMaxValue(MPSConstants.GENERIC_CONSTRAINT, 4095);
		vlan_1_8_validator.validate(operationType, vlan_1_8, "\"vlan_1_8\"");
		
		MPSBoolean if_1_1_validator = new MPSBoolean();
		if_1_1_validator.validate(operationType, if_1_1, "\"if_1_1\"");
		
		MPSBoolean if_1_2_validator = new MPSBoolean();
		if_1_2_validator.validate(operationType, if_1_2, "\"if_1_2\"");
		
		MPSBoolean if_1_3_validator = new MPSBoolean();
		if_1_3_validator.validate(operationType, if_1_3, "\"if_1_3\"");
		
		MPSBoolean if_1_4_validator = new MPSBoolean();
		if_1_4_validator.validate(operationType, if_1_4, "\"if_1_4\"");
		
		MPSBoolean if_1_5_validator = new MPSBoolean();
		if_1_5_validator.validate(operationType, if_1_5, "\"if_1_5\"");
		
		MPSBoolean if_1_6_validator = new MPSBoolean();
		if_1_6_validator.validate(operationType, if_1_6, "\"if_1_6\"");
		
		MPSBoolean if_1_7_validator = new MPSBoolean();
		if_1_7_validator.validate(operationType, if_1_7, "\"if_1_7\"");
		
		MPSBoolean if_1_8_validator = new MPSBoolean();
		if_1_8_validator.validate(operationType, if_1_8, "\"if_1_8\"");
		
		MPSBoolean if_10_1_validator = new MPSBoolean();
		if_10_1_validator.validate(operationType, if_10_1, "\"if_10_1\"");
		
		MPSBoolean if_10_2_validator = new MPSBoolean();
		if_10_2_validator.validate(operationType, if_10_2, "\"if_10_2\"");
		
		MPSBoolean if_10_3_validator = new MPSBoolean();
		if_10_3_validator.validate(operationType, if_10_3, "\"if_10_3\"");
		
		MPSBoolean if_10_4_validator = new MPSBoolean();
		if_10_4_validator.validate(operationType, if_10_4, "\"if_10_4\"");
		
		MPSBoolean if_10_5_validator = new MPSBoolean();
		if_10_5_validator.validate(operationType, if_10_5, "\"if_10_5\"");
		
		MPSBoolean if_10_6_validator = new MPSBoolean();
		if_10_6_validator.validate(operationType, if_10_6, "\"if_10_6\"");
		
		MPSBoolean if_10_7_validator = new MPSBoolean();
		if_10_7_validator.validate(operationType, if_10_7, "\"if_10_7\"");
		
		MPSBoolean if_10_8_validator = new MPSBoolean();
		if_10_8_validator.validate(operationType, if_10_8, "\"if_10_8\"");
		
		MPSBoolean l2_enabled_validator = new MPSBoolean();
		l2_enabled_validator.validate(operationType, l2_enabled, "\"l2_enabled\"");
		
		MPSBoolean receiveuntagged_1_1_validator = new MPSBoolean();
		receiveuntagged_1_1_validator.validate(operationType, receiveuntagged_1_1, "\"receiveuntagged_1_1\"");
		
		MPSBoolean receiveuntagged_1_2_validator = new MPSBoolean();
		receiveuntagged_1_2_validator.validate(operationType, receiveuntagged_1_2, "\"receiveuntagged_1_2\"");
		
		MPSBoolean receiveuntagged_1_3_validator = new MPSBoolean();
		receiveuntagged_1_3_validator.validate(operationType, receiveuntagged_1_3, "\"receiveuntagged_1_3\"");
		
		MPSBoolean receiveuntagged_1_4_validator = new MPSBoolean();
		receiveuntagged_1_4_validator.validate(operationType, receiveuntagged_1_4, "\"receiveuntagged_1_4\"");
		
		MPSBoolean receiveuntagged_1_5_validator = new MPSBoolean();
		receiveuntagged_1_5_validator.validate(operationType, receiveuntagged_1_5, "\"receiveuntagged_1_5\"");
		
		MPSBoolean receiveuntagged_1_6_validator = new MPSBoolean();
		receiveuntagged_1_6_validator.validate(operationType, receiveuntagged_1_6, "\"receiveuntagged_1_6\"");
		
		MPSBoolean receiveuntagged_1_7_validator = new MPSBoolean();
		receiveuntagged_1_7_validator.validate(operationType, receiveuntagged_1_7, "\"receiveuntagged_1_7\"");
		
		MPSBoolean receiveuntagged_1_8_validator = new MPSBoolean();
		receiveuntagged_1_8_validator.validate(operationType, receiveuntagged_1_8, "\"receiveuntagged_1_8\"");
		
		MPSBoolean receiveuntagged_10_1_validator = new MPSBoolean();
		receiveuntagged_10_1_validator.validate(operationType, receiveuntagged_10_1, "\"receiveuntagged_10_1\"");
		
		MPSBoolean receiveuntagged_10_2_validator = new MPSBoolean();
		receiveuntagged_10_2_validator.validate(operationType, receiveuntagged_10_2, "\"receiveuntagged_10_2\"");
		
		MPSBoolean receiveuntagged_10_3_validator = new MPSBoolean();
		receiveuntagged_10_3_validator.validate(operationType, receiveuntagged_10_3, "\"receiveuntagged_10_3\"");
		
		MPSBoolean receiveuntagged_10_4_validator = new MPSBoolean();
		receiveuntagged_10_4_validator.validate(operationType, receiveuntagged_10_4, "\"receiveuntagged_10_4\"");
		
		MPSBoolean receiveuntagged_10_5_validator = new MPSBoolean();
		receiveuntagged_10_5_validator.validate(operationType, receiveuntagged_10_5, "\"receiveuntagged_10_5\"");
		
		MPSBoolean receiveuntagged_10_6_validator = new MPSBoolean();
		receiveuntagged_10_6_validator.validate(operationType, receiveuntagged_10_6, "\"receiveuntagged_10_6\"");
		
		MPSBoolean receiveuntagged_10_7_validator = new MPSBoolean();
		receiveuntagged_10_7_validator.validate(operationType, receiveuntagged_10_7, "\"receiveuntagged_10_7\"");
		
		MPSBoolean receiveuntagged_10_8_validator = new MPSBoolean();
		receiveuntagged_10_8_validator.validate(operationType, receiveuntagged_10_8, "\"receiveuntagged_10_8\"");
		
		MPSString vrid_list_ipv4_1_1_validator = new MPSString();
		if(vrid_list_ipv4_1_1 != null)
		{
			for(int i=0; i<vrid_list_ipv4_1_1.length; i++)
			{
				vrid_list_ipv4_1_1_validator.validate(operationType, vrid_list_ipv4_1_1[i], "vrid_list_ipv4_1_1["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv4_1_2_validator = new MPSString();
		if(vrid_list_ipv4_1_2 != null)
		{
			for(int i=0; i<vrid_list_ipv4_1_2.length; i++)
			{
				vrid_list_ipv4_1_2_validator.validate(operationType, vrid_list_ipv4_1_2[i], "vrid_list_ipv4_1_2["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv4_1_3_validator = new MPSString();
		if(vrid_list_ipv4_1_3 != null)
		{
			for(int i=0; i<vrid_list_ipv4_1_3.length; i++)
			{
				vrid_list_ipv4_1_3_validator.validate(operationType, vrid_list_ipv4_1_3[i], "vrid_list_ipv4_1_3["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv4_1_4_validator = new MPSString();
		if(vrid_list_ipv4_1_4 != null)
		{
			for(int i=0; i<vrid_list_ipv4_1_4.length; i++)
			{
				vrid_list_ipv4_1_4_validator.validate(operationType, vrid_list_ipv4_1_4[i], "vrid_list_ipv4_1_4["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv4_1_5_validator = new MPSString();
		if(vrid_list_ipv4_1_5 != null)
		{
			for(int i=0; i<vrid_list_ipv4_1_5.length; i++)
			{
				vrid_list_ipv4_1_5_validator.validate(operationType, vrid_list_ipv4_1_5[i], "vrid_list_ipv4_1_5["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv4_1_6_validator = new MPSString();
		if(vrid_list_ipv4_1_6 != null)
		{
			for(int i=0; i<vrid_list_ipv4_1_6.length; i++)
			{
				vrid_list_ipv4_1_6_validator.validate(operationType, vrid_list_ipv4_1_6[i], "vrid_list_ipv4_1_6["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv4_1_7_validator = new MPSString();
		if(vrid_list_ipv4_1_7 != null)
		{
			for(int i=0; i<vrid_list_ipv4_1_7.length; i++)
			{
				vrid_list_ipv4_1_7_validator.validate(operationType, vrid_list_ipv4_1_7[i], "vrid_list_ipv4_1_7["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv4_1_8_validator = new MPSString();
		if(vrid_list_ipv4_1_8 != null)
		{
			for(int i=0; i<vrid_list_ipv4_1_8.length; i++)
			{
				vrid_list_ipv4_1_8_validator.validate(operationType, vrid_list_ipv4_1_8[i], "vrid_list_ipv4_1_8["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv4_10_1_validator = new MPSString();
		if(vrid_list_ipv4_10_1 != null)
		{
			for(int i=0; i<vrid_list_ipv4_10_1.length; i++)
			{
				vrid_list_ipv4_10_1_validator.validate(operationType, vrid_list_ipv4_10_1[i], "vrid_list_ipv4_10_1["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv4_10_2_validator = new MPSString();
		if(vrid_list_ipv4_10_2 != null)
		{
			for(int i=0; i<vrid_list_ipv4_10_2.length; i++)
			{
				vrid_list_ipv4_10_2_validator.validate(operationType, vrid_list_ipv4_10_2[i], "vrid_list_ipv4_10_2["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv4_10_3_validator = new MPSString();
		if(vrid_list_ipv4_10_3 != null)
		{
			for(int i=0; i<vrid_list_ipv4_10_3.length; i++)
			{
				vrid_list_ipv4_10_3_validator.validate(operationType, vrid_list_ipv4_10_3[i], "vrid_list_ipv4_10_3["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv4_10_4_validator = new MPSString();
		if(vrid_list_ipv4_10_4 != null)
		{
			for(int i=0; i<vrid_list_ipv4_10_4.length; i++)
			{
				vrid_list_ipv4_10_4_validator.validate(operationType, vrid_list_ipv4_10_4[i], "vrid_list_ipv4_10_4["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv4_10_5_validator = new MPSString();
		if(vrid_list_ipv4_10_5 != null)
		{
			for(int i=0; i<vrid_list_ipv4_10_5.length; i++)
			{
				vrid_list_ipv4_10_5_validator.validate(operationType, vrid_list_ipv4_10_5[i], "vrid_list_ipv4_10_5["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv4_10_6_validator = new MPSString();
		if(vrid_list_ipv4_10_6 != null)
		{
			for(int i=0; i<vrid_list_ipv4_10_6.length; i++)
			{
				vrid_list_ipv4_10_6_validator.validate(operationType, vrid_list_ipv4_10_6[i], "vrid_list_ipv4_10_6["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv4_10_7_validator = new MPSString();
		if(vrid_list_ipv4_10_7 != null)
		{
			for(int i=0; i<vrid_list_ipv4_10_7.length; i++)
			{
				vrid_list_ipv4_10_7_validator.validate(operationType, vrid_list_ipv4_10_7[i], "vrid_list_ipv4_10_7["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv4_10_8_validator = new MPSString();
		if(vrid_list_ipv4_10_8 != null)
		{
			for(int i=0; i<vrid_list_ipv4_10_8.length; i++)
			{
				vrid_list_ipv4_10_8_validator.validate(operationType, vrid_list_ipv4_10_8[i], "vrid_list_ipv4_10_8["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_1_1_validator = new MPSString();
		if(vrid_list_ipv6_1_1 != null)
		{
			for(int i=0; i<vrid_list_ipv6_1_1.length; i++)
			{
				vrid_list_ipv6_1_1_validator.validate(operationType, vrid_list_ipv6_1_1[i], "vrid_list_ipv6_1_1["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_1_2_validator = new MPSString();
		if(vrid_list_ipv6_1_2 != null)
		{
			for(int i=0; i<vrid_list_ipv6_1_2.length; i++)
			{
				vrid_list_ipv6_1_2_validator.validate(operationType, vrid_list_ipv6_1_2[i], "vrid_list_ipv6_1_2["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_1_3_validator = new MPSString();
		if(vrid_list_ipv6_1_3 != null)
		{
			for(int i=0; i<vrid_list_ipv6_1_3.length; i++)
			{
				vrid_list_ipv6_1_3_validator.validate(operationType, vrid_list_ipv6_1_3[i], "vrid_list_ipv6_1_3["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_1_4_validator = new MPSString();
		if(vrid_list_ipv6_1_4 != null)
		{
			for(int i=0; i<vrid_list_ipv6_1_4.length; i++)
			{
				vrid_list_ipv6_1_4_validator.validate(operationType, vrid_list_ipv6_1_4[i], "vrid_list_ipv6_1_4["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_1_5_validator = new MPSString();
		if(vrid_list_ipv6_1_5 != null)
		{
			for(int i=0; i<vrid_list_ipv6_1_5.length; i++)
			{
				vrid_list_ipv6_1_5_validator.validate(operationType, vrid_list_ipv6_1_5[i], "vrid_list_ipv6_1_5["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_1_6_validator = new MPSString();
		if(vrid_list_ipv6_1_6 != null)
		{
			for(int i=0; i<vrid_list_ipv6_1_6.length; i++)
			{
				vrid_list_ipv6_1_6_validator.validate(operationType, vrid_list_ipv6_1_6[i], "vrid_list_ipv6_1_6["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_1_7_validator = new MPSString();
		if(vrid_list_ipv6_1_7 != null)
		{
			for(int i=0; i<vrid_list_ipv6_1_7.length; i++)
			{
				vrid_list_ipv6_1_7_validator.validate(operationType, vrid_list_ipv6_1_7[i], "vrid_list_ipv6_1_7["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_1_8_validator = new MPSString();
		if(vrid_list_ipv6_1_8 != null)
		{
			for(int i=0; i<vrid_list_ipv6_1_8.length; i++)
			{
				vrid_list_ipv6_1_8_validator.validate(operationType, vrid_list_ipv6_1_8[i], "vrid_list_ipv6_1_8["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_10_1_validator = new MPSString();
		if(vrid_list_ipv6_10_1 != null)
		{
			for(int i=0; i<vrid_list_ipv6_10_1.length; i++)
			{
				vrid_list_ipv6_10_1_validator.validate(operationType, vrid_list_ipv6_10_1[i], "vrid_list_ipv6_10_1["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_10_2_validator = new MPSString();
		if(vrid_list_ipv6_10_2 != null)
		{
			for(int i=0; i<vrid_list_ipv6_10_2.length; i++)
			{
				vrid_list_ipv6_10_2_validator.validate(operationType, vrid_list_ipv6_10_2[i], "vrid_list_ipv6_10_2["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_10_3_validator = new MPSString();
		if(vrid_list_ipv6_10_3 != null)
		{
			for(int i=0; i<vrid_list_ipv6_10_3.length; i++)
			{
				vrid_list_ipv6_10_3_validator.validate(operationType, vrid_list_ipv6_10_3[i], "vrid_list_ipv6_10_3["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_10_4_validator = new MPSString();
		if(vrid_list_ipv6_10_4 != null)
		{
			for(int i=0; i<vrid_list_ipv6_10_4.length; i++)
			{
				vrid_list_ipv6_10_4_validator.validate(operationType, vrid_list_ipv6_10_4[i], "vrid_list_ipv6_10_4["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_10_5_validator = new MPSString();
		if(vrid_list_ipv6_10_5 != null)
		{
			for(int i=0; i<vrid_list_ipv6_10_5.length; i++)
			{
				vrid_list_ipv6_10_5_validator.validate(operationType, vrid_list_ipv6_10_5[i], "vrid_list_ipv6_10_5["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_10_6_validator = new MPSString();
		if(vrid_list_ipv6_10_6 != null)
		{
			for(int i=0; i<vrid_list_ipv6_10_6.length; i++)
			{
				vrid_list_ipv6_10_6_validator.validate(operationType, vrid_list_ipv6_10_6[i], "vrid_list_ipv6_10_6["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_10_7_validator = new MPSString();
		if(vrid_list_ipv6_10_7 != null)
		{
			for(int i=0; i<vrid_list_ipv6_10_7.length; i++)
			{
				vrid_list_ipv6_10_7_validator.validate(operationType, vrid_list_ipv6_10_7[i], "vrid_list_ipv6_10_7["+i+"]");
			}
		}
		
		MPSString vrid_list_ipv6_10_8_validator = new MPSString();
		if(vrid_list_ipv6_10_8 != null)
		{
			for(int i=0; i<vrid_list_ipv6_10_8.length; i++)
			{
				vrid_list_ipv6_10_8_validator.validate(operationType, vrid_list_ipv6_10_8[i], "vrid_list_ipv6_10_8["+i+"]");
			}
		}
		
		MPSBoolean reboot_vm_on_cpu_change_validator = new MPSBoolean();
		reboot_vm_on_cpu_change_validator.validate(operationType, reboot_vm_on_cpu_change, "\"reboot_vm_on_cpu_change\"");
		
		MPSBoolean sync_operation_validator = new MPSBoolean();
		sync_operation_validator.validate(operationType, sync_operation, "\"sync_operation\"");
		
	}
779685
public void attempt(Request request) {
    this.attempt(request, new APICallback() {
      @Override
      public void error(Exception ex) {
      }

      public void response(Response r) {
      }
    });
  }
1215246
@Override
    public void validate() {
        if (value == null) {
            throw new NoValueGivenException(getPath());
        }

        if (valids.size() != 0) {
            boolean ok = false;
            String valString = (value != null) ? value.toString() : "";

            for (int i = 0; i < valids.size(); i++) {
                if (valids.get(i).equals(valString)) {
                    ok = true;
                    break;
                }
            }

            if (!ok) {
                throw new NoValidValueException(getPath(), valString);
            }
        }

        setValid(true);
    }
455682
private void validateReadRequest(alluxio.grpc.ReadRequest request)
      throws InvalidArgumentException {
    if (request.getBlockId() < 0) {
      throw new InvalidArgumentException(
          String.format("Invalid blockId (%d) in read request.", request.getBlockId()));
    }
    if (request.getOffset() < 0 || request.getLength() <= 0) {
      throw new InvalidArgumentException(
          String.format("Invalid read bounds in read request %s.", request.toString()));
    }
  }
1149645
public boolean validate(HttpRequestMessage request, boolean isPostMethodAllowed) {
        WebSocketWireProtocol wireProtocolVersion = guessWireProtocolVersion(request);
        if ( wireProtocolVersion == null ) {
            return false;
        }

        final WsHandshakeValidator validator = handshakeValidatorsByWireProtocolVersion.get(wireProtocolVersion);
        return validator != null && validator.doValidate(request, isPostMethodAllowed);

    }
589740
private HttpHandler validate(final HttpServletRequest request,
                               final HttpServletResponse response,
                               final ParsedHttpRequest parsedHttpRequest) throws IOException, ServletException {
    final String specification = parsedHttpRequest.getTargetSpecification();
    final String version = parsedHttpRequest.getVersion();

    if (specification == null) {
      writeMessage(response, "Specification is not provided in the request.", HttpServletResponse.SC_BAD_REQUEST);
      return null;
    }

    final HttpHandler handler = eventHandlers.get(specification.toLowerCase());
    if (handler == null) {
      writeMessage(response, String.format("No event handler registered for: [%s].", specification),
          HttpServletResponse.SC_NOT_FOUND);
      return null;
    }

    if (version == null) {
      writeMessage(response, "Version is not provided in the request.", HttpServletResponse.SC_BAD_REQUEST);
      return null;
    }
    return handler;
  }
1364412
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {

		ActionErrors errors = null;
		// has the maximum length been exceeded?
		Boolean maxLengthExceeded = (Boolean) request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED);
		if ((maxLengthExceeded != null) && (maxLengthExceeded.booleanValue())) {
			errors = new ActionErrors();
			errors.add(ERROR_PROPERTY_MAX_LENGTH_EXCEEDED, new ActionMessage("maxLengthExceeded"));
		} else if (fileMap.size() > MAX_IMAGES_COUNT) {
			errors = new ActionErrors();
			errors.add(ERROR_PROPERTY_MAX_LENGTH_EXCEEDED, new ActionMessage("maxLengthExceeded"));
		} else {
			// retrieve the file name
			Iterator iter = fileMap.values().iterator();
			while (iter.hasNext()) {
				FormFile file = (FormFile) iter.next();
				String fileName = file.getFileName();
				if ((!fileName.toLowerCase().endsWith(".gif")) && !(fileName.toLowerCase().endsWith(".jpg"))
						&& !(fileName.toLowerCase().endsWith(".png"))) {
					errors = new ActionErrors();
					errors.add("notImage", new ActionMessage("notImage"));
				}
			}
		}
		return errors;
	}
1275566
@Override
    public void validate() throws OpsGenieClientValidationException {
        super.validate();
        if (id == null && alias == null)
            throw OpsGenieClientValidationException.missingMultipleMandatoryProperty(OpsGenieClientConstants.API.ALIAS,
                    OpsGenieClientConstants.API.ID);
    }