Skip to content

Commit e36cf1b

Browse files
gcf-owl-bot[bot]vchudnov-gparthea
authored
feat: enable "rest" transport in Python for services supporting numeric enums (googleapis#491)
* feat: enable "rest" transport in Python for services supporting numeric enums PiperOrigin-RevId: 508143576 Source-Link: googleapis/googleapis@7a702a9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6ad1279c0e7aa787ac6b66c9fd4a210692edffcd Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmFkMTI3OWMwZTdhYTc4N2FjNmI2NmM5ZmQ0YTIxMDY5MmVkZmZjZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: Add service_yaml_parameters to py_gapic_library BUILD.bazel targets PiperOrigin-RevId: 510187992 Source-Link: googleapis/googleapis@5edc235 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b0bedb72e4765a3e0b674a28c50ea0f9a9b26a89 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBiZWRiNzJlNDc2NWEzZTBiNjc0YTI4YzUwZWEwZjlhOWIyNmE4OSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Update gapic-generator-python to v1.8.5 PiperOrigin-RevId: 511892190 Source-Link: googleapis/googleapis@a45d9c0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1907294b1d8365ea24f8c5f2e059a64124c4ed3b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTkwNzI5NGIxZDgzNjVlYTI0ZjhjNWYyZTA1OWE2NDEyNGM0ZWQzYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Victor Chudnovsky <vchudnov@google.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 76fd96c commit e36cf1b

File tree

11 files changed

+13978
-108
lines changed

11 files changed

+13978
-108
lines changed

packages/google-cloud-dlp/google/cloud/dlp_v2/gapic_metadata.json

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,181 @@
356356
]
357357
}
358358
}
359+
},
360+
"rest": {
361+
"libraryClient": "DlpServiceClient",
362+
"rpcs": {
363+
"ActivateJobTrigger": {
364+
"methods": [
365+
"activate_job_trigger"
366+
]
367+
},
368+
"CancelDlpJob": {
369+
"methods": [
370+
"cancel_dlp_job"
371+
]
372+
},
373+
"CreateDeidentifyTemplate": {
374+
"methods": [
375+
"create_deidentify_template"
376+
]
377+
},
378+
"CreateDlpJob": {
379+
"methods": [
380+
"create_dlp_job"
381+
]
382+
},
383+
"CreateInspectTemplate": {
384+
"methods": [
385+
"create_inspect_template"
386+
]
387+
},
388+
"CreateJobTrigger": {
389+
"methods": [
390+
"create_job_trigger"
391+
]
392+
},
393+
"CreateStoredInfoType": {
394+
"methods": [
395+
"create_stored_info_type"
396+
]
397+
},
398+
"DeidentifyContent": {
399+
"methods": [
400+
"deidentify_content"
401+
]
402+
},
403+
"DeleteDeidentifyTemplate": {
404+
"methods": [
405+
"delete_deidentify_template"
406+
]
407+
},
408+
"DeleteDlpJob": {
409+
"methods": [
410+
"delete_dlp_job"
411+
]
412+
},
413+
"DeleteInspectTemplate": {
414+
"methods": [
415+
"delete_inspect_template"
416+
]
417+
},
418+
"DeleteJobTrigger": {
419+
"methods": [
420+
"delete_job_trigger"
421+
]
422+
},
423+
"DeleteStoredInfoType": {
424+
"methods": [
425+
"delete_stored_info_type"
426+
]
427+
},
428+
"FinishDlpJob": {
429+
"methods": [
430+
"finish_dlp_job"
431+
]
432+
},
433+
"GetDeidentifyTemplate": {
434+
"methods": [
435+
"get_deidentify_template"
436+
]
437+
},
438+
"GetDlpJob": {
439+
"methods": [
440+
"get_dlp_job"
441+
]
442+
},
443+
"GetInspectTemplate": {
444+
"methods": [
445+
"get_inspect_template"
446+
]
447+
},
448+
"GetJobTrigger": {
449+
"methods": [
450+
"get_job_trigger"
451+
]
452+
},
453+
"GetStoredInfoType": {
454+
"methods": [
455+
"get_stored_info_type"
456+
]
457+
},
458+
"HybridInspectDlpJob": {
459+
"methods": [
460+
"hybrid_inspect_dlp_job"
461+
]
462+
},
463+
"HybridInspectJobTrigger": {
464+
"methods": [
465+
"hybrid_inspect_job_trigger"
466+
]
467+
},
468+
"InspectContent": {
469+
"methods": [
470+
"inspect_content"
471+
]
472+
},
473+
"ListDeidentifyTemplates": {
474+
"methods": [
475+
"list_deidentify_templates"
476+
]
477+
},
478+
"ListDlpJobs": {
479+
"methods": [
480+
"list_dlp_jobs"
481+
]
482+
},
483+
"ListInfoTypes": {
484+
"methods": [
485+
"list_info_types"
486+
]
487+
},
488+
"ListInspectTemplates": {
489+
"methods": [
490+
"list_inspect_templates"
491+
]
492+
},
493+
"ListJobTriggers": {
494+
"methods": [
495+
"list_job_triggers"
496+
]
497+
},
498+
"ListStoredInfoTypes": {
499+
"methods": [
500+
"list_stored_info_types"
501+
]
502+
},
503+
"RedactImage": {
504+
"methods": [
505+
"redact_image"
506+
]
507+
},
508+
"ReidentifyContent": {
509+
"methods": [
510+
"reidentify_content"
511+
]
512+
},
513+
"UpdateDeidentifyTemplate": {
514+
"methods": [
515+
"update_deidentify_template"
516+
]
517+
},
518+
"UpdateInspectTemplate": {
519+
"methods": [
520+
"update_inspect_template"
521+
]
522+
},
523+
"UpdateJobTrigger": {
524+
"methods": [
525+
"update_job_trigger"
526+
]
527+
},
528+
"UpdateStoredInfoType": {
529+
"methods": [
530+
"update_stored_info_type"
531+
]
532+
}
533+
}
359534
}
360535
}
361536
}

packages/google-cloud-dlp/google/cloud/dlp_v2/services/dlp_service/async_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
except AttributeError: # pragma: NO COVER
4343
OptionalRetry = Union[retries.Retry, object] # type: ignore
4444

45+
from google.cloud.location import locations_pb2 # type: ignore
4546
from google.protobuf import field_mask_pb2 # type: ignore
4647
from google.protobuf import timestamp_pb2 # type: ignore
4748

packages/google-cloud-dlp/google/cloud/dlp_v2/services/dlp_service/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
except AttributeError: # pragma: NO COVER
4747
OptionalRetry = Union[retries.Retry, object] # type: ignore
4848

49+
from google.cloud.location import locations_pb2 # type: ignore
4950
from google.protobuf import field_mask_pb2 # type: ignore
5051
from google.protobuf import timestamp_pb2 # type: ignore
5152

@@ -55,6 +56,7 @@
5556
from .transports.base import DEFAULT_CLIENT_INFO, DlpServiceTransport
5657
from .transports.grpc import DlpServiceGrpcTransport
5758
from .transports.grpc_asyncio import DlpServiceGrpcAsyncIOTransport
59+
from .transports.rest import DlpServiceRestTransport
5860

5961

6062
class DlpServiceClientMeta(type):
@@ -68,6 +70,7 @@ class DlpServiceClientMeta(type):
6870
_transport_registry = OrderedDict() # type: Dict[str, Type[DlpServiceTransport]]
6971
_transport_registry["grpc"] = DlpServiceGrpcTransport
7072
_transport_registry["grpc_asyncio"] = DlpServiceGrpcAsyncIOTransport
73+
_transport_registry["rest"] = DlpServiceRestTransport
7174

7275
def get_transport_class(
7376
cls,

packages/google-cloud-dlp/google/cloud/dlp_v2/services/dlp_service/transports/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@
1919
from .base import DlpServiceTransport
2020
from .grpc import DlpServiceGrpcTransport
2121
from .grpc_asyncio import DlpServiceGrpcAsyncIOTransport
22+
from .rest import DlpServiceRestInterceptor, DlpServiceRestTransport
2223

2324
# Compile a registry of transports.
2425
_transport_registry = OrderedDict() # type: Dict[str, Type[DlpServiceTransport]]
2526
_transport_registry["grpc"] = DlpServiceGrpcTransport
2627
_transport_registry["grpc_asyncio"] = DlpServiceGrpcAsyncIOTransport
28+
_transport_registry["rest"] = DlpServiceRestTransport
2729

2830
__all__ = (
2931
"DlpServiceTransport",
3032
"DlpServiceGrpcTransport",
3133
"DlpServiceGrpcAsyncIOTransport",
34+
"DlpServiceRestTransport",
35+
"DlpServiceRestInterceptor",
3236
)

packages/google-cloud-dlp/google/cloud/dlp_v2/services/dlp_service/transports/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from google.api_core import retry as retries
2323
import google.auth # type: ignore
2424
from google.auth import credentials as ga_credentials # type: ignore
25+
from google.cloud.location import locations_pb2 # type: ignore
2526
from google.oauth2 import service_account # type: ignore
2627
from google.protobuf import empty_pb2 # type: ignore
2728

packages/google-cloud-dlp/google/cloud/dlp_v2/services/dlp_service/transports/grpc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import google.auth # type: ignore
2121
from google.auth import credentials as ga_credentials # type: ignore
2222
from google.auth.transport.grpc import SslCredentials # type: ignore
23+
from google.cloud.location import locations_pb2 # type: ignore
2324
from google.protobuf import empty_pb2 # type: ignore
2425
import grpc # type: ignore
2526

packages/google-cloud-dlp/google/cloud/dlp_v2/services/dlp_service/transports/grpc_asyncio.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from google.api_core import gapic_v1, grpc_helpers_async
2020
from google.auth import credentials as ga_credentials # type: ignore
2121
from google.auth.transport.grpc import SslCredentials # type: ignore
22+
from google.cloud.location import locations_pb2 # type: ignore
2223
from google.protobuf import empty_pb2 # type: ignore
2324
import grpc # type: ignore
2425
from grpc.experimental import aio # type: ignore

0 commit comments

Comments
 (0)