56
56
rest_version = requests_version ,
57
57
)
58
58
59
+ # TODO (numeric enums): This file was generated with the option to
60
+ # request that the server respond with enums JSON-encoded as
61
+ # numbers. The code below does not implement that functionality yet.
62
+
59
63
60
64
class ApiKeysRestInterceptor :
61
65
"""Interceptor for ApiKeys.
@@ -342,9 +346,6 @@ class ApiKeysRestTransport(ApiKeysTransport):
342
346
343
347
It sends JSON representations of protocol buffers over HTTP/1.1
344
348
345
- NOTE: This REST transport functionality is currently in a beta
346
- state (preview). We welcome your feedback via an issue in this
347
- library's source repository. Thank you!
348
349
"""
349
350
350
351
def __init__ (
@@ -364,39 +365,35 @@ def __init__(
364
365
) -> None :
365
366
"""Instantiate the transport.
366
367
367
- NOTE: This REST transport functionality is currently in a beta
368
- state (preview). We welcome your feedback via a GitHub issue in
369
- this library's repository. Thank you!
370
-
371
- Args:
372
- host (Optional[str]):
373
- The hostname to connect to.
374
- credentials (Optional[google.auth.credentials.Credentials]): The
375
- authorization credentials to attach to requests. These
376
- credentials identify the application to the service; if none
377
- are specified, the client will attempt to ascertain the
378
- credentials from the environment.
379
-
380
- credentials_file (Optional[str]): A file with credentials that can
381
- be loaded with :func:`google.auth.load_credentials_from_file`.
382
- This argument is ignored if ``channel`` is provided.
383
- scopes (Optional(Sequence[str])): A list of scopes. This argument is
384
- ignored if ``channel`` is provided.
385
- client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client
386
- certificate to configure mutual TLS HTTP channel. It is ignored
387
- if ``channel`` is provided.
388
- quota_project_id (Optional[str]): An optional project to use for billing
389
- and quota.
390
- client_info (google.api_core.gapic_v1.client_info.ClientInfo):
391
- The client info used to send a user-agent string along with
392
- API requests. If ``None``, then default info will be used.
393
- Generally, you only need to set this if you are developing
394
- your own client library.
395
- always_use_jwt_access (Optional[bool]): Whether self signed JWT should
396
- be used for service account credentials.
397
- url_scheme: the protocol scheme for the API endpoint. Normally
398
- "https", but for testing or local servers,
399
- "http" can be specified.
368
+ Args:
369
+ host (Optional[str]):
370
+ The hostname to connect to.
371
+ credentials (Optional[google.auth.credentials.Credentials]): The
372
+ authorization credentials to attach to requests. These
373
+ credentials identify the application to the service; if none
374
+ are specified, the client will attempt to ascertain the
375
+ credentials from the environment.
376
+
377
+ credentials_file (Optional[str]): A file with credentials that can
378
+ be loaded with :func:`google.auth.load_credentials_from_file`.
379
+ This argument is ignored if ``channel`` is provided.
380
+ scopes (Optional(Sequence[str])): A list of scopes. This argument is
381
+ ignored if ``channel`` is provided.
382
+ client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client
383
+ certificate to configure mutual TLS HTTP channel. It is ignored
384
+ if ``channel`` is provided.
385
+ quota_project_id (Optional[str]): An optional project to use for billing
386
+ and quota.
387
+ client_info (google.api_core.gapic_v1.client_info.ClientInfo):
388
+ The client info used to send a user-agent string along with
389
+ API requests. If ``None``, then default info will be used.
390
+ Generally, you only need to set this if you are developing
391
+ your own client library.
392
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
393
+ be used for service account credentials.
394
+ url_scheme: the protocol scheme for the API endpoint. Normally
395
+ "https", but for testing or local servers,
396
+ "http" can be specified.
400
397
"""
401
398
# Run the base constructor
402
399
# TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc.
@@ -518,7 +515,7 @@ def __call__(
518
515
body = json_format .MessageToJson (
519
516
transcoded_request ["body" ],
520
517
including_default_value_fields = False ,
521
- use_integers_for_enums = False ,
518
+ use_integers_for_enums = True ,
522
519
)
523
520
uri = transcoded_request ["uri" ]
524
521
method = transcoded_request ["method" ]
@@ -528,11 +525,13 @@ def __call__(
528
525
json_format .MessageToJson (
529
526
transcoded_request ["query_params" ],
530
527
including_default_value_fields = False ,
531
- use_integers_for_enums = False ,
528
+ use_integers_for_enums = True ,
532
529
)
533
530
)
534
531
query_params .update (self ._get_unset_required_fields (query_params ))
535
532
533
+ query_params ["$alt" ] = "json;enum-encoding=int"
534
+
536
535
# Send the request
537
536
headers = dict (metadata )
538
537
headers ["Content-Type" ] = "application/json"
@@ -614,11 +613,13 @@ def __call__(
614
613
json_format .MessageToJson (
615
614
transcoded_request ["query_params" ],
616
615
including_default_value_fields = False ,
617
- use_integers_for_enums = False ,
616
+ use_integers_for_enums = True ,
618
617
)
619
618
)
620
619
query_params .update (self ._get_unset_required_fields (query_params ))
621
620
621
+ query_params ["$alt" ] = "json;enum-encoding=int"
622
+
622
623
# Send the request
623
624
headers = dict (metadata )
624
625
headers ["Content-Type" ] = "application/json"
@@ -698,11 +699,13 @@ def __call__(
698
699
json_format .MessageToJson (
699
700
transcoded_request ["query_params" ],
700
701
including_default_value_fields = False ,
701
- use_integers_for_enums = False ,
702
+ use_integers_for_enums = True ,
702
703
)
703
704
)
704
705
query_params .update (self ._get_unset_required_fields (query_params ))
705
706
707
+ query_params ["$alt" ] = "json;enum-encoding=int"
708
+
706
709
# Send the request
707
710
headers = dict (metadata )
708
711
headers ["Content-Type" ] = "application/json"
@@ -782,11 +785,13 @@ def __call__(
782
785
json_format .MessageToJson (
783
786
transcoded_request ["query_params" ],
784
787
including_default_value_fields = False ,
785
- use_integers_for_enums = False ,
788
+ use_integers_for_enums = True ,
786
789
)
787
790
)
788
791
query_params .update (self ._get_unset_required_fields (query_params ))
789
792
793
+ query_params ["$alt" ] = "json;enum-encoding=int"
794
+
790
795
# Send the request
791
796
headers = dict (metadata )
792
797
headers ["Content-Type" ] = "application/json"
@@ -866,11 +871,13 @@ def __call__(
866
871
json_format .MessageToJson (
867
872
transcoded_request ["query_params" ],
868
873
including_default_value_fields = False ,
869
- use_integers_for_enums = False ,
874
+ use_integers_for_enums = True ,
870
875
)
871
876
)
872
877
query_params .update (self ._get_unset_required_fields (query_params ))
873
878
879
+ query_params ["$alt" ] = "json;enum-encoding=int"
880
+
874
881
# Send the request
875
882
headers = dict (metadata )
876
883
headers ["Content-Type" ] = "application/json"
@@ -952,11 +959,13 @@ def __call__(
952
959
json_format .MessageToJson (
953
960
transcoded_request ["query_params" ],
954
961
including_default_value_fields = False ,
955
- use_integers_for_enums = False ,
962
+ use_integers_for_enums = True ,
956
963
)
957
964
)
958
965
query_params .update (self ._get_unset_required_fields (query_params ))
959
966
967
+ query_params ["$alt" ] = "json;enum-encoding=int"
968
+
960
969
# Send the request
961
970
headers = dict (metadata )
962
971
headers ["Content-Type" ] = "application/json"
@@ -1037,7 +1046,7 @@ def __call__(
1037
1046
body = json_format .MessageToJson (
1038
1047
transcoded_request ["body" ],
1039
1048
including_default_value_fields = False ,
1040
- use_integers_for_enums = False ,
1049
+ use_integers_for_enums = True ,
1041
1050
)
1042
1051
uri = transcoded_request ["uri" ]
1043
1052
method = transcoded_request ["method" ]
@@ -1047,11 +1056,13 @@ def __call__(
1047
1056
json_format .MessageToJson (
1048
1057
transcoded_request ["query_params" ],
1049
1058
including_default_value_fields = False ,
1050
- use_integers_for_enums = False ,
1059
+ use_integers_for_enums = True ,
1051
1060
)
1052
1061
)
1053
1062
query_params .update (self ._get_unset_required_fields (query_params ))
1054
1063
1064
+ query_params ["$alt" ] = "json;enum-encoding=int"
1065
+
1055
1066
# Send the request
1056
1067
headers = dict (metadata )
1057
1068
headers ["Content-Type" ] = "application/json"
@@ -1131,7 +1142,7 @@ def __call__(
1131
1142
body = json_format .MessageToJson (
1132
1143
transcoded_request ["body" ],
1133
1144
including_default_value_fields = False ,
1134
- use_integers_for_enums = False ,
1145
+ use_integers_for_enums = True ,
1135
1146
)
1136
1147
uri = transcoded_request ["uri" ]
1137
1148
method = transcoded_request ["method" ]
@@ -1141,11 +1152,13 @@ def __call__(
1141
1152
json_format .MessageToJson (
1142
1153
transcoded_request ["query_params" ],
1143
1154
including_default_value_fields = False ,
1144
- use_integers_for_enums = False ,
1155
+ use_integers_for_enums = True ,
1145
1156
)
1146
1157
)
1147
1158
query_params .update (self ._get_unset_required_fields (query_params ))
1148
1159
1160
+ query_params ["$alt" ] = "json;enum-encoding=int"
1161
+
1149
1162
# Send the request
1150
1163
headers = dict (metadata )
1151
1164
headers ["Content-Type" ] = "application/json"
0 commit comments