{% if doc_comment %}{{ doc_comment }}{% endif %}{% if symbol_args %}  {{ variant_class }} = Data.define({{ symbol_args }}) do
{% else %}  {{ variant_class }} = Data.define do
{% endif %}    include {{ class_name }}
    extend T::Sig

{{ field_accessors }}{{ predicate_methods }}    # @param hash [Hash] deserialized from the native extension
    # @return [self]
    sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
    def self.from_hash(hash)
      {{ from_hash_call }}
    end
  end
