Class BetaSelfHostedWork
-
- All Implemented Interfaces:
public final class BetaSelfHostedWorkWork resource representing a unit of work in a self-hosted environment.
Work items are queued when sessions are created or when long-dormant sessions receive new messages. The environment worker polls for work to execute in a self-hosted sandbox.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaSelfHostedWork.BuilderA builder for BetaSelfHostedWork.
public final classBetaSelfHostedWork.MetadataUser-provided metadata key-value pairs associated with this work item
public final classBetaSelfHostedWork.StateCurrent state of the work item
-
Method Summary
Modifier and Type Method Description final Stringid()Work identifier (e.g., 'work_... final Optional<String>acknowledgedAt()RFC 3339 timestamp when the work item was acknowledged and assigned to a self-hosted sandbox final StringcreatedAt()RFC 3339 timestamp when work was created final BetaSessionWorkDatadata()The actual work to be performed final StringenvironmentId()Environment identifier this work belongs to (e.g. final Optional<String>latestHeartbeatAt()RFC 3339 timestamp of the most recent heartbeat final BetaSelfHostedWork.Metadatametadata()User-provided metadata key-value pairs associated with this work item final Optional<String>startedAt()RFC 3339 timestamp when work execution started final BetaSelfHostedWork.Statestate()Current state of the work item final Optional<String>stopRequestedAt()RFC 3339 timestamp when stop was requested final Optional<String>stoppedAt()RFC 3339 timestamp when work execution stopped final JsonValue_type()The type of object (always 'work')Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("work")final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<String>_acknowledgedAt()Returns the raw JSON value of acknowledgedAt. final JsonField<String>_createdAt()Returns the raw JSON value of createdAt. final JsonField<BetaSessionWorkData>_data()Returns the raw JSON value of data. final JsonField<String>_environmentId()Returns the raw JSON value of environmentId. final JsonField<String>_latestHeartbeatAt()Returns the raw JSON value of latestHeartbeatAt. final JsonField<BetaSelfHostedWork.Metadata>_metadata()Returns the raw JSON value of metadata. final JsonField<String>_startedAt()Returns the raw JSON value of startedAt. final JsonField<BetaSelfHostedWork.State>_state()Returns the raw JSON value of state. final JsonField<String>_stopRequestedAt()Returns the raw JSON value of stopRequestedAt. final JsonField<String>_stoppedAt()Returns the raw JSON value of stoppedAt. final Map<String, JsonValue>_additionalProperties()final BetaSelfHostedWork.BuildertoBuilder()final BetaSelfHostedWorkvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaSelfHostedWork.Builderbuilder()Returns a mutable builder for constructing an instance of BetaSelfHostedWork. -
-
Method Detail
-
acknowledgedAt
final Optional<String> acknowledgedAt()
RFC 3339 timestamp when the work item was acknowledged and assigned to a self-hosted sandbox
-
data
final BetaSessionWorkData data()
The actual work to be performed
-
environmentId
final String environmentId()
Environment identifier this work belongs to (e.g.,
env_...)
-
latestHeartbeatAt
final Optional<String> latestHeartbeatAt()
RFC 3339 timestamp of the most recent heartbeat
-
metadata
final BetaSelfHostedWork.Metadata metadata()
User-provided metadata key-value pairs associated with this work item
-
state
final BetaSelfHostedWork.State state()
Current state of the work item
-
stopRequestedAt
final Optional<String> stopRequestedAt()
RFC 3339 timestamp when stop was requested
-
_type
final JsonValue _type()
The type of object (always 'work')
Expected to always return the following:
JsonValue.from("work")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_acknowledgedAt
final JsonField<String> _acknowledgedAt()
Returns the raw JSON value of acknowledgedAt.
Unlike acknowledgedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_createdAt
final JsonField<String> _createdAt()
Returns the raw JSON value of createdAt.
Unlike createdAt, this method doesn't throw if the JSON field has an unexpected type.
-
_data
final JsonField<BetaSessionWorkData> _data()
Returns the raw JSON value of data.
Unlike data, this method doesn't throw if the JSON field has an unexpected type.
-
_environmentId
final JsonField<String> _environmentId()
Returns the raw JSON value of environmentId.
Unlike environmentId, this method doesn't throw if the JSON field has an unexpected type.
-
_latestHeartbeatAt
final JsonField<String> _latestHeartbeatAt()
Returns the raw JSON value of latestHeartbeatAt.
Unlike latestHeartbeatAt, this method doesn't throw if the JSON field has an unexpected type.
-
_metadata
final JsonField<BetaSelfHostedWork.Metadata> _metadata()
Returns the raw JSON value of metadata.
Unlike metadata, this method doesn't throw if the JSON field has an unexpected type.
-
_startedAt
final JsonField<String> _startedAt()
Returns the raw JSON value of startedAt.
Unlike startedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_state
final JsonField<BetaSelfHostedWork.State> _state()
Returns the raw JSON value of state.
Unlike state, this method doesn't throw if the JSON field has an unexpected type.
-
_stopRequestedAt
final JsonField<String> _stopRequestedAt()
Returns the raw JSON value of stopRequestedAt.
Unlike stopRequestedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_stoppedAt
final JsonField<String> _stoppedAt()
Returns the raw JSON value of stoppedAt.
Unlike stoppedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaSelfHostedWork.Builder toBuilder()
-
validate
final BetaSelfHostedWork validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static BetaSelfHostedWork.Builder builder()
Returns a mutable builder for constructing an instance of BetaSelfHostedWork.
The following fields are required:
.id() .acknowledgedAt() .createdAt() .data() .environmentId() .latestHeartbeatAt() .metadata() .startedAt() .state() .stopRequestedAt() .stoppedAt()
-
-
-
-