Class: OpenAI::Models::Admin::Organization::Projects::ProjectAPIKey

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

Overview

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:, last_used_at:, name:, owner:, redacted_value:, object: :"organization.project.api_key") ⇒ Object

Represents an individual API key in a project.

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

  • last_used_at (Integer, nil)

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

  • name (String)

    The name of the API key

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

    The redacted value of the API key

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

    The object type, which is always ‘organization.project.api_key`



# File 'lib/openai/models/admin/organization/projects/project_api_key.rb', line 51

Instance Attribute Details

#created_atInteger

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

Returns:

  • (Integer)


20
# File 'lib/openai/models/admin/organization/projects/project_api_key.rb', line 20

required :created_at, Integer

#idString

The identifier, which can be referenced in API endpoints

Returns:

  • (String)


14
# File 'lib/openai/models/admin/organization/projects/project_api_key.rb', line 14

required :id, String

#last_used_atInteger?

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

Returns:

  • (Integer, nil)


26
# File 'lib/openai/models/admin/organization/projects/project_api_key.rb', line 26

required :last_used_at, Integer, nil?: true

#nameString

The name of the API key

Returns:

  • (String)


32
# File 'lib/openai/models/admin/organization/projects/project_api_key.rb', line 32

required :name, String

#objectSymbol, :"organization.project.api_key"

The object type, which is always ‘organization.project.api_key`

Returns:

  • (Symbol, :"organization.project.api_key")


38
# File 'lib/openai/models/admin/organization/projects/project_api_key.rb', line 38

required :object, const: :"organization.project.api_key"

#ownerOpenAI::Models::Admin::Organization::Projects::ProjectAPIKey::Owner



43
# File 'lib/openai/models/admin/organization/projects/project_api_key.rb', line 43

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

#redacted_valueString

The redacted value of the API key

Returns:

  • (String)


49
# File 'lib/openai/models/admin/organization/projects/project_api_key.rb', line 49

required :redacted_value, String