defmodule Manganese.SerializationKit.Structs.UnityBoxColliderComponent do @moduledoc """ """ alias Manganese.SerializationKit.Structs alias Manganese.SerializationKit.Enumerations @typedoc """ """ @type t :: %Structs.UnityBoxColliderComponent{ id: Structs.UnityComponent.id, type: Enumerations.UnityComponentType.t } defstruct [ :id, type: :box_collider ] # Deserialization @doc """ """ @spec from_map(t_external) :: t def from_map(%{ "id" => id }) do %Structs.UnityBoxColliderComponent{ id: id } end # Serialization @type t_external :: map @doc """ """ @spec to_map(t) :: t_external def to_map(%Structs.UnityBoxColliderComponent{ id: id, type: type }) do %{ id: id, type: Enumerations.UnityComponentType.to_integer(type) } end end