PagerDuty Elixir v0.0.1 PagerDuty.Agent
The agent (user, service or integration) that created or modified the ILE.
Attributes
@id
: id@summary
: A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical toname
, though it is not intended to be an identifier.@type
: one of:user
oruser_reference
service
orservice_reference
integration
orintegration_reference
@self
: the API show URL at which the object is accessible@html_url
: a URL at which the entity is uniquely displayed in the Web app
Summary
Types
Functions
Checks whether the agent has a valid type
Examples
iex> agent = %PagerDuty.Agent.new{type: "dog"}
...> PagerDuty.Agent.is_valid?(agent)
false
iex> agent = %PagerDuty.Agent.new{type: "user"}
...> PagerDuty.Agent.is_valid?(agent)
false
iex> agent = %PagerDuty.Agent.new{type: "service"}
...> PagerDuty.Agent.is_valid?(agent)
false
iex> agent = %PagerDuty.Agent.new{type: "integration"}
...> PagerDuty.Agent.is_valid?(agent)
false
iex> agent = %PagerDuty.Agent.new{type: "user_reference"}
...> PagerDuty.Agent.is_valid?(agent)
false
iex> agent = %PagerDuty.Agent.new{type: "service_reference"}
...> PagerDuty.Agent.is_valid?(agent)
false
iex> agent = %PagerDuty.Agent.new{type: "integration_reference"}
...> PagerDuty.Agent.is_valid?(agent)
false
Generates a new PagerDuty.Agent
from a map
Examples
iex> map = %{type: "user"}
...> result = PagerDuty.Agent.new(map)
...> result.type
"user"
iex> decoded = ~s<{"type": "service"}>
...> |> Poison.decode!
...> result = PagerDuty.Agent.new(decoded)
...> result.type
"service"