GoogleApi.Gax.ModelBase (google_gax v0.4.1) View Source

This module helps you quickly and concisely define API models.

Example:

defmodule Pet do
  use GoogleApi.Gax.ModelBase

  field(:id)
  field(:category, as: Category)
  field(:tags, as: Tag, type: :list)
end

Link to this section Summary

Link to this section Functions

Link to this function

decode(value, arg2, module)

View Source

Specs

decode(struct(), :list | :listlist | :map | :primitive, nil | module()) ::
  struct()

Helper to decode model fields

Specs

encode(struct(), keyword()) :: String.t()

Helper to encode model into JSON

Link to this macro

field(field_name, opts \\ [])

View Source (macro)
Link to this function

poison_transform(value, options)

View Source