# `Grizzly.ZIPGateway.Config`
[🔗](https://github.com/smartrent/grizzly/blob/v9.1.4/lib/grizzly/zipgateway/config.ex#L1)

Builds valid `zipgateway.cfg` based on Grizzly options.

# `t`

```elixir
@type t() :: %Grizzly.ZIPGateway.Config{
  ca_cert: Path.t(),
  cert: Path.t(),
  database_file: Path.t() | nil,
  extra_classes: [byte()],
  extra_config: String.t() | nil,
  hardware_version: non_neg_integer() | nil,
  identify_script: term(),
  lan_gw6: String.t(),
  lan_ip: :inet.ip_address(),
  manufacturer_id: non_neg_integer() | nil,
  pan_ip: :inet.ip_address(),
  power_level:
    {Grizzly.Supervisor.tx_power(), Grizzly.Supervisor.measured_power()} | nil,
  priv_key: Path.t(),
  product_id: non_neg_integer() | nil,
  product_type: non_neg_integer() | nil,
  provisioning_config_file: Path.t(),
  psk: String.t(),
  pvs_storage_file: Path.t(),
  rf_region: Grizzly.Supervisor.rf_region() | nil,
  serial_log: String.t() | nil,
  tun_script: Path.t(),
  unsolicited_destination: {:inet.ip_address(), :inet.port_number()}
}
```

# `ensure_files`

```elixir
@spec ensure_files(t()) :: t()
```

Ensure required files are on disk and contain the correct contents

This is useful to ensure other tools provided by `zipgateway` can work.

# `new`

```elixir
@spec new(map()) :: t()
```

Make a new `ZipgatewayCfg.t()` from the supplied options

# `to_string`

```elixir
@spec to_string(t()) :: String.t()
```

Turn the `ZipgatewayCfg.t()` into a string

# `write`

```elixir
@spec write(t(), Path.t()) :: :ok | {:error, File.posix()}
```

Write the contents of the `ZipgatewayCfg.t()` to the file system

---

*Consult [api-reference.md](api-reference.md) for complete listing*
