# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.

# typed: true
# frozen_string_literal: true


module OpenApiSDK
  module Shared
  

    class WebhookResponse < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig

      # The status of the webhook.
      field :active, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('active') } }
      # The created date of the webhook.
      field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
      # The description of the webhook.
      field :endpoint_description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('endpoint_description') } }
      # The project id tied to the webhook.
      field :id_project, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id_project') } }
      # The unique UUID of the webhook.
      field :id_webhook_endpoint, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id_webhook_endpoint') } }
      # The last update date of the webhook.
      field :last_update, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_update'), 'decoder': Utils.datetime_from_iso_format(false) } }
      # The events that the webhook listen to.
      field :scope, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('scope') } }
      # The secret of the webhook.
      field :secret, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('secret') } }
      # The endpoint url of the webhook.
      field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } }


      sig { params(active: T::Boolean, created_at: ::DateTime, endpoint_description: ::String, id_project: ::String, id_webhook_endpoint: ::String, last_update: ::DateTime, scope: T::Array[::String], secret: ::String, url: ::String).void }
      def initialize(active: nil, created_at: nil, endpoint_description: nil, id_project: nil, id_webhook_endpoint: nil, last_update: nil, scope: nil, secret: nil, url: nil)
        @active = active
        @created_at = created_at
        @endpoint_description = endpoint_description
        @id_project = id_project
        @id_webhook_endpoint = id_webhook_endpoint
        @last_update = last_update
        @scope = scope
        @secret = secret
        @url = url
      end
    end
  end
end