# NOTE: This class is auto generated by OpenAPI Generator (
# Do not edit the class manually.

defmodule MailSlurpAPI.Model.CreateWebhookOptions do
  @moduledoc """
  Options for creating a webhook. Webhooks can be attached to inboxes and MailSlurp will POST a webhook payload to the URL specified whenever the webhook's event is triggered. Webhooks are great for processing many inbound emails and responding to other events at scale. Customize the payload sent to your endpoint by setting the `requestBodyTemplate` property to a string with moustache style variables. Property names from the standard payload model for the given event are available as variables.

  @derive [Poison.Encoder]
  defstruct [

  @type t :: %__MODULE__{
    :"url" => String.t,
    :"basicAuth" => BasicAuthOptions | nil,
    :"name" => String.t | nil,
    :"eventName" => String.t | nil,
    :"includeHeaders" => WebhookHeaders | nil,
    :"requestBodyTemplate" => String.t | nil,
    :"useStaticIpRange" => boolean() | nil,
    :"ignoreInsecureSslCertificates" => boolean() | nil

defimpl Poison.Decoder, for: MailSlurpAPI.Model.CreateWebhookOptions do
  import MailSlurpAPI.Deserializer
  def decode(value, options) do
    |> deserialize(:"basicAuth", :struct, MailSlurpAPI.Model.BasicAuthOptions, options)
    |> deserialize(:"includeHeaders", :struct, MailSlurpAPI.Model.WebhookHeaders, options)