Skip to content

Commit f146df5

Browse files
google-genai-botcopybara-github
authored andcommitted
chore: update Speakeasy OpenAPI generator to v2.954.1
Sync the Speakeasy OpenAPI generator to `v2.954.1` (`https://github.com/speakeasy-api/openapi-generation@af5f88b`) and regenerate the SDKs. PiperOrigin-RevId: 1008502371
1 parent 2677298 commit f146df5

222 files changed

Lines changed: 6010 additions & 1101 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/mypy.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- main
1111

1212
env:
13-
SPEAKEASY_VERSION: v2.952.4
13+
SPEAKEASY_VERSION: v2.954.1
1414

1515
jobs:
1616
mypy:

‎google/genai/_gaos/credentials.py‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def create(
237237
:param refresh_token: Required. Input only. OAuth2 refresh token. Write-only; never returned in responses.
238238
:param scopes: Optional. List of OAuth2 scopes.
239239
:param token_url: Required. OAuth2 token endpoint URL for refreshing access tokens.
240-
:param type:
240+
:param type_:
241241
:param extra_headers: Additional headers to set or replace on requests.
242242
:param extra_query: Additional query parameters to append to requests.
243243
:param extra_body: Additional JSON object fields to merge into request bodies.
@@ -268,7 +268,7 @@ def create(
268268
Accepts either a single location (e.g. \"header\") or an array of locations.
269269
:param trusted_domains: Optional. List of domains allowed to receive this environment variable
270270
value in HTTP requests.
271-
:param type:
271+
:param type_:
272272
:param value: Required. Input only. Secret value of the environment variable. Write-only; never
273273
returned in responses.
274274
:param extra_headers: Additional headers to set or replace on requests.
@@ -301,7 +301,7 @@ def create(
301301
:param prefix: Optional. Prefix to prepend to the token. Defaults to 'Bearer'. Set to ''
302302
for no prefix.
303303
:param token: Required. Input only. The static bearer token. Write-only; never returned in responses.
304-
:param type:
304+
:param type_:
305305
:param extra_headers: Additional headers to set or replace on requests.
306306
:param extra_query: Additional query parameters to append to requests.
307307
:param extra_body: Additional JSON object fields to merge into request bodies.
@@ -331,7 +331,7 @@ def create(
331331
:param refresh_token: Required. Input only. OAuth2 refresh token. Write-only; never returned in responses.
332332
:param scopes: Optional. List of OAuth2 scopes.
333333
:param token_url: Required. OAuth2 token endpoint URL for refreshing access tokens.
334-
:param type:
334+
:param type_:
335335
:param injection_location: Required. Locations where the environment variable can be injected in
336336
outgoing HTTP requests. Must contain at least one location.
337337
Accepts either a single location (e.g. \"header\") or an array of locations.
@@ -372,7 +372,7 @@ def create(
372372
:param refresh_token: Required. Input only. OAuth2 refresh token. Write-only; never returned in responses.
373373
:param scopes: Optional. List of OAuth2 scopes.
374374
:param token_url: Required. OAuth2 token endpoint URL for refreshing access tokens.
375-
:param type:
375+
:param type_:
376376
:param injection_location: Required. Locations where the environment variable can be injected in
377377
outgoing HTTP requests. Must contain at least one location.
378378
Accepts either a single location (e.g. \"header\") or an array of locations.
@@ -991,7 +991,7 @@ def update(
991991
:param refresh_token: Optional. Input only. OAuth2 refresh token. Write-only; never returned in responses.
992992
:param scopes: Optional. List of OAuth2 scopes.
993993
:param token_url: Optional. OAuth2 token endpoint URL for refreshing access tokens.
994-
:param type:
994+
:param type_:
995995
:param extra_headers: Additional headers to set or replace on requests.
996996
:param extra_query: Additional query parameters to append to requests.
997997
:param extra_body: Additional JSON object fields to merge into request bodies.
@@ -1023,7 +1023,7 @@ def update(
10231023
Accepts either a single location (e.g. \"header\") or an array of locations.
10241024
:param trusted_domains: Optional. List of domains allowed to receive this environment variable
10251025
value in HTTP requests.
1026-
:param type:
1026+
:param type_:
10271027
:param value: Optional. Input only. Secret value of the environment variable. Write-only; never
10281028
returned in responses.
10291029
:param extra_headers: Additional headers to set or replace on requests.
@@ -1057,7 +1057,7 @@ def update(
10571057
:param prefix: Optional. Prefix to prepend to the token. Defaults to 'Bearer'. Set to ''
10581058
for no prefix.
10591059
:param token: Optional. Input only. The static bearer token. Write-only; never returned in responses.
1060-
:param type:
1060+
:param type_:
10611061
:param extra_headers: Additional headers to set or replace on requests.
10621062
:param extra_query: Additional query parameters to append to requests.
10631063
:param extra_body: Additional JSON object fields to merge into request bodies.
@@ -1089,7 +1089,7 @@ def update(
10891089
:param refresh_token: Optional. Input only. OAuth2 refresh token. Write-only; never returned in responses.
10901090
:param scopes: Optional. List of OAuth2 scopes.
10911091
:param token_url: Optional. OAuth2 token endpoint URL for refreshing access tokens.
1092-
:param type:
1092+
:param type_:
10931093
:param injection_location: Optional. Locations where the environment variable can be injected in
10941094
outgoing HTTP requests.
10951095
Accepts either a single location (e.g. \"header\") or an array of locations.
@@ -1132,7 +1132,7 @@ def update(
11321132
:param refresh_token: Optional. Input only. OAuth2 refresh token. Write-only; never returned in responses.
11331133
:param scopes: Optional. List of OAuth2 scopes.
11341134
:param token_url: Optional. OAuth2 token endpoint URL for refreshing access tokens.
1135-
:param type:
1135+
:param type_:
11361136
:param injection_location: Optional. Locations where the environment variable can be injected in
11371137
outgoing HTTP requests.
11381138
Accepts either a single location (e.g. \"header\") or an array of locations.
@@ -1650,7 +1650,7 @@ async def create(
16501650
:param refresh_token: Required. Input only. OAuth2 refresh token. Write-only; never returned in responses.
16511651
:param scopes: Optional. List of OAuth2 scopes.
16521652
:param token_url: Required. OAuth2 token endpoint URL for refreshing access tokens.
1653-
:param type:
1653+
:param type_:
16541654
:param extra_headers: Additional headers to set or replace on requests.
16551655
:param extra_query: Additional query parameters to append to requests.
16561656
:param extra_body: Additional JSON object fields to merge into request bodies.
@@ -1681,7 +1681,7 @@ async def create(
16811681
Accepts either a single location (e.g. \"header\") or an array of locations.
16821682
:param trusted_domains: Optional. List of domains allowed to receive this environment variable
16831683
value in HTTP requests.
1684-
:param type:
1684+
:param type_:
16851685
:param value: Required. Input only. Secret value of the environment variable. Write-only; never
16861686
returned in responses.
16871687
:param extra_headers: Additional headers to set or replace on requests.
@@ -1714,7 +1714,7 @@ async def create(
17141714
:param prefix: Optional. Prefix to prepend to the token. Defaults to 'Bearer'. Set to ''
17151715
for no prefix.
17161716
:param token: Required. Input only. The static bearer token. Write-only; never returned in responses.
1717-
:param type:
1717+
:param type_:
17181718
:param extra_headers: Additional headers to set or replace on requests.
17191719
:param extra_query: Additional query parameters to append to requests.
17201720
:param extra_body: Additional JSON object fields to merge into request bodies.
@@ -1744,7 +1744,7 @@ async def create(
17441744
:param refresh_token: Required. Input only. OAuth2 refresh token. Write-only; never returned in responses.
17451745
:param scopes: Optional. List of OAuth2 scopes.
17461746
:param token_url: Required. OAuth2 token endpoint URL for refreshing access tokens.
1747-
:param type:
1747+
:param type_:
17481748
:param injection_location: Required. Locations where the environment variable can be injected in
17491749
outgoing HTTP requests. Must contain at least one location.
17501750
Accepts either a single location (e.g. \"header\") or an array of locations.
@@ -1785,7 +1785,7 @@ async def create(
17851785
:param refresh_token: Required. Input only. OAuth2 refresh token. Write-only; never returned in responses.
17861786
:param scopes: Optional. List of OAuth2 scopes.
17871787
:param token_url: Required. OAuth2 token endpoint URL for refreshing access tokens.
1788-
:param type:
1788+
:param type_:
17891789
:param injection_location: Required. Locations where the environment variable can be injected in
17901790
outgoing HTTP requests. Must contain at least one location.
17911791
Accepts either a single location (e.g. \"header\") or an array of locations.
@@ -2413,7 +2413,7 @@ async def update(
24132413
:param refresh_token: Optional. Input only. OAuth2 refresh token. Write-only; never returned in responses.
24142414
:param scopes: Optional. List of OAuth2 scopes.
24152415
:param token_url: Optional. OAuth2 token endpoint URL for refreshing access tokens.
2416-
:param type:
2416+
:param type_:
24172417
:param extra_headers: Additional headers to set or replace on requests.
24182418
:param extra_query: Additional query parameters to append to requests.
24192419
:param extra_body: Additional JSON object fields to merge into request bodies.
@@ -2445,7 +2445,7 @@ async def update(
24452445
Accepts either a single location (e.g. \"header\") or an array of locations.
24462446
:param trusted_domains: Optional. List of domains allowed to receive this environment variable
24472447
value in HTTP requests.
2448-
:param type:
2448+
:param type_:
24492449
:param value: Optional. Input only. Secret value of the environment variable. Write-only; never
24502450
returned in responses.
24512451
:param extra_headers: Additional headers to set or replace on requests.
@@ -2479,7 +2479,7 @@ async def update(
24792479
:param prefix: Optional. Prefix to prepend to the token. Defaults to 'Bearer'. Set to ''
24802480
for no prefix.
24812481
:param token: Optional. Input only. The static bearer token. Write-only; never returned in responses.
2482-
:param type:
2482+
:param type_:
24832483
:param extra_headers: Additional headers to set or replace on requests.
24842484
:param extra_query: Additional query parameters to append to requests.
24852485
:param extra_body: Additional JSON object fields to merge into request bodies.
@@ -2511,7 +2511,7 @@ async def update(
25112511
:param refresh_token: Optional. Input only. OAuth2 refresh token. Write-only; never returned in responses.
25122512
:param scopes: Optional. List of OAuth2 scopes.
25132513
:param token_url: Optional. OAuth2 token endpoint URL for refreshing access tokens.
2514-
:param type:
2514+
:param type_:
25152515
:param injection_location: Optional. Locations where the environment variable can be injected in
25162516
outgoing HTTP requests.
25172517
Accepts either a single location (e.g. \"header\") or an array of locations.
@@ -2554,7 +2554,7 @@ async def update(
25542554
:param refresh_token: Optional. Input only. OAuth2 refresh token. Write-only; never returned in responses.
25552555
:param scopes: Optional. List of OAuth2 scopes.
25562556
:param token_url: Optional. OAuth2 token endpoint URL for refreshing access tokens.
2557-
:param type:
2557+
:param type_:
25582558
:param injection_location: Optional. Locations where the environment variable can be injected in
25592559
outgoing HTTP requests.
25602560
Accepts either a single location (e.g. \"header\") or an array of locations.

‎google/genai/_gaos/models/cancelinteractionbyid.py‎

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
1919

2020
from __future__ import annotations
21-
from ..types import BaseModel, UNSET_SENTINEL
21+
from ..types import BaseModel, UNSET_SENTINEL, current_exclude_none, serialize_with_info
22+
from ..types.basemodel import current_by_alias, current_serialization_methods_dump
2223
from ..utils import FieldMetadata, PathParamMetadata
2324
import pydantic
2425
from pydantic import model_serializer
@@ -39,18 +40,32 @@ class CancelInteractionByIDGlobals(BaseModel):
3940
r"""API version for request routing."""
4041

4142
@model_serializer(mode="wrap")
43+
def _serialize_model_with_info(self, handler, info):
44+
return serialize_with_info(self.serialize_model, handler, info)
45+
4246
def serialize_model(self, handler):
4347
optional_fields = set(["api_version"])
48+
exclude_none = current_exclude_none()
49+
by_alias = current_by_alias()
50+
use_field_names = by_alias is False
51+
serialization_methods_dump = current_serialization_methods_dump()
4452
serialized = handler(self)
4553
m = {}
4654

4755
for n, f in type(self).model_fields.items():
48-
k = f.alias or n
49-
val = serialized.get(k, serialized.get(n))
56+
k = f.alias if f.alias is not None else n
57+
key = k if by_alias or k in serialized else n
58+
if key not in serialized and (
59+
serialization_methods_dump or exclude_none is False
60+
):
61+
continue
62+
val = serialized.pop(key, None)
5063

5164
if val != UNSET_SENTINEL:
5265
if val is not None or k not in optional_fields:
53-
m[k] = val
66+
m[n if use_field_names else k] = val
67+
for k, v in serialized.items():
68+
m[k] = v
5469

5570
return m
5671

@@ -77,17 +92,31 @@ class CancelInteractionByIDRequest(BaseModel):
7792
r"""API version for request routing."""
7893

7994
@model_serializer(mode="wrap")
95+
def _serialize_model_with_info(self, handler, info):
96+
return serialize_with_info(self.serialize_model, handler, info)
97+
8098
def serialize_model(self, handler):
8199
optional_fields = set(["api_version"])
100+
exclude_none = current_exclude_none()
101+
by_alias = current_by_alias()
102+
use_field_names = by_alias is False
103+
serialization_methods_dump = current_serialization_methods_dump()
82104
serialized = handler(self)
83105
m = {}
84106

85107
for n, f in type(self).model_fields.items():
86-
k = f.alias or n
87-
val = serialized.get(k, serialized.get(n))
108+
k = f.alias if f.alias is not None else n
109+
key = k if by_alias or k in serialized else n
110+
if key not in serialized and (
111+
serialization_methods_dump or exclude_none is False
112+
):
113+
continue
114+
val = serialized.pop(key, None)
88115

89116
if val != UNSET_SENTINEL:
90117
if val is not None or k not in optional_fields:
91-
m[k] = val
118+
m[n if use_field_names else k] = val
119+
for k, v in serialized.items():
120+
m[k] = v
92121

93122
return m

‎google/genai/_gaos/models/createagent.py‎

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
1919

2020
from __future__ import annotations
21-
from ..types import BaseModel, UNSET_SENTINEL
21+
from ..types import BaseModel, UNSET_SENTINEL, current_exclude_none, serialize_with_info
2222
from ..types.agents import agent as agents_agent
23+
from ..types.basemodel import current_by_alias, current_serialization_methods_dump
2324
from ..utils import FieldMetadata, PathParamMetadata, RequestMetadata
2425
from pydantic import model_serializer
2526
from typing import Optional
@@ -39,18 +40,32 @@ class CreateAgentGlobals(BaseModel):
3940
r"""API version for request routing."""
4041

4142
@model_serializer(mode="wrap")
43+
def _serialize_model_with_info(self, handler, info):
44+
return serialize_with_info(self.serialize_model, handler, info)
45+
4246
def serialize_model(self, handler):
4347
optional_fields = set(["api_version"])
48+
exclude_none = current_exclude_none()
49+
by_alias = current_by_alias()
50+
use_field_names = by_alias is False
51+
serialization_methods_dump = current_serialization_methods_dump()
4452
serialized = handler(self)
4553
m = {}
4654

4755
for n, f in type(self).model_fields.items():
48-
k = f.alias or n
49-
val = serialized.get(k, serialized.get(n))
56+
k = f.alias if f.alias is not None else n
57+
key = k if by_alias or k in serialized else n
58+
if key not in serialized and (
59+
serialization_methods_dump or exclude_none is False
60+
):
61+
continue
62+
val = serialized.pop(key, None)
5063

5164
if val != UNSET_SENTINEL:
5265
if val is not None or k not in optional_fields:
53-
m[k] = val
66+
m[n if use_field_names else k] = val
67+
for k, v in serialized.items():
68+
m[k] = v
5469

5570
return m
5671

@@ -76,17 +91,31 @@ class CreateAgentRequest(BaseModel):
7691
r"""API version for request routing."""
7792

7893
@model_serializer(mode="wrap")
94+
def _serialize_model_with_info(self, handler, info):
95+
return serialize_with_info(self.serialize_model, handler, info)
96+
7997
def serialize_model(self, handler):
8098
optional_fields = set(["api_version"])
99+
exclude_none = current_exclude_none()
100+
by_alias = current_by_alias()
101+
use_field_names = by_alias is False
102+
serialization_methods_dump = current_serialization_methods_dump()
81103
serialized = handler(self)
82104
m = {}
83105

84106
for n, f in type(self).model_fields.items():
85-
k = f.alias or n
86-
val = serialized.get(k, serialized.get(n))
107+
k = f.alias if f.alias is not None else n
108+
key = k if by_alias or k in serialized else n
109+
if key not in serialized and (
110+
serialization_methods_dump or exclude_none is False
111+
):
112+
continue
113+
val = serialized.pop(key, None)
87114

88115
if val != UNSET_SENTINEL:
89116
if val is not None or k not in optional_fields:
90-
m[k] = val
117+
m[n if use_field_names else k] = val
118+
for k, v in serialized.items():
119+
m[k] = v
91120

92121
return m

0 commit comments

Comments
 (0)