Class: Anthropic::Models::Beta::BetaUserProfile

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

Overview

See Also:

  • Anthropic::Resources::Beta::UserProfiles#create

Defined Under Namespace

Modules: Relationship, Type

Instance Attribute Summary collapse

Class Method 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:, metadata:, relationship:, trust_grants:, type:, updated_at:, external_id: nil, name: nil) ⇒ Object

Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaUserProfile for more details.

Parameters:

  • id (String)

    Unique identifier for this user profile, prefixed uprof_.

  • created_at (Time)

    A timestamp in RFC 3339 format

  • metadata (Hash{Symbol=>String})

    Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up t

  • relationship (Symbol, Anthropic::Models::Beta::BetaUserProfile::Relationship)

    How the entity behind a user profile relates to the platform that owns the API k

  • trust_grants (Hash{Symbol=>Anthropic::Models::Beta::BetaUserProfileTrustGrant})

    Trust grants for this profile, keyed by grant name. Key omitted when no grant is

  • type (Symbol, Anthropic::Models::Beta::BetaUserProfile::Type)

    Object type. Always user_profile.

  • updated_at (Time)

    A timestamp in RFC 3339 format

  • external_id (String, nil) (defaults to: nil)

    Platform's own identifier for this user. Not enforced unique.

  • name (String, nil) (defaults to: nil)

    Display name of the entity this profile represents. For resold this is the res



# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 68

Instance Attribute Details

#created_atTime

A timestamp in RFC 3339 format

Parameters:

  • value (Time)

Returns:

  • (Time)


18
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 18

required :created_at, Time

#external_idString?

Platform's own identifier for this user. Not enforced unique.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


59
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 59

optional :external_id, String, nil?: true

#idString

Unique identifier for this user profile, prefixed uprof_.

Parameters:

  • value (String)

Returns:

  • (String)


12
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 12

required :id, String

#metadataHash{Symbol=>String}

Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.

Parameters:

  • value (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String})


25
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 25

required :metadata, Anthropic::Internal::Type::HashOf[String]

#nameString?

Display name of the entity this profile represents. For resold this is the resold-to company's name.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


66
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 66

optional :name, String, nil?: true

#relationshipSymbol, Anthropic::Models::Beta::BetaUserProfile::Relationship

How the entity behind a user profile relates to the platform that owns the API key. external: an individual end-user of the platform. resold: a company the platform resells Claude access to. internal: the platform's own usage.

Parameters:

  • value (Anthropic::Models::Beta::BetaUserProfile::relationship)

Returns:



33
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 33

required :relationship, enum: -> { Anthropic::Beta::BetaUserProfile::Relationship }

#trust_grantsHash{Symbol=>Anthropic::Models::Beta::BetaUserProfileTrustGrant}

Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.

Parameters:

  • value (::Hash[Symbol, Anthropic::Beta::BetaUserProfileTrustGrant])

Returns:



40
41
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 40

required :trust_grants,
-> { Anthropic::Internal::Type::HashOf[Anthropic::Beta::BetaUserProfileTrustGrant] }

#typeSymbol, Anthropic::Models::Beta::BetaUserProfile::Type

Object type. Always user_profile.

Parameters:

  • value (Anthropic::Models::Beta::BetaUserProfile::type_)

Returns:



47
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 47

required :type, enum: -> { Anthropic::Beta::BetaUserProfile::Type }

#updated_atTime

A timestamp in RFC 3339 format

Parameters:

  • value (Time)

Returns:

  • (Time)


53
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 53

required :updated_at, Time

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 102

Instance Method Details

#to_hash{

Returns:

  • ({)


50
# File 'sig/anthropic/models/beta/beta_user_profile.rbs', line 50

def to_hash: -> {