Class: OpenAI::Models::Admin::Organization::Role

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

Overview

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:, description:, name:, permissions:, predefined_role:, resource_type:, object: :role) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Admin::Organization::Role for more details.

Details about a role that can be assigned through the public Roles API.

Parameters:

  • id (String)

    Identifier for the role.

  • description (String, nil)

    Optional description of the role.

  • name (String)

    Unique name for the role.

  • permissions (Array<String>)

    Permissions granted by the role.

  • predefined_role (Boolean)

    Whether the role is predefined and managed by OpenAI.

  • resource_type (String)

    Resource type the role is bound to (for example ‘api.organization` or `api.proje

  • object (Symbol, :role) (defaults to: :role)

    Always ‘role`.



# File 'lib/openai/models/admin/organization/role.rb', line 52

Instance Attribute Details

#descriptionString?

Optional description of the role.

Returns:

  • (String, nil)


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

required :description, String, nil?: true

#idString

Identifier for the role.

Returns:

  • (String)


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

required :id, String

#nameString

Unique name for the role.

Returns:

  • (String)


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

required :name, String

#objectSymbol, :role

Always ‘role`.

Returns:

  • (Symbol, :role)


31
# File 'lib/openai/models/admin/organization/role.rb', line 31

required :object, const: :role

#permissionsArray<String>

Permissions granted by the role.

Returns:

  • (Array<String>)


37
# File 'lib/openai/models/admin/organization/role.rb', line 37

required :permissions, OpenAI::Internal::Type::ArrayOf[String]

#predefined_roleBoolean

Whether the role is predefined and managed by OpenAI.

Returns:



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

required :predefined_role, OpenAI::Internal::Type::Boolean

#resource_typeString

Resource type the role is bound to (for example ‘api.organization` or `api.project`).

Returns:

  • (String)


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

required :resource_type, String