Class: OpenAI::Models::Admin::Organization::Groups::RoleRetrieveResponse

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

Overview

See Also:

  • OpenAI::Resources::Admin::Organization::Groups::Roles#retrieve

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_with_error, 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 ⇒ Object

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.



83
# File 'sig/openai/models/admin/organization/groups/role_retrieve_response.rbs', line 83

def initialize: (

Instance Attribute Details

#assignment_sources ⇒ ::Array[OpenAI::Models::Admin::Organization::Groups::RoleRetrieveResponse::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/groups/role_retrieve_response.rb', line 20

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

#created_at ⇒ Integer?

When the role was created.

Returns:

  • (Integer, nil)


34
# File 'lib/openai/models/admin/organization/groups/role_retrieve_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/groups/role_retrieve_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/groups/role_retrieve_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/groups/role_retrieve_response.rb', line 56

required :description, String, nil?: true

#id ⇒ String

Identifier for the role.

Returns:

  • (String)


14
# File 'lib/openai/models/admin/organization/groups/role_retrieve_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/groups/role_retrieve_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/groups/role_retrieve_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/groups/role_retrieve_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/groups/role_retrieve_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/groups/role_retrieve_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/groups/role_retrieve_response.rb', line 92

required :updated_at, Integer, nil?: true

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


98
# File 'sig/openai/models/admin/organization/groups/role_retrieve_response.rbs', line 98

def to_hash: -> {