Sets `sysparm_fields` after joining the given list of `fields`

        :param fields: List of fields to include in the response
        :raise:
            :InvalidUsage: if fields is of an unexpected type
176752
def fields(self, fields):
        

        if not isinstance(fields, list):
            raise InvalidUsage('fields must be of type `list`')

        self._sysparms['sysparm_fields'] = ",".join(fields)
1250170
public function setFields (array $fields)
    {
        $this->_fields = array();
        foreach ($fields as $field) {
            $this->append($field);
        }
    }
1230634
public R setFields(String... fields) {
        if (fields.length == 1 && fields[0] == null){
            mQueryMap.remove(QUERY_FIELDS);
            return (R) this;
        }
        if (fields.length > 0) {
            StringBuilder sb = new StringBuilder();
            sb.append(fields[0]);
            for (int i = 1; i < fields.length; ++i) {
                sb.append(String.format(Locale.ENGLISH, ",%s", fields[i]));
            }
            mQueryMap.put(QUERY_FIELDS, sb.toString());
        }

        return (R) this;
    }
732395
def _validate_return_fields(self, return_fields):
        
        for return_field in return_fields:
            if return_field not in self.RESPONSE_FIELD_MAP:
                raise InvalidReturnFieldException(
                    '"{0}" is an invalid return field'.format(return_field)
                )
585779
def interpret(self, fields):
        
        try:
            msgId = int(fields[0])
            handler = self.handlers[msgId]
            handler(fields)
        except Exception:
            self.logger.exception(f'Error handling fields: {fields}')
269716
private void setSystemField(String fieldName, String value) {
        if (Utils.isEmpty(value)) {
            m_valueMap.remove(fieldName);
        } else {
            m_valueMap.put(fieldName, Arrays.asList(value));
        }
    }
1088031
def values(self, *fields):
        
        if not fields:
            fields = self._get_simple_fields()

        fields = self._coerce_fields_parameters(fields)

        self._instances = False
        self._values = {'fields': fields, 'mode': 'dicts'}
        return self
1358861
async def message_fields(self, msg, fields, obj=None):
        
        for field in fields:
            await self.message_field(msg, field, obj)
        return msg
4886
def set_output_fields(self, output_fields):
        """"""
        if isinstance(output_fields, dict) or isinstance(output_fields, list):
            self.output_fields = output_fields
        elif isinstance(output_fields, basestring):
            self.output_field = output_fields
        else:
            raise ValueError("set_output_fields requires a dictionary of "
                             + "output fields to remap, a list of keys to filter, or a scalar string")
        return self
1092132
def set_fields(self, fields=None, *fields_args, **fields_kwargs):
        
        if fields_args:
            fields = [fields]
            fields.extend(fields_args)
            for field_name in fields:
                self.set_field(field_name)

        elif fields_kwargs:
            fields = make_dict(fields, fields_kwargs)
            for field_name, field_val in fields.items():
                self.set_field(field_name, field_val)

        else:
            if isinstance(fields, Mapping):
                for field_name, field_val in fields.items():
                    self.set_field(field_name, field_val)

            else:
                for field_name in fields:
                    self.set_field(field_name)

        return self
1241977
def iter_field_objects(fields):
    
    if isinstance(fields, dict):
        i = six.iteritems(fields)
    else:
        i = iter(fields)

    for field in i:
        if isinstance(field, RequestField):
            yield field
        else:
            yield RequestField.from_tuples(*field)
983092
def append_fields(self, new_fields):
        '''
        
        '''
        for field in new_fields:
            self.push(field)
            if isinstance(field, Container):
                self.pop()
483667
def _init_fields(self):
        
        fields = {}
        forms = {}
        sets = {}

        for name in dir(self):
            if name.startswith('_'):
                continue
            field = getattr(self, name)
            is_field = isinstance(field, Field)
            is_form = isinstance(field, Form) or (
                inspect.isclass(field) and issubclass(field, Form))
            is_set = isinstance(field, FormSet)

            if is_field:
                field = copy(field)
                field.name = self._prefix + name
                field.form = self
                if field.prepare is None:
                    field.prepare = getattr(self, 'prepare_' + name, None)
                if field.clean is None:
                    field.clean = getattr(self, 'clean_' + name, None)
                fields[name] = field
                setattr(self, name, field)
            elif is_form:
                forms[name] = field
            elif is_set:
                field._name = self._prefix + name  # REALLY IMPORTANT
                sets[name] = field

        self._fields = fields
        self._forms = forms
        self._sets = sets
749831
def update_fields(self, updates):
        

        for field in updates:
            if self._valid_field(field):
                self._track_changes.add(field)
            else:
                raise ValueError('"{}" is not a valid internal field name'.format(field))

        # Update existing instance of fields, or create a fields instance if needed
        if self.fields:
            self.fields.update(updates)
        else:
            self.fields = updates
1119884
public void checkFieldsCompatible(final String... fields) {
        final Set<String> indexFields = Sets.newHashSet(index.getDefinition().getFields());
        final Joiner joiner = Joiner.on(",");
        check(indexFields.equals(Sets.newHashSet(fields)),
                "Existing index '%s' (class '%s') fields '%s' are different from '%s'.",
                index.getName(), index.getDefinition().getClassName(), joiner.join(indexFields), joiner.join(fields));
    }
1181623
public void addUniqueFields(Set<FieldSet> uniqueFieldSets) {
		if (this.uniqueFields == null) {
			this.uniqueFields = new HashSet<FieldSet>();
		}
		this.uniqueFields.addAll(uniqueFieldSets);
	}
1346168
def process_base_field(cls, field, key):
        
        if not field.name:
            field.name = key
        elif key != field.name:
            if not isinstance(field.alias, list):
                field.alias = [key]
            else:
                field.alias.insert(0, key)
            setattr(cls, field.name, field)

        cls.prepare_field(field)

        if field.alias:
            for alias_name in field.alias:
                if key is not alias_name:
                    setattr(cls, alias_name, field)