Exosphere.Bsky.Labeler.Defs.LabelerPolicies (Exosphere v0.6.0)

Copy Markdown View Source

Object schema app.bsky.labeler.defs##labelerPolicies.

Fields

  • label_value_definitions: Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.
  • label_values: The label values which this labeler publishes. May include global or custom labels.

Summary

Functions

Decode a wire-format map. Delegates to new/1.

Build and validate from a map of attrs (atom or wire string keys).

Build and validate, raising ArgumentError on error.

Encode to the wire-format map.

The lexicon type ID (nsid or nsid#def) this module was generated from.

Types

t()

@type t() :: %Exosphere.Bsky.Labeler.Defs.LabelerPolicies{
  extra: term(),
  label_value_definitions:
    [Exosphere.ATProto.Label.Defs.LabelValueDefinition.t()] | nil,
  label_values: [term()]
}

Functions

from_map(map)

@spec from_map(map()) ::
  {:ok, t()} | {:error, [{path :: String.t(), message :: String.t()}]}

Decode a wire-format map. Delegates to new/1.

new(attrs)

@spec new(map()) ::
  {:ok, t()} | {:error, [{path :: String.t(), message :: String.t()}]}

Build and validate from a map of attrs (atom or wire string keys).

Unknown keys are kept in extra and re-emitted by to_map/1.

new!(attrs)

@spec new!(map()) :: t()

Build and validate, raising ArgumentError on error.

to_map(struct)

@spec to_map(t()) :: map()

Encode to the wire-format map.

type_id()

@spec type_id() :: String.t()

The lexicon type ID (nsid or nsid#def) this module was generated from.