Packages

REST API Generated with swagger-codegen using the OpsGenie OpenAPI Specification.

Current section

Files

Jump to
ops_genie_restapi lib ops_genie_restapi model notification_policy.ex
Raw

lib/ops_genie_restapi/model/notification_policy.ex

# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule OpsGenieRESTAPI.Model.NotificationPolicy do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"id",
:"name",
:"policyDescription",
:"teamId",
:"filter",
:"timeRestrictions",
:"enabled",
:"type",
:"autoRestartAction",
:"autoCloseAction",
:"deduplicationAction",
:"delayAction",
:"suppress"
]
@type t :: %__MODULE__{
:"id" => String.t,
:"name" => String.t,
:"policyDescription" => String.t,
:"teamId" => String.t,
:"filter" => Filter,
:"timeRestrictions" => TimeRestrictionInterval,
:"enabled" => boolean(),
:"type" => String.t,
:"autoRestartAction" => AutoRestartAction,
:"autoCloseAction" => AutoCloseAction,
:"deduplicationAction" => DeduplicationAction,
:"delayAction" => DelayAction,
:"suppress" => boolean()
}
end
defimpl Poison.Decoder, for: OpsGenieRESTAPI.Model.NotificationPolicy do
import OpsGenieRESTAPI.Deserializer
def decode(value, options) do
value
|> deserialize(:"filter", :struct, OpsGenieRESTAPI.Model.Filter, options)
|> deserialize(:"timeRestrictions", :struct, OpsGenieRESTAPI.Model.TimeRestrictionInterval, options)
|> deserialize(:"autoRestartAction", :struct, OpsGenieRESTAPI.Model.AutoRestartAction, options)
|> deserialize(:"autoCloseAction", :struct, OpsGenieRESTAPI.Model.AutoCloseAction, options)
|> deserialize(:"deduplicationAction", :struct, OpsGenieRESTAPI.Model.DeduplicationAction, options)
|> deserialize(:"delayAction", :struct, OpsGenieRESTAPI.Model.DelayAction, options)
end
end