Serializes this ShippingQuery to a dictionary.

        :return: dictionary representation of this object.
        :rtype: dict
329705
def to_array(self):
        
        array = super(ShippingQuery, self).to_array()
        array['id'] = u(self.id)  # py2: type unicode, py3: type str
        array['from'] = self.from_peer.to_array()  # type User
        array['invoice_payload'] = u(self.invoice_payload)  # py2: type unicode, py3: type str
        array['shipping_address'] = self.shipping_address.to_array()  # type ShippingAddress
        return array
152757
def serialize(self):
        '''
        
        '''
        return {
            'name' : self.name,
            'weight' : self.weight,
            'value' : self.value,
            'msgs' : self.msgs,
            'children' : [i.serialize() for i in self.children]
        }
1327115
def to_dict(self):
        
        input_dict = super(Constant, self)._save_to_input_dict()
        input_dict["class"] = "GPy.mappings.Constant"
        input_dict["value"] = self.C.values[0]
        return input_dict
1230539
def as_dict(self):
        ''''''
        pk = self.pk
        id_type = 3
        if pk.type == 'auto':
            id_type = 1
        return {'id_name': pk.name,
                'id_type': id_type,
                'sorted': bool(self.ordering),
                'autoincr': self.ordering and self.ordering.auto,
                'multi_fields': [field.name for field in self.multifields],
                'indices': dict(((idx.attname, idx.unique)
                                 for idx in self.indices))}
910703
def to_dict(self):
        
        return {
            'body': self._body,
            'method': self._method,
            'properties': self._properties,
            'channel': self._channel
        }
142387
def to_dict(self):
        
        body = {
            'tier': self.tier,
            'title': self.title,
            'size': self.size,
        }

        # optionals

        if hasattr(self, 'address') and self.address:
            body['address'] = self.address

        if hasattr(self, 'zone') and self.zone:
            body['zone'] = self.zone

        return body
460174
def to_dict(self) -> Dict[str, str]:
        
        return {
            'type': 'remote',
            'name': self.name,
            'location': self.location,
            'url': self.url,
            'version': self.version
        }
779759
def to_dict(self):
        
        list_data = []
        for key, value in list(self.data.items()):
            row = list(key)
            row.append(value)
            list_data.append(row)
        return {
            'groups': self.groups,
            'data': list_data
        }
955030
def to_dict(self):
        
        return dict(
            host=self.host,
            port=self.port,
            database=self.database,
            username=self.username,
            password=self.password,
        )
749188
def to_dict(self):
        
        obj_dict = super(Row, self).to_dict()
        cells_dict = [c.to_dict() for c in self.cells]
        child_dict = {
            'type': self.__class__.__name__,
            'cells': cells_dict
        }
        obj_dict.update(child_dict)
        return child_dict
1003085
def serialize(self) -> dict:
        
        data = {**self}
        if "attachments" in self:
            data["attachments"] = json.dumps(self["attachments"])
        return data
964436
def as_dict(self):
        
        return {
            'search_type': self.search_type,
            'agent_id': self.agent_id,
            'id': self.id,
            'price': self.price,
            'price_change': self.price_change,
            'viewings': self.upcoming_viewings,
            'facilities': self.facilities,
            'overviews': self.overviews,
            'formalised_address': self.formalised_address,
            'address_line_1': self.address_line_1,
            'county': self.county,
            'listing_image': self.images,
            'listing_hires_image': self.hires_images,
            'agent': self.agent,
            'agent_url': self.agent_url,
            'contact_number': self.contact_number,
            'daft_link': self.daft_link,
            'shortcode': self.shortcode,
            'date_insert_update': self.date_insert_update,
            'views': self.views,
            'description': self.description,
            'dwelling_type': self.dwelling_type,
            'posted_since': self.posted_since,
            'num_bedrooms': self.bedrooms,
            'num_bathrooms': self.bathrooms,
            'city_center_distance': self.city_center_distance,
            'transport_routes': self.transport_routes,
            'latitude': self.latitude,
            'longitude': self.longitude,
            'ber_code': self.ber_code,
            'commercial_area_size': self.commercial_area_size
        }
150147
def to_dict(self):
        
        if self.id:
            return {"id": self.id}
        return {"type": self.type, "ipVersion": self.ip_version}
651967
def to_dict(self):
        
        obj_dict = super(Text, self).to_dict()
        texts_dict = None
        if isinstance(self.text, list):
            texts_dict = [t.to_dict() for t in self.text]
        child_dict = {
            'type': self.__class__.__name__,
            'text': texts_dict
        }
        obj_dict.update(child_dict)
        return obj_dict
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
533091
def as_dict(self):
        
        d = {"@module": self.__class__.__module__,
             "@class": self.__class__.__name__,
             "structure": self.structure.as_dict(),
             "frequencies": list(self.frequencies),
             "densities": list(self.densities),
             "pdos": []}
        if len(self.pdos) > 0:
            for at in self.structure:
                d["pdos"].append(list(self.pdos[at]))
        return d
154518
def to_dict(self, **kwargs):
        
        d = {}
        if self.query:
            d["query"] = self.query.to_dict()

        if self._script:
            d['script'] = self._script

        d.update(self._extra)

        d.update(kwargs)
        return d