Class: Cadenya::Models::ResourceMetadata

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/cadenya/models/resource_metadata.rb,
sig/cadenya/models/resource_metadata.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(id:, account_id:, created_at:, name:, profile_id:, workspace_id:, external_id: nil, labels: nil, updated_at: nil) ⇒ Object

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

Standard metadata for persistent, named resources (e.g., agents, tools, prompts)

Parameters:

  • id (String)

    Unique identifier for the resource (prefixed ULID, e.g., "agent_01HXK...")

  • account_id (String)

    Account this resource belongs to for multi-tenant isolation (prefixed ULID)

  • created_at (Time)

    Timestamp when this resource was created

  • name (String)

    Human-readable name for the resource (e.g., "Customer Support Agent", "Email Too

  • profile_id (String)

    ID of the actor (user or service account) that created this resource

  • workspace_id (String)

    Workspace this resource belongs to for organizational grouping (prefixed ULID)

  • external_id (String) (defaults to: nil)

    External ID for the resource (e.g., a workflow ID from an external system)

  • labels (Hash{Symbol=>String}) (defaults to: nil)

    Arbitrary key-value pairs for categorization and filtering

  • updated_at (Time) (defaults to: nil)

    Timestamp when this resource was last updated



# File 'lib/cadenya/models/resource_metadata.rb', line 64

Instance Attribute Details

#account_idString

Returns the value of attribute account_id.

Returns:

  • (String)


29
30
31
# File 'sig/cadenya/models/resource_metadata.rbs', line 29

def 
  @account_id
end

#created_atTime

Returns the value of attribute created_at.

Returns:

  • (Time)


31
32
33
# File 'sig/cadenya/models/resource_metadata.rbs', line 31

def created_at
  @created_at
end

#external_idString?

External ID for the resource (e.g., a workflow ID from an external system)

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :external_id, String, api_name: :externalId

#idString

Returns the value of attribute id.

Returns:

  • (String)


27
28
29
# File 'sig/cadenya/models/resource_metadata.rbs', line 27

def id
  @id
end

#labelsHash{Symbol=>String}?

Arbitrary key-value pairs for categorization and filtering Examples: "production", "team": "platform", "version": "v2"

Parameters:

  • (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String}, nil)


24
# File 'lib/cadenya/models/resource_metadata.rb', line 24

optional :labels, Cadenya::Internal::Type::HashOf[String]

#nameString

Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") Required for resources that users interact with directly

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/cadenya/models/resource_metadata.rb', line 11

required :name, String

#profile_idString

Returns the value of attribute profile_id.

Returns:

  • (String)


33
34
35
# File 'sig/cadenya/models/resource_metadata.rbs', line 33

def profile_id
  @profile_id
end

#updated_atTime? (readonly)

Returns the value of attribute updated_at.

Returns:

  • (Time, nil)


37
38
39
# File 'sig/cadenya/models/resource_metadata.rbs', line 37

def updated_at
  @updated_at
end

#workspace_idString

Returns the value of attribute workspace_id.

Returns:

  • (String)


35
36
37
# File 'sig/cadenya/models/resource_metadata.rbs', line 35

def workspace_id
  @workspace_id
end

Instance Method Details

#to_hash{

Returns:

  • ({)


53
# File 'sig/cadenya/models/resource_metadata.rbs', line 53

def to_hash: -> {

#updated_at=Time (readonly)

Parameters:

  • (Time)

Returns:

  • (Time)


39
# File 'sig/cadenya/models/resource_metadata.rbs', line 39

def updated_at=: (Time) -> Time