Return a tuple of typed attrs that can be used for comparisons.

        Raises:
            NotImplementedError: Raised if this class was mixed into a class
                that was not created by _AnnotatedObjectMeta.
161368
def _tp__get_typed_properties(self):
        
        try:
            return tuple(getattr(self, p) for p in self._tp__typed_properties)
        except AttributeError:
            raise NotImplementedError
1366419
def structure_attrs_fromtuple(self, obj, cl):
        # type: (Tuple, Type[T]) -> T
        """"""
        conv_obj = []  # A list of converter parameters.
        for a, value in zip(cl.__attrs_attrs__, obj):  # type: ignore
            # We detect the type by the metadata.
            converted = self._structure_attr_from_tuple(a, a.name, value)
            conv_obj.append(converted)

        return cl(*conv_obj)
453280
def get_resource_class_collection_attribute_iterator(rc):
    
    for attr in itervalues_(rc.__everest_attributes__):
        if attr.kind == RESOURCE_ATTRIBUTE_KINDS.COLLECTION:
            yield attr
713212
def _getattrs(self, obj, *attrs):
        
        filtered_attrs = {}
        for attr in attrs:
            if hasattr(obj, attr):
                filtered_attrs[attr] = obj_to_string(
                    self._filter_value(getattr(obj, attr))
                )
        return filtered_attrs
121976
def get_attribute_by_repr(self, attribute_repr_name, mapped_class=None,
                              key=None):
        
        attr_map = self.__get_attribute_map(mapped_class, key, 1)
        try:
            return attr_map[attribute_repr_name]
        except KeyError:
            raise AttributeError(attribute_repr_name)
1072451
def method_missing(method, *args)
      attr_name, suffix = method.to_s.scan(/([a-z0-9\_]+)(\?|\=)?$/i).first
      if suffix == ATTR_SETTER
        @_metaclass.send(:attr_accessor, attr_name)
        @_fields << attr_name.to_sym
        send(method, args.first)
      elsif attr_name && @_fields.include?(attr_name.to_sym)
        value = @attrs[attr_name.to_sym]
        case suffix
        when nil
          @_metaclass.send(:attr_accessor, attr_name)
          value
        when ATTR_PREDICATE then !!value
        end
      elsif suffix.nil? && SPECIAL_METHODS.include?(attr_name)
        instance_variable_get "@_#{attr_name}"
      elsif attr_name && !@_fields.include?(attr_name.to_sym)
        nil
      else
        super
      end
    end
58572
def _filter_attrs(attrs, ignored_attrs):
    
    return dict((k, v) for k, v in attrs.items() if k not in ignored_attrs)
631217
def method_missing(attr_name)
      member_sym = attr_name.id2name.to_sym
      self[member_sym]
    rescue ArgumentError # `member_sym` field doesn't exist.
      raise(NoMethodError.new("undefined method '#{attr_name}' for #{self}"))
    end
61891
def class_subobjects(
        class_: Type) -> Generator[Tuple[str, Type, bool], None, None]:
    
    argspec = inspect.getfullargspec(class_.__init__)
    defaults = argspec.defaults if argspec.defaults else []
    num_optional = len(defaults)
    first_optional = len(argspec.args) - num_optional

    for i, attr_name in enumerate(argspec.args):
        if attr_name == 'self':
            continue
        if attr_name == 'yatiml_extra':
            continue
        attr_type = argspec.annotations.get(attr_name, Any)
        yield attr_name, attr_type, i < first_optional
148004
def attrs(self):
        
        return dict((k, v) for k, v in iteritems(self.__dict__) if k is not "sdk")
725633
def get_innerclasses(self):
          # noqa

        buff = self.get_attribute("InnerClasses")
        if buff is None:
            return tuple()

        with unpack(buff) as up:
            return tuple(up.unpack_objects(JavaInnerClassInfo, self.cpool))
769128
def _generate_attrs(self):
        
        attrs = {}

        if ismodule(self.doubled_obj):
            for name, func in getmembers(self.doubled_obj, is_callable):
                attrs[name] = Attribute(func, 'toplevel', self.doubled_obj)
        else:
            for attr in classify_class_attrs(self.doubled_obj_type):
                attrs[attr.name] = attr

        return attrs
1334199
def get_attrs(self):
        
        self.encoding = _ensure_encoding(getattr(self.attrs, 'encoding', None))
        self.errors = _ensure_decoded(getattr(self.attrs, 'errors', 'strict'))
        for n in self.attributes:
            setattr(self, n, _ensure_decoded(getattr(self.attrs, n, None)))
132969
def _get_annotations(cls):
    
    anns = getattr(cls, "__annotations__", None)
    if anns is None:
        return {}

    # Verify that the annotations aren't merely inherited.
    for base_cls in cls.__mro__[1:]:
        if anns is getattr(base_cls, "__annotations__", None):
            return {}

    return anns
315581
def _object_with_attr(self, name):
        
        for obj in self._objects:
            if hasattr(obj, name):
                return obj

        raise AttributeError("No object has attribute {!r}".format(name))
347613
def get_rel_attr(self, attr_name, model):
        
        rel_attr_name, attr_name = attr_name.split(".", 1)
        rel_attr = getattr(self.model, rel_attr_name, None)
        rel_model = None
        attr = None

        if rel_attr is not None:
            rel_model = rel_attr.property.mapper.class_
            attr = getattr(rel_model, attr_name, None)

        return rel_model, attr
1319879
def obj_attrs(msg_):
    

    if isinstance(msg_, StringifyMixin):
        itr = msg_.stringify_attrs()
    else:
        # probably called by msg_str_attr
        itr = obj_python_attrs(msg_)
    for k, v in itr:
        if k.endswith('_') and k[:-1] in _RESERVED_KEYWORD:
            # XXX currently only StringifyMixin has restoring logic
            assert isinstance(msg_, StringifyMixin)
            k = k[:-1]
        yield (k, v)