Class: OpenAI::Models::Admin::Organization::Projects::ServiceAccounts::APIKeyCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rb,
sig/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rbs

Overview

See Also:

  • OpenAI::Resources::Admin::Organization::Projects::ServiceAccounts::APIKeys#create

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(project_id:, service_account_id:, name: nil, scopes: nil, request_options: {}) ⇒ Object

Parameters:

  • project_id (String)

    The ID of the project.

  • service_account_id (String)

    The ID of the service account.

  • name (String) (defaults to: nil)

    API key name.

  • scopes (Array<String>) (defaults to: nil)

    API key scopes.

  • request_options (OpenAI::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


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

Instance Attribute Details

#nameString?

API key name.

Parameters:

  • (String)

Returns:

  • (String, nil)


30
# File 'lib/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rb', line 30

optional :name, String

#project_idString

The ID of the project.

Parameters:

  • value (String)

Returns:

  • (String)


18
# File 'lib/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rb', line 18

required :project_id, String

#scopesArray<String>?

API key scopes.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


36
# File 'lib/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rb', line 36

optional :scopes, OpenAI::Internal::Type::ArrayOf[String]

#service_account_idString

The ID of the service account.

Parameters:

  • value (String)

Returns:

  • (String)


24
# File 'lib/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rb', line 24

required :service_account_id, String

Instance Method Details

#to_hash{

Returns:

  • ({)


40
# File 'sig/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rbs', line 40

def to_hash: -> {