Class: Cadenya::Models::APIKeySpec

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/cadenya/models/api_key_spec.rb,
sig/cadenya/models/api_key_spec.rbs

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(token: nil, description: nil, permissions: nil, system_: nil) ⇒ Object

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

Configuration for an API key.

Parameters:

  • token (String) (defaults to: nil)

    The bearer token used to authenticate as this API key. Returned only on

  • description (String) (defaults to: nil)

    Free-form description of what this API key is used for.

  • permissions (Array<String>) (defaults to: nil)

    Permissions granted to this key. Each entry is a colon-separated

  • system_ (Boolean) (defaults to: nil)

    True when this key is managed by the system (e.g. the auto-provisioned



# File 'lib/cadenya/models/api_key_spec.rb', line 36

Instance Attribute Details

#descriptionString?

Free-form description of what this API key is used for.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :description, String

#permissionsArray<String>?

Permissions granted to this key. Each entry is a colon-separated verb:resource string (e.g. "manage:agents"). Currently has no enforced effect; reserved for future fine-grained authorization.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


18
# File 'lib/cadenya/models/api_key_spec.rb', line 18

optional :permissions, Cadenya::Internal::Type::ArrayOf[String]

#system_Boolean? (readonly)

Returns the value of attribute system_.

Returns:

  • (Boolean, nil)


24
25
26
# File 'sig/cadenya/models/api_key_spec.rbs', line 24

def system_
  @system_
end

#tokenString? (readonly)

Returns the value of attribute token.

Returns:

  • (String, nil)


20
21
22
# File 'sig/cadenya/models/api_key_spec.rbs', line 20

def token
  @token
end

Instance Method Details

#system_=Boolean (readonly)

Parameters:

  • (Boolean)

Returns:

  • (Boolean)


26
# File 'sig/cadenya/models/api_key_spec.rbs', line 26

def system_=: (bool) -> bool

#to_hash{

Returns:

  • ({)


35
# File 'sig/cadenya/models/api_key_spec.rbs', line 35

def to_hash: -> {

#token=String (readonly)

Parameters:

  • (String)

Returns:

  • (String)


22
# File 'sig/cadenya/models/api_key_spec.rbs', line 22

def token=: (String) -> String