Class: ContextDev::Models::WebScreenshotResponse::CacheMetadata

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

Overview

See Also:

  • ContextDev::Models::WebScreenshotResponse#cache_metadata

Defined Under Namespace

Modules: Status

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(age_ms:, status:) ⇒ Object

Some parameter documentations has been truncated, see ContextDev::Models::WebScreenshotResponse::CacheMetadata for more details.

Cache outcome for this response. Composite responses are hits only when every cache-controlled fetch contributing to the output was a hit; age_ms is the oldest contributing hit.

Parameters:



# File 'lib/context_dev/models/web_screenshot_response.rb', line 104

Instance Attribute Details

#age_msInteger

Age of the cached data in milliseconds. Zero for miss and zdr responses.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


95
# File 'lib/context_dev/models/web_screenshot_response.rb', line 95

required :age_ms, Integer

#statusSymbol, ContextDev::Models::WebScreenshotResponse::CacheMetadata::Status

Whether the response was served from cache, required fresh work, or honored zero-data-retention cache bypass.

Parameters:

  • value (ContextDev::Models::WebScreenshotResponse::CacheMetadata::status)

Returns:



102
# File 'lib/context_dev/models/web_screenshot_response.rb', line 102

required :status, enum: -> { ContextDev::Models::WebScreenshotResponse::CacheMetadata::Status }

Instance Method Details

#to_hash{

Returns:

  • ({)


95
# File 'sig/context_dev/models/web_screenshot_response.rbs', line 95

def to_hash: -> {