def _set_rpsl_object_schemas(self):
    '\n        Create the schemas for each specific RPSL object class.\n        Each of these implements RPSLObject, and RPSLPerson/RPSLRole\n        implement RPSLContact as well.\n        '
    self.graphql_types = defaultdict(dict)
    schemas = OrderedDict()
    for (object_class, klass) in OBJECT_CLASS_MAPPING.items():
        object_name = klass.__name__
        graphql_fields = OrderedDict()
        graphql_fields['rpslPk'] = 'String'
        graphql_fields['objectClass'] = 'String'
        graphql_fields['objectText'] = 'String'
        graphql_fields['updated'] = 'String'
        graphql_fields['journal'] = '[RPSLJournalEntry]'
        for (field_name, field) in klass.fields.items():
            graphql_type = self._graphql_type_for_rpsl_field(field)
            graphql_fields[snake_to_camel_case(field_name)] = graphql_type
            self.graphql_types[snake_to_camel_case(object_name)][field_name] = graphql_type
            (reference_name, reference_type) = self._grapql_type_for_reference_field(field_name, field)
            if (reference_name and reference_type):
                graphql_fields[reference_name] = reference_type
                self.graphql_types[object_name][reference_name] = reference_type
        for field_name in klass.field_extracts:
            if field_name.startswith('asn'):
                graphql_type = 'ASN'
            elif (field_name == 'prefix'):
                graphql_type = 'IP'
            elif (field_name == 'prefix_length'):
                graphql_type = 'Int'
            else:
                graphql_type = 'String'
            graphql_fields[snake_to_camel_case(field_name)] = graphql_type
        if klass.rpki_relevant:
            graphql_fields['rpkiStatus'] = 'RPKIStatus'
            graphql_fields['rpkiMaxLength'] = 'Int'
            self.graphql_types[object_name]['rpki_max_length'] = 'Int'
        implements = ('RPSLContact & RPSLObject' if (klass in [RPSLPerson, RPSLRole]) else 'RPSLObject')
        schema = self._generate_schema_str(object_name, 'type', graphql_fields, implements)
        schemas[object_name] = schema
    self.rpsl_object_schemas = schemas
Create the schemas for each specific RPSL object class.
Each of these implements RPSLObject, and RPSLPerson/RPSLRole
implement RPSLContact as well.
def _set_rpsl_object_schemas(self):
    '\n        Create the schemas for each specific RPSL object class.\n        Each of these implements RPSLObject, and RPSLPerson/RPSLRole\n        implement RPSLContact as well.\n        '
    self.graphql_types = defaultdict(dict)
    schemas = OrderedDict()
    for (object_class, klass) in OBJECT_CLASS_MAPPING.items():
        object_name = klass.__name__
        graphql_fields = OrderedDict()
        graphql_fields['rpslPk'] = 'String'
        graphql_fields['objectClass'] = 'String'
        graphql_fields['objectText'] = 'String'
        graphql_fields['updated'] = 'String'
        graphql_fields['journal'] = '[RPSLJournalEntry]'
        for (field_name, field) in klass.fields.items():
            graphql_type = self._graphql_type_for_rpsl_field(field)
            graphql_fields[snake_to_camel_case(field_name)] = graphql_type
            self.graphql_types[snake_to_camel_case(object_name)][field_name] = graphql_type
            (reference_name, reference_type) = self._grapql_type_for_reference_field(field_name, field)
            if (reference_name and reference_type):
                graphql_fields[reference_name] = reference_type
                self.graphql_types[object_name][reference_name] = reference_type
        for field_name in klass.field_extracts:
            if field_name.startswith('asn'):
                graphql_type = 'ASN'
            elif (field_name == 'prefix'):
                graphql_type = 'IP'
            elif (field_name == 'prefix_length'):
                graphql_type = 'Int'
            else:
                graphql_type = 'String'
            graphql_fields[snake_to_camel_case(field_name)] = graphql_type
        if klass.rpki_relevant:
            graphql_fields['rpkiStatus'] = 'RPKIStatus'
            graphql_fields['rpkiMaxLength'] = 'Int'
            self.graphql_types[object_name]['rpki_max_length'] = 'Int'
        implements = ('RPSLContact & RPSLObject' if (klass in [RPSLPerson, RPSLRole]) else 'RPSLObject')
        schema = self._generate_schema_str(object_name, 'type', graphql_fields, implements)
        schemas[object_name] = schema
    self.rpsl_object_schemas = schemas