Class: Anthropic::Models::Beta::Environments::BetaSelfHostedWorkHeartbeatResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/environments/beta_self_hosted_work_heartbeat_response.rb

Overview

Defined Under Namespace

Modules: State

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(last_heartbeat:, lease_extended:, state:, ttl_seconds:, type: :work_heartbeat) ⇒ Object

Response after recording a heartbeat for a work item.

Parameters:

  • last_heartbeat (String)

    RFC 3339 timestamp of the actual heartbeat from DB

  • lease_extended (Boolean)

    Whether the heartbeat succeeded in extending the lease

  • state (Symbol, Anthropic::Models::Beta::Environments::BetaSelfHostedWorkHeartbeatResponse::State)

    Current state of the work item (active/stopping/stopped)

  • ttl_seconds (Integer)

    Effective TTL applied to the lease

  • type (Symbol, :work_heartbeat) (defaults to: :work_heartbeat)

    The type of response



# File 'lib/anthropic/models/beta/environments/beta_self_hosted_work_heartbeat_response.rb', line 39

Instance Attribute Details

#last_heartbeatString

RFC 3339 timestamp of the actual heartbeat from DB

Returns:

  • (String)


13
# File 'lib/anthropic/models/beta/environments/beta_self_hosted_work_heartbeat_response.rb', line 13

required :last_heartbeat, String

#lease_extendedBoolean

Whether the heartbeat succeeded in extending the lease

Returns:



19
# File 'lib/anthropic/models/beta/environments/beta_self_hosted_work_heartbeat_response.rb', line 19

required :lease_extended, Anthropic::Internal::Type::Boolean

#stateSymbol, Anthropic::Models::Beta::Environments::BetaSelfHostedWorkHeartbeatResponse::State

Current state of the work item (active/stopping/stopped)



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

required :state, enum: -> { Anthropic::Beta::Environments::BetaSelfHostedWorkHeartbeatResponse::State }

#ttl_secondsInteger

Effective TTL applied to the lease

Returns:

  • (Integer)


31
# File 'lib/anthropic/models/beta/environments/beta_self_hosted_work_heartbeat_response.rb', line 31

required :ttl_seconds, Integer

#typeSymbol, :work_heartbeat

The type of response

Returns:

  • (Symbol, :work_heartbeat)


37
# File 'lib/anthropic/models/beta/environments/beta_self_hosted_work_heartbeat_response.rb', line 37

required :type, const: :work_heartbeat