Convert this ObservationGroupSearch to a dict, ready for serialization to JSON for use in the API.

        :return:
            Dict representation of this ObservationGroupSearch instance
16800
def as_dict(self):
        
        d = {}
        _add_string(d, 'obstory_name', self.obstory_name)
        _add_string(d, 'semantic_type', self.semantic_type)
        _add_value(d, 'time_min', self.time_min)
        _add_value(d, 'time_max', self.time_max)
        _add_string(d, 'group_id', self.group_id)
        _add_string(d, 'observation_id', self.observation_id)
        _add_value(d, 'skip', self.skip)
        _add_value(d, 'limit', self.limit)
        d['meta'] = list((x.as_dict() for x in self.meta_constraints))
        return d
142071
def to_dict(self):
        
        obj_dict = super(PlainText, self).to_dict()
        child_dict = {
            'type': self.__class__.__name__,
            'text': self.text
        }
        obj_dict.update(child_dict)
        return obj_dict
803994
def as_dict(self):
        

        result_dict = super(Group, self).as_dict()

        statuses = list()
        version = None
        titles = list()
        descriptions = list()
        platforms = list()
        groups = list()
        rules = list()

        for child in self.children:
            if isinstance(child, Version):
                version = child.as_dict()
            elif isinstance(child, Status):
                statuses.append(child.as_dict())
            elif isinstance(child, Title):
                titles.append(child.as_dict())
            elif isinstance(child, Description):
                descriptions.append(child.as_dict())
            elif isinstance(child, Platform):
                platforms.append(child.as_dict())
            elif isinstance(child, Group):
                groups.append(child.as_dict())
            elif isinstance(child, Rule):
                rules.append(child.as_dict())

        if version is not None:
            result_dict['version'] = version
        if len(statuses) > 0:
            result_dict['statuses'] = statuses
        if len(titles) > 0:
            result_dict['titles'] = titles
        if len(descriptions) > 0:
            result_dict['descriptions'] = descriptions
        if len(platforms) > 0:
            result_dict['platforms'] = platforms
        if len(groups) > 0:
            result_dict['groups'] = groups
        if len(rules) > 0:
            result_dict['rules'] = rules

        return result_dict
1213268
def as_dict(self):
        
        if not self._is_valid:
            self.validate()

        from .converters import to_dict
        return to_dict(self)
991342
def to_dict(self, remove_nones=False):
        

        if remove_nones:
            return super().to_dict(remove_nones=True)

        tags = None
        if self.tags is not None:
            tags = [tag.to_dict(remove_nones=remove_nones) for tag in self.tags]

        return {
            'value': self.value,
            'indicatorType': self.type,
            'priorityLevel': self.priority_level,
            'correlationCount': self.correlation_count,
            'whitelisted': self.whitelisted,
            'weight': self.weight,
            'reason': self.reason,
            'firstSeen': self.first_seen,
            'lastSeen': self.last_seen,
            'source': self.source,
            'notes': self.notes,
            'tags': tags,
            'enclaveIds': self.enclave_ids
        }
576444
def get_groups_dict(self) -> Dict:
        
        return {
            k: deserializer.inventory.InventoryElement.serialize(v).dict()
            for k, v in self.groups.items()
        }
980104
def _to_dict(self):
        
        mapping = {}

        if self.start_open:
            mapping["start_open"] = self.start_open

        if self.start_closed:
            mapping["start_closed"] = self.start_closed

        if self.end_open:
            mapping["end_open"] = self.end_open

        if self.end_closed:
            mapping["end_closed"] = self.end_closed

        return mapping
696095
def to_dict(self):
        
        ui_info = {}
        if self._description:
            ui_info["description"] = self._description
        if self._display_name:
            ui_info["display_name"] = self._display_name
        if self._logos:
            ui_info["logo"] = self._logos
        return {"service": {"idp": {"ui_info": ui_info}}} if ui_info else {}
167776
def as_dict(self):
        
        drepr = {}
        drepr["name"] = self.name
        drepr["time"] = self.time
        # error pre-serialisation
        drepr["errors"] = [str(err) for err in self.errors]
        # warning  pre-serialisation
        drepr["warnings"] = [str(warn) for warn in self.warnings]
        return drepr
127638
def ToJson(self):
        
        obj = {
            'usage': self.Usage,
            'data': '' if not self.Data else self.Data.hex()
        }
        return obj
1185245
def to_dict(self):
        ''''''
        d = {'groupId': self.group_id}
        members = []
        for m in self.members:
            members.append(m.to_dict())
        if members:
            d['members'] = members
        return d
26781
def to_dict(self):
        ''''''
        d = {'name': self.name}
        if self.data:
            d['data'] = self.data
        return d
807884
def as_dict(self):
        

        d = {"@module": self.__class__.__module__,
             "@class": self.__class__.__name__}
        d["structure"] = self.structure
        d["energy"] = self.energy
        d["miller_index"] = self.miller_index
        d["label"] = self.label
        d["coverage"] = self.coverage
        d["adsorbates"] = self.adsorbates
        d["clean_entry"] = self.clean_entry

        return d
379636
def to_dict(self):
        
        
        ret = merge_dicts(self.__attributes__, self.__relations__, self.__fields__)
        ret = {k : v.value for k,v in ret.items()}
        ret['maps'] = {k : v.value for k,v in self.maps.items()}
        return ret
733322
def to_dict(self):
        

        result = self.to_identifier()

        result.update({
            'watched': 1 if self.is_watched else 0,
            'collected': 1 if self.is_collected else 0,

            'plays': self.plays if self.plays is not None else 0,
            'in_watchlist': self.in_watchlist if self.in_watchlist is not None else 0,
            'progress': self.progress,

            'last_watched_at': to_iso8601_datetime(self.last_watched_at),
            'collected_at': to_iso8601_datetime(self.collected_at),
            'paused_at': to_iso8601_datetime(self.paused_at)
        })

        if self.rating:
            result['rating'] = self.rating.value
            result['rated_at'] = to_iso8601_datetime(self.rating.timestamp)

        # Extended Info
        if self.released:
            result['released'] = to_iso8601_date(self.released)

        if self.updated_at:
            result['updated_at'] = to_iso8601_datetime(self.updated_at)

        if self.overview:
            result['overview'] = self.overview

        if self.tagline:
            result['tagline'] = self.tagline

        if self.runtime:
            result['runtime'] = self.runtime

        if self.certification:
            result['certification'] = self.certification

        if self.homepage:
            result['homepage'] = self.homepage

        if self.trailer:
            result['trailer'] = self.trailer

        if self.language:
            result['language'] = self.language

        if self.available_translations:
            result['available_translations'] = self.available_translations

        if self.genres:
            result['genres'] = self.genres

        return result
563396
def to_dict(self):
        
        return dict(
            addr=self.addr,
            protocol=self.protocol,
            weight=self.weight,
            last_checked=self.last_checked)
1038663
def to_dict(self):
        
        data = dict()
        data['api_url'] = self.api_url
        data['api_key'] = self.api_key
        data['verifySSL'] = self.verifySSL
        data['client_id'] = self.client_id
        data['client_secret'] = self.client_secret
        data['redirect_url'] = self.redirect_url
        data['token'] = self.token
        data['state'] = self.state
        data['auth_url'] = self.auth_url
        return data