Class: OpenAI::Models::Admin::Organization::Users::RoleListResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/admin/organization/users/role_list_response.rb,
sig/openai/models/admin/organization/users/role_list_response.rbs

Overview

See Also:

  • OpenAI::Resources::Admin::Organization::Users::Roles#list

Defined Under Namespace

Classes: AssignmentSource

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

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 ⇒ RoleListResponse

Returns a new instance of RoleListResponse.

Parameters:

  • id —

    Identifier for the role.

  • assignment_sources —

    Principals from which the role assignment is inherited, when available.

  • created_at —

    When the role was created.

  • created_by —

    Identifier of the actor who created the role.

  • created_by_user_obj —

    User details for the actor that created the role, when available.

  • description —

    Description of the role.

  • metadata —

    Arbitrary metadata stored on the role.

  • name —

    Name of the role.

  • permissions —

    Permissions associated with the role.

  • predefined_role —

    Whether the role is predefined by OpenAI.

  • resource_type —

    Resource type the role applies to.

  • updated_at —

    When the role was last updated.

  • id: (String)
  • assignment_sources: (::Array[OpenAI::Models::Admin::Organization::Users::RoleListResponse::AssignmentSource], nil)
  • created_at: (Integer, nil)
  • created_by: (String, nil)
  • created_by_user_obj: (::Hash[Symbol, top], nil)
  • description: (String, nil)
  • metadata: (::Hash[Symbol, top], nil)
  • name: (String)
  • permissions: (::Array[String])
  • predefined_role: (Boolean)
  • resource_type: (String)
  • updated_at: (Integer, nil)


83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'sig/openai/models/admin/organization/users/role_list_response.rbs', line 83

def initialize: (
  id: String,
  assignment_sources: ::Array[OpenAI::Models::Admin::Organization::Users::RoleListResponse::AssignmentSource]?,
  created_at: Integer?,
  created_by: String?,
  created_by_user_obj: ::Hash[Symbol, top]?,
  description: String?,
  metadata: ::Hash[Symbol, top]?,
  name: String,
  permissions: ::Array[String],
  predefined_role: bool,
  resource_type: String,
  updated_at: Integer?
) -> void

Instance Attribute Details

#assignment_sources ⇒ ::Array[OpenAI::Models::Admin::Organization::Users::RoleListResponse::AssignmentSource]?

Principals from which the role assignment is inherited, when available.



20
21
22
23
24
25
26
27
28
# File 'lib/openai/models/admin/organization/users/role_list_response.rb', line 20

required(
  :assignment_sources,
  -> {
    OpenAI::Internal::Type::ArrayOf[
      OpenAI::Models::Admin::Organization::Users::RoleListResponse::AssignmentSource
    ]
  },
  nil?: true
)

#created_at ⇒ Integer?

When the role was created.

Returns:

  • (Integer, nil)


34
# File 'lib/openai/models/admin/organization/users/role_list_response.rb', line 34

required :created_at, Integer, nil?: true

#created_by ⇒ String?

Identifier of the actor who created the role.

Returns:

  • (String, nil)


40
# File 'lib/openai/models/admin/organization/users/role_list_response.rb', line 40

required :created_by, String, nil?: true

#created_by_user_obj ⇒ ::Hash[Symbol, top]?

User details for the actor that created the role, when available.

Returns:

  • (::Hash[Symbol, top], nil)


46
47
48
49
50
# File 'lib/openai/models/admin/organization/users/role_list_response.rb', line 46

required(
  :created_by_user_obj,
  OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown],
  nil?: true
)

#description ⇒ String?

Description of the role.

Returns:

  • (String, nil)


56
# File 'lib/openai/models/admin/organization/users/role_list_response.rb', line 56

required :description, String, nil?: true

#id ⇒ String

Identifier for the role.

Returns:

  • (String)


14
# File 'lib/openai/models/admin/organization/users/role_list_response.rb', line 14

required :id, String

#metadata ⇒ ::Hash[Symbol, top]?

Arbitrary metadata stored on the role.

Returns:

  • (::Hash[Symbol, top], nil)


62
# File 'lib/openai/models/admin/organization/users/role_list_response.rb', line 62

required :metadata, OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown], nil?: true

#name ⇒ String

Name of the role.

Returns:

  • (String)


68
# File 'lib/openai/models/admin/organization/users/role_list_response.rb', line 68

required :name, String

#permissions ⇒ ::Array[String]

Permissions associated with the role.

Returns:

  • (::Array[String])


74
# File 'lib/openai/models/admin/organization/users/role_list_response.rb', line 74

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

#predefined_role ⇒ Boolean

Whether the role is predefined by OpenAI.

Returns:



80
# File 'lib/openai/models/admin/organization/users/role_list_response.rb', line 80

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

#resource_type ⇒ String

Resource type the role applies to.

Returns:

  • (String)


86
# File 'lib/openai/models/admin/organization/users/role_list_response.rb', line 86

required :resource_type, String

#updated_at ⇒ Integer?

When the role was last updated.

Returns:

  • (Integer, nil)


92
# File 'lib/openai/models/admin/organization/users/role_list_response.rb', line 92

required :updated_at, Integer, nil?: true

Instance Method Details

#to_hash ⇒ { id: String, assignment_sources: ::Array[OpenAI::Models::Admin::Organization::Users::RoleListResponse::AssignmentSource]?, created_at: Integer?, created_by: String?, created_by_user_obj: ::Hash[Symbol, top]?, description: String?, metadata: ::Hash[Symbol, top]?, name: String, permissions: ::Array[String], predefined_role: bool, resource_type: String, updated_at: Integer? }

Returns:



98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'sig/openai/models/admin/organization/users/role_list_response.rbs', line 98

def to_hash: -> {
  id: String,
  assignment_sources: ::Array[OpenAI::Models::Admin::Organization::Users::RoleListResponse::AssignmentSource]?,
  created_at: Integer?,
  created_by: String?,
  created_by_user_obj: ::Hash[Symbol, top]?,
  description: String?,
  metadata: ::Hash[Symbol, top]?,
  name: String,
  permissions: ::Array[String],
  predefined_role: bool,
  resource_type: String,
  updated_at: Integer?
}