Class: Anthropic::Models::Organization::RBACRole

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/organization/rbac_role.rb,
sig/anthropic/models/organization/rbac_role.rbs

Overview

See Also:

  • Anthropic::Resources::Organization::RBACRoles#retrieve

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:, created_at:, display_name:, source:, updated_at:, type: :rbac_role) ⇒ RBACRole

Some parameter documentations has been truncated, see Anthropic::Models::Organization::RBACRole for more details.

Parameters:

  • id (String) —

    ID of the RBAC Role.

  • created_at (Time) —

    RFC 3339 datetime string indicating when the RBAC Role was created.

  • display_name (String) —

    Name of the RBAC Role. For a built-in role, this is Anthropic's name for the acc

  • source (Anthropic::Models::Organization::RBACRoleSourceBuiltIn, Anthropic::Models::Organization::RBACRoleSourceCustom) —

    Whether the RBAC Role is built-in or custom. More values of type may be added,

  • updated_at (Time) —

    RFC 3339 datetime string indicating when the RBAC Role was last updated.

  • type (Symbol, :rbac_role) (defaults to: :rbac_role) —

    Object type.

  • id: (String)
  • created_at: (Time)
  • display_name: (String)
  • source: (Anthropic::Models::Organization::rbac_role_source)
  • updated_at: (Time)
  • type: (:rbac_role) (defaults to: :rbac_role)


# File 'lib/anthropic/models/organization/rbac_role.rb', line 49

Instance Attribute Details

#created_at ⇒ Time

RFC 3339 datetime string indicating when the RBAC Role was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


18
# File 'lib/anthropic/models/organization/rbac_role.rb', line 18

required :created_at, Time

#display_name ⇒ String

Name of the RBAC Role. For a built-in role, this is Anthropic's name for the access that the role grants. Anthropic may change this name, so to keep a lasting reference to a role, store its id.

Parameters:

  • value (String)

Returns:

  • (String)


26
# File 'lib/anthropic/models/organization/rbac_role.rb', line 26

required :display_name, String

#id ⇒ String

ID of the RBAC Role.

Parameters:

  • value (String)

Returns:

  • (String)


12
# File 'lib/anthropic/models/organization/rbac_role.rb', line 12

required :id, String

#source ⇒ Anthropic::Models::Organization::RBACRoleSourceBuiltIn, Anthropic::Models::Organization::RBACRoleSourceCustom

Whether the RBAC Role is built-in or custom. More values of type may be added, so do not treat every role that is not built_in as custom.

Parameters:

  • value (Anthropic::Models::Organization::rbac_role_source)

Returns:



33
# File 'lib/anthropic/models/organization/rbac_role.rb', line 33

required :source, union: -> { Anthropic::Organization::RBACRoleSource }

#type ⇒ Symbol, :rbac_role

Object type.

For RBAC Roles, this is always "rbac_role".

Parameters:

  • value (:rbac_role)

Returns:

  • (Symbol, :rbac_role)


41
# File 'lib/anthropic/models/organization/rbac_role.rb', line 41

required :type, const: :rbac_role

#updated_at ⇒ Time

RFC 3339 datetime string indicating when the RBAC Role was last updated.

Parameters:

  • value (Time)

Returns:

  • (Time)


47
# File 'lib/anthropic/models/organization/rbac_role.rb', line 47

required :updated_at, Time

Instance Method Details

#to_hash ⇒ { id: String, created_at: Time, display_name: String, source: Anthropic::Models::Organization::rbac_role_source, type: :rbac_role, updated_at: Time }

Returns:

  • ({ id: String, created_at: Time, display_name: String, source: Anthropic::Models::Organization::rbac_role_source, type: :rbac_role, updated_at: Time })


36
37
38
39
40
41
42
43
# File 'sig/anthropic/models/organization/rbac_role.rbs', line 36

def to_hash: -> {
  id: String,
  created_at: Time,
  display_name: String,
  source: Anthropic::Models::Organization::rbac_role_source,
  type: :rbac_role,
  updated_at: Time
}