class

OpenAI::Role

Inherits JSON::Serializable < Reference < Object

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

Constructors

new(object : RoleObject = RoleObject::Role, id : String = "", name : String = "", description : RoleDescription = nil, permissions : Array(String) = [] of String, resource_type : String = "", predefined_role : Bool = false)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

description

Optional description of the role.

Source
description=(description : RoleDescription)

Optional description of the role.

Source
id

Identifier for the role.

Source
id=(id : String)

Identifier for the role.

Source
name

Unique name for the role.

Source
name=(name : String)

Unique name for the role.

Source
object

Always role.

Source
object=(object : RoleObject)

Always role.

Source
permissions

Permissions granted by the role.

Source
permissions=(permissions : Array(String))

Permissions granted by the role.

Source
predefined_role

Whether the role is predefined and managed by OpenAI.

Source
predefined_role=(predefined_role : Bool)

Whether the role is predefined and managed by OpenAI.

Source
resource_type

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

Source
resource_type=(resource_type : String)

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

Source