Set the required fields for the record.
971890
def set_common_fields(self, warc_type: str, content_type: str):
        ''''''
        self.fields[self.WARC_TYPE] = warc_type
        self.fields[self.CONTENT_TYPE] = content_type
        self.fields[self.WARC_DATE] = wpull.util.datetime_str()
        self.fields[self.WARC_RECORD_ID] = '<{0}>'.format(uuid.uuid4().urn)
13243
def fill_fields(self, **kwargs):
        """"""
        for name, value in kwargs.items():
            field = getattr(self, name)
            field.send_keys(value)
700632
protected function setRequiredFields()
    {
        $requiredFields = [
            'transaction_id',
            'return_success_url',
            'return_failure_url',
            'amount',
            'currency',
            'crypto_address',
            'crypto_wallet_provider'
        ];

        $this->requiredFields = \Genesis\Utils\Common::createArrayObject($requiredFields);

        $requiredFieldValues = [
            'crypto_wallet_provider' => [
                self::WALLET_PROVIDER_BITGO,
                self::WALLET_PROVIDER_UPHOLD,
                self::WALLET_PROVIDER_CIRCLE,
                self::WALLET_PROVIDER_COINBASE,
                self::WALLET_PROVIDER_GDAX,
                self::WALLET_PROVIDER_GEMINI,
                self::WALLET_PROVIDER_ITBIT,
                self::WALLET_PROVIDER_KRAKEN
            ]
        ];

        $this->requiredFieldValues = \Genesis\Utils\Common::createArrayObject($requiredFieldValues);
    }
1071476
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, DESCRIPTION, 120, null, null);
        field = new FieldInfo(this, PROJECT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, PROJECT_VERSION_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, ISSUE_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, ISSUE_STATUS_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, ASSIGNED_USER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, ISSUE_PRIORITY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, ISSUE_SEQUENCE, 10, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, ENTERED_DATE, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, ENTERED_BY_USER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CHANGED_DATE, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, CHANGED_BY_USER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CLASS_INFO_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
    }
1205800
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, CONTACT_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, PERSON_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_TRANSPORT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_PROCESS_INFO_ID, 60, null, null);
        field.setDataClass(Integer.class);
        //field = new FieldInfo(this, DESTINATION_SITE, 127, null, null);
        //field = new FieldInfo(this, DESTINATION_PATH, 127, null, null);
        //field = new FieldInfo(this, RETURN_SITE, 127, null, null);
        //field = new FieldInfo(this, RETURN_PATH, 127, null, null);
        //field = new FieldInfo(this, XSLT_DOCUMENT, 127, null, null);
        //field = new FieldInfo(this, DEFAULT_MESSAGE_VERSION_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //field.setDataClass(Integer.class);
        field = new FieldInfo(this, DEFAULT_MESSAGE_TRANSPORT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        //field = new FieldInfo(this, INITIAL_MANUAL_TRANSPORT_STATUS_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //field.setDataClass(Integer.class);
    }
404954
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, SYSTEM_ID, 10, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, OBJECT_ID, 10, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CLASS_NAME, 255, null, null);
        field = new FieldInfo(this, DATABASE_NAME, 255, null, null);
        field = new FieldInfo(this, INIT_TIME, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, FREE_TIME, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, RECORD_OWNER, 255, null, null);
        field = new FieldInfo(this, STACK_TRACE, 32000, null, null);
    }
622841
def _set_all_fields(self, schema, **kwargs):
        
        current_fields = self.get_fields(schema, **kwargs)
        for field_name, field in schema.fields.items():
            if field_name not in current_fields:
                if field.required:
                    raise ValueError('Cannot safely add {} on the fly because it is required'.format(field_name))

                else:
                    query_str = []
                    query_str.append('ALTER TABLE')
                    query_str.append('  {}'.format(schema))
                    query_str.append('ADD COLUMN')
                    query_str.append('  {}'.format(self.get_field_SQL(field_name, field)))
                    query_str = os.linesep.join(query_str)
                    self.query(query_str, ignore_result=True, **kwargs)

        return True
229855
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, CODE, 30, null, null);
        field = new FieldInfo(this, MESSAGE_PROCESS_INFO_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_TRANSPORT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_VERSION_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, ACTIVE, 10, null, new Boolean(true));
        field.setDataClass(Boolean.class);
        field = new FieldInfo(this, DEFAULT_TRANSPORT, 10, null, null);
        field.setDataClass(Boolean.class);
        field = new FieldInfo(this, PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
    }
392511
public function setRequiredFields($fields) {
		$this->requiredFields = $fields;
		$this->setValidator($this->getValidator());
		return $this;
	}
1073213
public void setupSFields()
    {
        Record record = this.getMainRecord();
        this.addColumn(new MultipleTableFieldConverter(record, CalendarEntry.START_DATE_TIME));
        this.addColumn(new MultipleTableFieldConverter(record, CalendarEntry.END_DATE_TIME));
        this.addColumn(new MultipleTableFieldConverter(record, CalendarEntry.DESCRIPTION));
    }
651952
def setRecord(self, record):
        
        self._record = record
        if record is not None:
            self.loadValues(record.recordValues(autoInflate=True))
        else:
            self.loadValues({})
152957
def _populate(self, fields):
        
        schema = self.schema
        for k, v in fields.items():
            fields[k] = schema.fields[k].iget(self, v)

        self.modify(fields)
        self.reset_modified()
272108
public void setupSFields()
    {
        this.getRecord(Issue.ISSUE_FILE).getField(Issue.DESCRIPTION).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.SET_ANCHOR), this, ScreenConstants.DISPLAY_FIELD_DESC);
    }
68454
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, FIELD_NAME, 40, null, null);
        field = new FieldInfo(this, FIELD_CLASS, 40, null, null);
        field = new FieldInfo(this, BASE_FIELD_NAME, 40, null, null);
        field = new FieldInfo(this, DEPENDENT_FIELD_NAME, 40, null, null);
        field = new FieldInfo(this, MINIMUM_LENGTH, 4, null, null);
        field.setDataClass(Short.class);
        field = new FieldInfo(this, MAXIMUM_LENGTH, 5, null, null);
        field.setDataClass(Short.class);
        field = new FieldInfo(this, DEFAULT_VALUE, 50, null, null);
        field = new FieldInfo(this, INITIAL_VALUE, 50, null, null);
        field = new FieldInfo(this, FIELD_DESCRIPTION, 100, null, null);
        field = new FieldInfo(this, FIELD_DESC_VERTICAL, 14, null, null);
        field = new FieldInfo(this, FIELD_TYPE, 1, null, null);
        field = new FieldInfo(this, FIELD_DIMENSION, 3, null, null);
        field.setDataClass(Short.class);
        field = new FieldInfo(this, FIELD_FILE_NAME, 40, null, null);
        field = new FieldInfo(this, FIELD_SEQ_NO, 4, null, null);
        field.setDataClass(Short.class);
        field = new FieldInfo(this, FIELD_NOT_NULL, 1, null, null);
        field.setDataClass(Boolean.class);
        //field = new FieldInfo(this, DATA_CLASS, 20, null, null);
        field = new FieldInfo(this, HIDDEN, 10, null, null);
        field.setDataClass(Boolean.class);
        field = new FieldInfo(this, INCLUDE_SCOPE, 10, null, new Integer(0x004));
        field.setDataClass(Integer.class);
    }
885102
protected function setRequiredFields()
    {
        $requiredFields = [
            'transaction_id',
            'card_type',
            'redeem_type',
            'amount',
            'currency',
            'card_holder',
            'card_number',
            'expiration_month',
            'expiration_year'
        ];

        $this->requiredFields = \Genesis\Utils\Common::createArrayObject($requiredFields);

        $requiredFieldValues = array_merge(
            [
                'card_type'   => CardTypes::getCardTypes(),
                'redeem_type' => RedeemTypes::getRedeemTypes(),
                'currency'    => Currency::getList()
            ],
            $this->getCCFieldValueFormatValidators()
        );

        $this->requiredFieldValues = \Genesis\Utils\Common::createArrayObject($requiredFieldValues);
    }
271739
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, NAME, 50, null, null);
        field = new FieldInfo(this, PARENT_FOLDER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, SEQUENCE, 5, null, new Short((short)0));
        field.setDataClass(Short.class);
        field = new FieldInfo(this, COMMENT, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, CODE, 30, null, null);
        field = new FieldInfo(this, TYPE, 10, null, null);
        field = new FieldInfo(this, AUTO_DESC, 10, null, new Boolean(true));
        field.setDataClass(Boolean.class);
        field = new FieldInfo(this, PROGRAM, 255, null, null);
        field = new FieldInfo(this, PARAMS, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, ICON_RESOURCE, 255, null, null);
        field = new FieldInfo(this, KEYWORDS, 50, null, null);
        field = new FieldInfo(this, XML_DATA, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, MENUS_HELP, Constants.DEFAULT_FIELD_LENGTH, null, null);
    }
1349606
protected function setRequiredFields()
    {
        $requiredFields = [
            'transaction_id',
            'amount',
            'currency',
            'customer_email',
            'holder_name',
            'billing_country'
        ];

        $this->requiredFields = \Genesis\Utils\Common::createArrayObject($requiredFields);

        $requiredFieldValues = [
            'billing_country' => [
                'АЕ', 'AT', 'AU', 'BE', 'BG', 'CA', 'CY', 'CZ', 'DE', 'DK', 'EE', 'ES',
                'FI', 'FR', 'GB', 'GF', 'GP', 'GR', 'HU', 'IE', 'IT', 'LT', 'LU', 'LV',
                'MC', 'MQ', 'MT', 'MX', 'NL', 'PL', 'PT', 'RE', 'SE', 'SI', 'SK'
            ],
            'currency'        => \Genesis\Utils\Currency::getList()
        ];

        $this->requiredFieldValues = \Genesis\Utils\Common::createArrayObject($requiredFieldValues);

        $this->setRequiredFieldsConditional();
    }