Class: Inttegro::Search::Freshness

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/inttegro/search/freshness.rb

Overview

Typed representation of the freshness object in the Inttegro API.

This generated model is immutable. Construct it with .new, or decode a string-keyed API payload with .from_hash. #serialize produces a string-keyed hash using the original wire field names and serialized enum values.

Instance Attribute Summary collapse

Instance Attribute Details

#observed_at ⇒ Time? (readonly)

Value of the observed_at field in the Inttegro API payload.

Optional in the API payload; omitted values default to nil. Wire name: observed_at.

Returns:

  • (Time, nil)


37
38
39
40
41
# File 'lib/inttegro/search/freshness.rb', line 37

class Freshness < T::Struct
  const :state, Inttegro::Search::FreshnessState
  const :observed_at, T.nilable(Time), default: nil
  const :resources, T.nilable(T::Array[Inttegro::Search::ResourceFreshness]), default: nil
end

#resources ⇒ Array<Inttegro::Search::ResourceFreshness>? (readonly)

Value of the resources field in the Inttegro API payload.

Optional in the API payload; omitted values default to nil. Wire name: resources.

Returns:



37
38
39
40
41
# File 'lib/inttegro/search/freshness.rb', line 37

class Freshness < T::Struct
  const :state, Inttegro::Search::FreshnessState
  const :observed_at, T.nilable(Time), default: nil
  const :resources, T.nilable(T::Array[Inttegro::Search::ResourceFreshness]), default: nil
end

#state ⇒ Inttegro::Search::FreshnessState (readonly)

Value of the state field in the Inttegro API payload.

Required in the API payload. Wire name: state.



37
38
39
40
41
# File 'lib/inttegro/search/freshness.rb', line 37

class Freshness < T::Struct
  const :state, Inttegro::Search::FreshnessState
  const :observed_at, T.nilable(Time), default: nil
  const :resources, T.nilable(T::Array[Inttegro::Search::ResourceFreshness]), default: nil
end