Class: OpenAI::Models::VectorStoreCreateParams::ExpiresAfter

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

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, 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(days:, anchor: :last_active_at) ⇒ ExpiresAfter

Returns a new instance of ExpiresAfter.

Parameters:

  • days —

    The number of days after the anchor time that the vector store will expire.

  • anchor (defaults to: :last_active_at) —

    Anchor timestamp after which the expiration policy applies. Supported anchors: last_active_at.

  • days: (Integer)
  • anchor: (:last_active_at) (defaults to: :last_active_at)


85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/openai/models/vector_store_create_params.rb', line 85

class ExpiresAfter < OpenAI::Internal::Type::BaseModel
  # @!attribute anchor
  #   Anchor timestamp after which the expiration policy applies. Supported anchors:
  #   `last_active_at`.
  #
  #   @return [Symbol, :last_active_at]
  required :anchor, const: :last_active_at

  # @!attribute days
  #   The number of days after the anchor time that the vector store will expire.
  #
  #   @return [Integer]
  required :days, Integer

  # @!method initialize(days:, anchor: :last_active_at)
  #   The expiration policy for a vector store.
  #
  #   @param days [Integer]
  #     The number of days after the anchor time that the vector store will expire.
  #
  #   @param anchor [Symbol, :last_active_at]
  #     Anchor timestamp after which the expiration policy applies. Supported anchors:
  #     `last_active_at`.
end

Instance Attribute Details

#anchor ⇒ :last_active_at

Anchor timestamp after which the expiration policy applies. Supported anchors: last_active_at.

Returns:

  • (:last_active_at)


91
# File 'lib/openai/models/vector_store_create_params.rb', line 91

required :anchor, const: :last_active_at

#days ⇒ Integer

The number of days after the anchor time that the vector store will expire.

Returns:

  • (Integer)


97
# File 'lib/openai/models/vector_store_create_params.rb', line 97

required :days, Integer

Instance Method Details

#to_hash ⇒ { ?anchor: :last_active_at, days: Integer }

Returns:

  • ({ ?anchor: :last_active_at, days: Integer })


126
# File 'sig/openai/models/vector_store_create_params.rbs', line 126

def to_hash: -> { ?anchor: :last_active_at, days: Integer }