# This file is auto-generated by `mix graph.gen.schema`. Do not edit manually. defmodule GraphApi.Schema.Beta.Folder do @moduledoc """ Auto-generated schema for `microsoft.graph.folder`. """ defstruct [:child_count] @type t :: %__MODULE__{ child_count: integer() | nil } @field_mapping %{ {"childCount", :child_count} } @field_names [ "childCount" ] @doc "Mapping from camelCase API field names to snake_case struct atoms." @spec __field_mapping__() :: %{String.t() => atom()} def __field_mapping__, do: @field_mapping @doc "List of camelCase API field names (for OData `$select`)." @spec __field_names__() :: [String.t()] def __field_names__, do: @field_names @doc "Converts a camelCase string-key map (API response) into this struct." @spec from_map(map()) :: t() def from_map(map) when is_map(map) do %__MODULE__{ child_count: map["childCount"] } end @doc "Converts this struct to a camelCase string-key map. Nil fields are omitted." @spec to_map(t()) :: map() def to_map(%__MODULE__{} = struct) do [ {"childCount", struct.child_count} ] |> Enum.reject(fn {_k, v} -> is_nil(v) end) |> Map.new() end end