# SPDX-FileCopyrightText: 2025 diffo_example contributors # # SPDX-License-Identifier: MIT defmodule DiffoExample.Nbn.NniValue do @moduledoc """ Diffo - TMF Service and Resource Management with a difference NniValue - AshTyped Struct for NNI Characteristic Value """ use Ash.TypedStruct, extensions: [AshJason.TypedStruct, AshOutstanding.TypedStruct] jason do pick [:port_id, :capacity, :technology] compact(true) rename port_id: "portId" end outstanding do expect [:port_id, :capacity] end typed_struct do field :port_id, :string, description: "the NNI port identifier" field :capacity, :integer, description: "the NNI port capacity in Gbps" field :technology, :atom, description: "the NNI technology (:Ethernet, :Fibre)" end end