Represents a source type as a dictionary.

    Returns:
      dict[str, str]: source type attributes.
434628
def AsDict(self):
    
    source_type_attributes = {'paths': self.paths}
    if self.separator != '/':
      source_type_attributes['separator'] = self.separator

    return source_type_attributes
1011396
def to_dict(self):
        
        doc = {
            'filename' : self.filename,
            'mimeType' : self.mime_type
        }
        # Add path if present
        if self.filename != self.path:
            doc['path'] = self.path
        return doc
286731
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'description') and self.description is not None:
            _dict['description'] = self.description
        if hasattr(self,
                   'destination_field') and self.destination_field is not None:
            _dict['destination_field'] = self.destination_field
        if hasattr(self, 'source_field') and self.source_field is not None:
            _dict['source_field'] = self.source_field
        if hasattr(self, 'overwrite') and self.overwrite is not None:
            _dict['overwrite'] = self.overwrite
        if hasattr(self,
                   'enrichment_name') and self.enrichment_name is not None:
            _dict['enrichment'] = self.enrichment_name
        if hasattr(self, 'ignore_downstream_errors'
                  ) and self.ignore_downstream_errors is not None:
            _dict['ignore_downstream_errors'] = self.ignore_downstream_errors
        if hasattr(self, 'options') and self.options is not None:
            _dict['options'] = self.options._to_dict()
        return _dict
574453
def as_dict(self):
        
        return {"@module": self.__class__.__module__,
                "@class": self.__class__.__name__,
                "frequencies": list(self.frequencies),
                "densities": list(self.densities)}
957778
def to_dict(self, dict_cls=FrozenOrderedDict):
        # type: (Type[dict]) -> Dict[str, Any]
        
        pairs = tuple((k, serialize_object(getattr(self, k), dict_cls))
                      for k in self.call_types)
        if self.typeid:
            d = dict_cls((("typeid", self.typeid),) + pairs)
        else:
            d = dict_cls(pairs)
        return d
1310904
def as_dict(self):
        
        return {"@module": self.__class__.__module__,
                "@class": self.__class__.__name__,
                "additional_condition": self._additional_condition}
676649
def to_dict(self):
        
        data = dict()

        for key, value in self.__dict__.items():
            if value:
                if hasattr(value, 'to_dict'):
                    data[key] = value.to_dict()
                else:
                    data[key] = value

        return data
563396
def to_dict(self):
        
        return dict(
            addr=self.addr,
            protocol=self.protocol,
            weight=self.weight,
            last_checked=self.last_checked)
1275192
def to_dict(self):
        
        d = {field: getattr(self, field) for field in self._top_fields if hasattr(self, field)}

        # set values of data fields
        d['data'] = {}
        for field in self._fields:
            if hasattr(self, field):
                # base64 encode the field for transmission if necessary
                if field in self._encode_fields:
                    val = getattr(self, field)
                    if val:
                        val = cast_s(base64.b64encode(cast_b(val)))
                    d['data'][field] = val
                else:
                    d['data'][field] = getattr(self, field)

        return d
613028
def to_dict(self):
        
        return {k: v.to_dict() if isinstance(v, AttrDict) else v
                for k, v in self.__dict__.items() if not k.startswith('_')}
1144641
def as_dict(self):
        
        return {self.FLD_OP: self._op.name,
                self.FLD_MARK: self._pos,
                self.FLD_FLD: self._fld}
57660
def as_dict(self):
        
        d = MSONable.as_dict(self)
        d["translation_vector"] = self.translation_vector.tolist()
        return d
952852
def as_dict(self) -> Dict[str, str]:
        
        items: Dict[str, str] = {}

        for k, v in self.items():

            if type(v) is str:
                items.update({k: v})

        return items
205679
def attributes_dict(self):
        
        h = {}
        for k in self.attributes.keys():
            h[k] = getattr(self, k)
        for k in self.lists.keys():
            h[k] = getattr(self, k)
        for k in self.references.keys():
            h[k] = getattr(self, k)
        return h
293708
def to_dict(self):
        
        return dict(
            (attr, getattr(self, attr))
            for attr in self.ATTRIBUTES
            if hasattr(self, attr)
        )
531636
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'type') and self.type is not None:
            _dict['type'] = self.type
        if hasattr(self, 'data') and self.data is not None:
            _dict['data'] = self.data._to_dict()
        return _dict
750233
def to_dict(self):
        
        data = {}

        # mandatory characteristics
        data["name"] = self.name
        data["description"] = self.description if self.description and len(self.description) else None
        data["type"] = self.type if self.type and len(self.type) else None
        data["allowed_chars"] = self.allowed_chars if self.allowed_chars and len(self.allowed_chars) else None
        data["allowed_choices"] = self.allowed_choices
        data["autogenerated"] = self.autogenerated
        data["channel"] = self.channel if self.channel and len(self.channel) else None
        data["creation_only"] = self.creation_only
        data["default_order"] = self.default_order
        data["default_value"] = self.default_value if self.default_value and len(self.default_value) else None
        data["deprecated"] = self.deprecated
        data["exposed"] = self.exposed
        data["filterable"] = self.filterable
        data["format"] = self.format if self.format and len(self.format) else None
        data["max_length"] = int(self.max_length) if self.max_length is not None else None
        data["max_value"] = int(self.max_value) if self.max_value is not None else None
        data["min_length"] = int(self.min_length) if self.min_length is not None else None
        data["min_value"] = int(self.min_value) if self.min_value is not None else None
        data["orderable"] = self.orderable
        data["read_only"] = self.read_only
        data["required"] = self.required
        data["transient"] = self.transient
        data["unique"] = self.unique
        data["uniqueScope"] = self.unique_scope if self.unique_scope and len(self.unique_scope) else None
        data["subtype"] = self.subtype if self.subtype and len(self.subtype) else None
        data["userlabel"] = self.userlabel if self.userlabel and len(self.userlabel) else None

        return data