Class: Cadenya::Models::ProfileSpec

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/cadenya/models/profile_spec.rb

Defined Under Namespace

Modules: Type

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(type:, email: nil, name: nil) ⇒ Object

Some parameter documentations has been truncated, see Cadenya::Models::ProfileSpec for more details.

Configuration for a profile.

Parameters:

  • type (Symbol, Cadenya::Models::ProfileSpec::Type)

    Whether this profile represents a human user, an API key, or a system

  • email (String) (defaults to: nil)

    Email address of the profile. Required and unique within an account for

  • name (String) (defaults to: nil)

    Display name (e.g., “Bobby Tables”).



# File 'lib/cadenya/models/profile_spec.rb', line 25

Instance Attribute Details

#emailString?

Email address of the profile. Required and unique within an account for user profiles.

Returns:

  • (String, nil)


17
# File 'lib/cadenya/models/profile_spec.rb', line 17

optional :email, String

#nameString?

Display name (e.g., “Bobby Tables”).

Returns:

  • (String, nil)


23
# File 'lib/cadenya/models/profile_spec.rb', line 23

optional :name, String

#typeSymbol, Cadenya::Models::ProfileSpec::Type

Whether this profile represents a human user, an API key, or a system principal.



10
# File 'lib/cadenya/models/profile_spec.rb', line 10

required :type, enum: -> { Cadenya::ProfileSpec::Type }