Class: OpenAI::Models::Admin::Organization::Role
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Admin::Organization::Role
- Defined in:
- lib/openai/models/admin/organization/role.rb,
sig/openai/models/admin/organization/role.rbs
Overview
Instance Attribute Summary collapse
-
#description ⇒ String?
Optional description of the role.
-
#id ⇒ String
Identifier for the role.
-
#name ⇒ String
Unique name for the role.
-
#object ⇒ :role
Always
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.organizationorapi.project).
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(id:, description:, name:, permissions:, predefined_role:, resource_type:, object: :role) ⇒ Role
constructor
A new instance of Role.
- #to_hash ⇒ { id: String, description: String?, name: String, ?object: :role, permissions: ::Array[String], predefined_role: bool, resource_type: String }
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:, description:, name:, permissions:, predefined_role:, resource_type:, object: :role) ⇒ Role
Returns a new instance of Role.
|
|
# File 'lib/openai/models/admin/organization/role.rb', line 52
|
Instance Attribute Details
#description ⇒ String?
Optional description of the role.
19 |
# File 'lib/openai/models/admin/organization/role.rb', line 19 required :description, String, nil?: true |
#id ⇒ String
Identifier for the role.
13 |
# File 'lib/openai/models/admin/organization/role.rb', line 13 required :id, String |
#name ⇒ String
Unique name for the role.
25 |
# File 'lib/openai/models/admin/organization/role.rb', line 25 required :name, String |
#object ⇒ :role
Always role.
31 |
# File 'lib/openai/models/admin/organization/role.rb', line 31 required :object, const: :role |
#permissions ⇒ ::Array[String]
Permissions granted by the role.
37 |
# File 'lib/openai/models/admin/organization/role.rb', line 37 required :permissions, OpenAI::Internal::Type::ArrayOf[String] |
#predefined_role ⇒ Boolean
Whether the role is predefined and managed by OpenAI.
43 |
# File 'lib/openai/models/admin/organization/role.rb', line 43 required :predefined_role, OpenAI::Internal::Type::Boolean |
#resource_type ⇒ String
Resource type the role is bound to (for example api.organization or
api.project).
50 |
# File 'lib/openai/models/admin/organization/role.rb', line 50 required :resource_type, String |
Instance Method Details
#to_hash ⇒ { id: String, description: String?, name: String, ?object: :role, permissions: ::Array[String], predefined_role: bool, resource_type: String }
64 65 66 67 68 69 70 71 72 |
# File 'sig/openai/models/admin/organization/role.rbs', line 64
def to_hash: -> {
id: String,
description: String?,
name: String,
?object: :role,
permissions: ::Array[String],
predefined_role: bool,
resource_type: String
}
|