# This file generated by `mix dagger.gen`. Please DO NOT EDIT.
defmodule Dagger.Port do
@moduledoc "A port exposed by a container."
use Dagger.Core.QueryBuilder
@type t() :: %__MODULE__{}
defstruct [:selection, :client]
(
@doc "The port description."
@spec description(t()) :: {:ok, Dagger.String.t() | nil} | {:error, term()}
def description(%__MODULE__{} = port) do
selection = select(port.selection, "description")
execute(selection, port.client)
end
)
(
@doc "Skip the health check when run as a service."
@spec experimental_skip_healthcheck(t()) :: {:ok, Dagger.Boolean.t()} | {:error, term()}
def experimental_skip_healthcheck(%__MODULE__{} = port) do
selection = select(port.selection, "experimentalSkipHealthcheck")
execute(selection, port.client)
end
)
(
@doc "A unique identifier for this Port."
@spec id(t()) :: {:ok, Dagger.PortID.t()} | {:error, term()}
def id(%__MODULE__{} = port) do
selection = select(port.selection, "id")
execute(selection, port.client)
end
)
(
@doc "The port number."
@spec port(t()) :: {:ok, Dagger.Int.t()} | {:error, term()}
def port(%__MODULE__{} = port) do
selection = select(port.selection, "port")
execute(selection, port.client)
end
)
(
@doc "The transport layer protocol."
@spec protocol(t()) :: {:ok, Dagger.NetworkProtocol.t()} | {:error, term()}
def protocol(%__MODULE__{} = port) do
selection = select(port.selection, "protocol")
execute(selection, port.client)
end
)
end