Class: OpenAI::Models::Webhooks::SafetyDeactivationIssuedWebhookEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/webhooks/safety_deactivation_issued_webhook_event.rb,
sig/openai/models/webhooks/safety_deactivation_issued_webhook_event.rbs

Defined Under Namespace

Classes: Data

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, created_at:, data:, object: :event, type: :"safety.deactivation_issued") ⇒ SafetyDeactivationIssuedWebhookEvent

Returns a new instance of SafetyDeactivationIssuedWebhookEvent.

Parameters:

  • id —

    The unique ID of the webhook event.

  • created_at —

    The Unix timestamp in seconds when the event was created.

  • object (defaults to: :event) —

    Always event.

  • type (defaults to: :"safety.deactivation_issued") —

    Always safety.deactivation_issued.

  • id: (String)
  • created_at: (Integer)
  • data: (OpenAI::Webhooks::SafetyDeactivationIssuedWebhookEvent::Data)
  • object: (:event) (defaults to: :event)
  • type: (:"safety.deactivation_issued") (defaults to: :"safety.deactivation_issued")


# File 'lib/openai/models/webhooks/safety_deactivation_issued_webhook_event.rb', line 36

Instance Attribute Details

#created_at ⇒ Integer

The Unix timestamp in seconds when the event was created.

Returns:

  • (Integer)


17
# File 'lib/openai/models/webhooks/safety_deactivation_issued_webhook_event.rb', line 17

required :created_at, Integer

#data ⇒ OpenAI::Models::Webhooks::SafetyDeactivationIssuedWebhookEvent::Data

Parameters:

  • value (OpenAI::Webhooks::SafetyDeactivationIssuedWebhookEvent::Data)

Returns:



22
# File 'lib/openai/models/webhooks/safety_deactivation_issued_webhook_event.rb', line 22

required :data, -> { OpenAI::Webhooks::SafetyDeactivationIssuedWebhookEvent::Data }

#id ⇒ String

The unique ID of the webhook event.

Returns:

  • (String)


11
# File 'lib/openai/models/webhooks/safety_deactivation_issued_webhook_event.rb', line 11

required :id, String

#object ⇒ :event

Always event.

Returns:

  • (:event)


28
# File 'lib/openai/models/webhooks/safety_deactivation_issued_webhook_event.rb', line 28

required :object, const: :event

#type ⇒ :"safety.deactivation_issued"

Always safety.deactivation_issued.

Returns:

  • (:"safety.deactivation_issued")


34
# File 'lib/openai/models/webhooks/safety_deactivation_issued_webhook_event.rb', line 34

required :type, const: :"safety.deactivation_issued"

Instance Method Details

#to_hash ⇒ { id: String, created_at: Integer, data: OpenAI::Webhooks::SafetyDeactivationIssuedWebhookEvent::Data, ?object: :event, ?type: :"safety.deactivation_issued" }

Returns:

  • ({ id: String, created_at: Integer, data: OpenAI::Webhooks::SafetyDeactivationIssuedWebhookEvent::Data, ?object: :event, ?type: :"safety.deactivation_issued" })


44
45
46
47
48
49
50
# File 'sig/openai/models/webhooks/safety_deactivation_issued_webhook_event.rbs', line 44

def to_hash: -> {
  id: String,
  created_at: Integer,
  data: OpenAI::Webhooks::SafetyDeactivationIssuedWebhookEvent::Data,
  ?object: :event,
  ?type: :"safety.deactivation_issued"
}