Class: OpenAI::Models::FileCreateParams::ExpiresAfter

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/file_create_params.rb,
sig/openai/models/file_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(seconds:, anchor: :created_at) ⇒ ExpiresAfter

Returns a new instance of ExpiresAfter.

Parameters:

  • seconds

    The number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days).

  • anchor (defaults to: :created_at)

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

  • seconds: (Integer)
  • anchor: (:created_at) (defaults to: :created_at)


64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/openai/models/file_create_params.rb', line 64

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

  # @!attribute seconds
  #   The number of seconds after the anchor time that the file will expire. Must be
  #   between 3600 (1 hour) and 2592000 (30 days).
  #
  #   @return [Integer]
  required :seconds, Integer

  # @!method initialize(seconds:, anchor: :created_at)
  #   The expiration policy for a file. By default, files with `purpose=batch` expire
  #   after 30 days and all other files are persisted until they are manually deleted.
  #
  #   @param seconds [Integer]
  #     The number of seconds after the anchor time that the file will expire. Must be
  #     between 3600 (1 hour) and 2592000 (30 days).
  #
  #   @param anchor [Symbol, :created_at]
  #     Anchor timestamp after which the expiration policy applies. Supported anchors:
  #     `created_at`.
end

Instance Attribute Details

#anchor:created_at

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

Returns:

  • (:created_at)


70
# File 'lib/openai/models/file_create_params.rb', line 70

required :anchor, const: :created_at

#secondsInteger

The number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days).

Returns:

  • (Integer)


77
# File 'lib/openai/models/file_create_params.rb', line 77

required :seconds, Integer

Instance Method Details

#to_hash{ ?anchor: :created_at, seconds: Integer }

Returns:

  • ({ ?anchor: :created_at, seconds: Integer })


93
# File 'sig/openai/models/file_create_params.rbs', line 93

def to_hash: -> { ?anchor: :created_at, seconds: Integer }