Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .castiron.stats.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
schema_version: 1
generation_id: 9ddc7bd7-7dde-4ca0-9796-b799d1856183
openapi_spec_hash: 92700e1a33a4f6174a01b46648c8186a
openapi_transformed_spec_hash: e37bbe0f04caa6093f1cb5d65d23ad03
config_hash: beab4f058e80bab30085bb6c8467b65f
codegen_sha: eb5e25357e53704e2f933c553955a272266a1c04
codegen_hash: eba4178634b1f9b13d20cce4648c21f0009e610a7434e11e4b363c03f7058563
public_codegen_sha: f2bbcb54a3442935e643fd86befd04a969fbcb60
generation_id: fd65dd19-7eac-493f-9f90-c62db36ea447
openapi_spec_hash: b2c62b342b04685226037c980f2b5a7a
openapi_transformed_spec_hash: ba44bf31326f01a1d886b7510dd9da8a
config_hash: 1e11a5becf7bc1c2e9e07b8654872dc4
codegen_sha: 65429161dddc59cf304fa034eb8caccb05c4b1e6
codegen_hash: 9302c8bf58629b0afe926ed88c80b2f20beb9a2555afe1febb68867f72ade4ea
public_codegen_sha: d9c7f61c82c73280993dd32b5a1ef3d2c0c8d490
56 changes: 51 additions & 5 deletions api_reference/openapi.transformed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9552,7 +9552,8 @@ paths:
"line_item": null,
"project_id": null,
"api_key_id": null,
"quantity": null
"quantity": null,
"quantity_unit": null
}
]
}
Expand Down Expand Up @@ -31011,6 +31012,21 @@ components:
- type: number
description: When `group_by=line_item`, this field provides the quantity of the grouped costs result.
- type: 'null'
quantity_unit:
description: The unit of the `quantity` value. If no single supported unit applies to the result, this field is `null`.
anyOf:
- type: string
- type: string
enum:
- tokens
- 1000_tokens
- duration_seconds
- duration_minutes
- duration_hours
- gibibyte_hours
- images
- characters
- type: 'null'
required:
- object
x-oaiMeta:
Expand All @@ -31022,9 +31038,10 @@ components:
"value": 0.06,
"currency": "usd"
},
"line_item": "Image models",
"line_item": "input_tokens",
"project_id": "proj_abc",
"quantity": 10000
"quantity": 10000,
"quantity_unit": "tokens"
}
CreateAssistantRequest:
type: object
Expand Down Expand Up @@ -42278,6 +42295,9 @@ components:
- type: string
- type: 'null'
description: The external key associated with the project.
residency:
$ref: '#/components/schemas/PublicProjectResidency'
description: The residency configuration for the project.
required:
- id
- object
Expand Down Expand Up @@ -42473,7 +42493,15 @@ components:
anyOf:
- type: string
- type: 'null'
description: Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field.
deprecated: true
description: |-
Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field.
Deprecated: use `residency` instead. Do not provide both `geography` and `residency`.
residency:
anyOf:
- $ref: '#/components/schemas/PublicProjectResidency'
- type: 'null'
description: Create the project with the specified residency configuration. Your organization must have access to the requested residency configuration in order to use it. See [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field.
external_key_id:
anyOf:
- type: string
Expand Down Expand Up @@ -43170,7 +43198,10 @@ components:
anyOf:
- type: string
- type: 'null'
description: Geography for the project.
deprecated: true
description: |-
Geography for the project.
Deprecated: use `residency` when creating a project to configure data residency. This field is retained for backward compatibility.
ProjectUser:
type: object
description: Represents an individual user in a project.
Expand Down Expand Up @@ -64729,6 +64760,21 @@ components:
- input_tokens_details
title: Image generation usage
description: For `gpt-image-1` only, the token usage information for the image generation.
PublicProjectResidency:
type: string
enum:
- GLOBAL
- US_STORAGE_PROCESSING
- EU_STORAGE_PROCESSING
- JP_STORAGE
- KR_STORAGE
- CA_STORAGE
- SG_STORAGE
- IN_STORAGE
- AU_STORAGE
- GB_STORAGE
- AE_STORAGE
- AE_STORAGE_PROCESSING
SpecificProgrammaticToolCallingParam:
properties:
type:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ private constructor(
private val archivedAt: JsonField<Long>,
private val externalKeyId: JsonField<String>,
private val name: JsonField<String>,
private val residency: JsonField<ProjectResidency>,
private val status: JsonField<String>,
private val additionalProperties: MutableMap<String, JsonValue>,
) {
Expand All @@ -41,8 +42,21 @@ private constructor(
@ExcludeMissing
externalKeyId: JsonField<String> = JsonMissing.of(),
@JsonProperty("name") @ExcludeMissing name: JsonField<String> = JsonMissing.of(),
@JsonProperty("residency")
@ExcludeMissing
residency: JsonField<ProjectResidency> = JsonMissing.of(),
@JsonProperty("status") @ExcludeMissing status: JsonField<String> = JsonMissing.of(),
) : this(id, createdAt, object_, archivedAt, externalKeyId, name, status, mutableMapOf())
) : this(
id,
createdAt,
object_,
archivedAt,
externalKeyId,
name,
residency,
status,
mutableMapOf(),
)

/**
* The identifier, which can be referenced in API endpoints
Expand Down Expand Up @@ -97,6 +111,14 @@ private constructor(
*/
fun name(): Optional<String> = name.getOptional("name")

/**
* The residency configuration for the project.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
fun residency(): Optional<ProjectResidency> = residency.getOptional("residency")

/**
* `active` or `archived`
*
Expand Down Expand Up @@ -142,6 +164,15 @@ private constructor(
*/
@JsonProperty("name") @ExcludeMissing fun _name(): JsonField<String> = name

/**
* Returns the raw JSON value of [residency].
*
* Unlike [residency], this method doesn't throw if the JSON field has an unexpected type.
*/
@JsonProperty("residency")
@ExcludeMissing
fun _residency(): JsonField<ProjectResidency> = residency

/**
* Returns the raw JSON value of [status].
*
Expand Down Expand Up @@ -184,6 +215,7 @@ private constructor(
private var archivedAt: JsonField<Long> = JsonMissing.of()
private var externalKeyId: JsonField<String> = JsonMissing.of()
private var name: JsonField<String> = JsonMissing.of()
private var residency: JsonField<ProjectResidency> = JsonMissing.of()
private var status: JsonField<String> = JsonMissing.of()
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

Expand All @@ -195,6 +227,7 @@ private constructor(
archivedAt = project.archivedAt
externalKeyId = project.externalKeyId
name = project.name
residency = project.residency
status = project.status
additionalProperties = project.additionalProperties.toMutableMap()
}
Expand Down Expand Up @@ -289,6 +322,18 @@ private constructor(
*/
fun name(name: JsonField<String>) = apply { this.name = name }

/** The residency configuration for the project. */
fun residency(residency: ProjectResidency) = residency(JsonField.of(residency))

/**
* Sets [Builder.residency] to an arbitrary JSON value.
*
* You should usually call [Builder.residency] with a well-typed [ProjectResidency] value
* instead. This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
fun residency(residency: JsonField<ProjectResidency>) = apply { this.residency = residency }

/** `active` or `archived` */
fun status(status: String?) = status(JsonField.ofNullable(status))

Expand Down Expand Up @@ -343,6 +388,7 @@ private constructor(
archivedAt,
externalKeyId,
name,
residency,
status,
additionalProperties.toMutableMap(),
)
Expand Down Expand Up @@ -373,6 +419,7 @@ private constructor(
archivedAt()
externalKeyId()
name()
residency().ifPresent { it.validate() }
status()
validated = true
}
Expand All @@ -398,6 +445,7 @@ private constructor(
(if (archivedAt.asKnown().isPresent) 1 else 0) +
(if (externalKeyId.asKnown().isPresent) 1 else 0) +
(if (name.asKnown().isPresent) 1 else 0) +
(residency.asKnown().getOrNull()?.validity() ?: 0) +
(if (status.asKnown().isPresent) 1 else 0)

override fun equals(other: Any?): Boolean {
Expand All @@ -412,6 +460,7 @@ private constructor(
archivedAt == other.archivedAt &&
externalKeyId == other.externalKeyId &&
name == other.name &&
residency == other.residency &&
status == other.status &&
additionalProperties == other.additionalProperties
}
Expand All @@ -424,6 +473,7 @@ private constructor(
archivedAt,
externalKeyId,
name,
residency,
status,
additionalProperties,
)
Expand All @@ -432,5 +482,5 @@ private constructor(
override fun hashCode(): Int = hashCode

override fun toString() =
"Project{id=$id, createdAt=$createdAt, object_=$object_, archivedAt=$archivedAt, externalKeyId=$externalKeyId, name=$name, status=$status, additionalProperties=$additionalProperties}"
"Project{id=$id, createdAt=$createdAt, object_=$object_, archivedAt=$archivedAt, externalKeyId=$externalKeyId, name=$name, residency=$residency, status=$status, additionalProperties=$additionalProperties}"
}
Loading
Loading