Class: OpenAI::Models::Admin::Organization::AdminAPIKey

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/admin/organization/admin_api_key.rb

Overview

Direct Known Subclasses

AdminAPIKeyCreateResponse

Defined Under Namespace

Classes: Owner

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, 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:, owner:, redacted_value:, last_used_at: nil, name: nil, object: :"organization.admin_api_key") ⇒ Object

Represents an individual Admin API key in an org.

Parameters:

  • id (String)

    The identifier, which can be referenced in API endpoints

  • created_at (Integer)

    The Unix timestamp (in seconds) of when the API key was created

  • owner (OpenAI::Models::Admin::Organization::AdminAPIKey::Owner)
  • redacted_value (String)

    The redacted value of the API key

  • last_used_at (Integer, nil) (defaults to: nil)

    The Unix timestamp (in seconds) of when the API key was last used

  • name (String, nil) (defaults to: nil)

    The name of the API key

  • object (Symbol, :"organization.admin_api_key") (defaults to: :"organization.admin_api_key")

    The object type, which is always ‘organization.admin_api_key`



# File 'lib/openai/models/admin/organization/admin_api_key.rb', line 50

Instance Attribute Details

#created_atInteger

The Unix timestamp (in seconds) of when the API key was created

Returns:

  • (Integer)


19
# File 'lib/openai/models/admin/organization/admin_api_key.rb', line 19

required :created_at, Integer

#idString

The identifier, which can be referenced in API endpoints

Returns:

  • (String)


13
# File 'lib/openai/models/admin/organization/admin_api_key.rb', line 13

required :id, String

#last_used_atInteger?

The Unix timestamp (in seconds) of when the API key was last used

Returns:

  • (Integer, nil)


42
# File 'lib/openai/models/admin/organization/admin_api_key.rb', line 42

optional :last_used_at, Integer, nil?: true

#nameString?

The name of the API key

Returns:

  • (String, nil)


48
# File 'lib/openai/models/admin/organization/admin_api_key.rb', line 48

optional :name, String, nil?: true

#objectSymbol, :"organization.admin_api_key"

The object type, which is always ‘organization.admin_api_key`

Returns:

  • (Symbol, :"organization.admin_api_key")


25
# File 'lib/openai/models/admin/organization/admin_api_key.rb', line 25

required :object, const: :"organization.admin_api_key"

#ownerOpenAI::Models::Admin::Organization::AdminAPIKey::Owner



30
# File 'lib/openai/models/admin/organization/admin_api_key.rb', line 30

required :owner, -> { OpenAI::Admin::Organization::AdminAPIKey::Owner }

#redacted_valueString

The redacted value of the API key

Returns:

  • (String)


36
# File 'lib/openai/models/admin/organization/admin_api_key.rb', line 36

required :redacted_value, String