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