Class UploadCreateParams.ExpiresAfter
-
- All Implemented Interfaces:
public final class UploadCreateParams.ExpiresAfter
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
UploadCreateParams.ExpiresAfter.Builder
A builder for ExpiresAfter.
-
Method Summary
Modifier and Type Method Description final JsonValue
_anchor()
Anchor timestamp after which the expiration policy applies. final Long
seconds()
The number of seconds after the anchor time that the file will expire. final JsonField<Long>
_seconds()
Returns the raw JSON value of seconds. final Map<String, JsonValue>
_additionalProperties()
final UploadCreateParams.ExpiresAfter.Builder
toBuilder()
final UploadCreateParams.ExpiresAfter
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static UploadCreateParams.ExpiresAfter.Builder
builder()
Returns a mutable builder for constructing an instance of ExpiresAfter. -
-
Method Detail
-
_anchor
final JsonValue _anchor()
Anchor timestamp after which the expiration policy applies. Supported anchors:
created_at
.Expected to always return the following:
JsonValue.from("created_at")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
seconds
final Long seconds()
The number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days).
-
_seconds
final JsonField<Long> _seconds()
Returns the raw JSON value of seconds.
Unlike seconds, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final UploadCreateParams.ExpiresAfter.Builder toBuilder()
-
validate
final UploadCreateParams.ExpiresAfter validate()
-
builder
final static UploadCreateParams.ExpiresAfter.Builder builder()
Returns a mutable builder for constructing an instance of ExpiresAfter.
The following fields are required:
.seconds()
-
-
-
-