Skip to content

Commit

Permalink
feat: enable "rest" transport in Python for services supporting numer…
Browse files Browse the repository at this point in the history
…ic enums (#266)

* feat: enable "rest" transport in Python for services supporting numeric enums

PiperOrigin-RevId: 508143576

Source-Link: googleapis/googleapis@7a702a9

Source-Link: googleapis/googleapis-gen@6ad1279
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: googleapis/googleapis-gen@b0bedb7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBiZWRiNzJlNDc2NWEzZTBiNjc0YTI4YzUwZWEwZjlhOWIyNmE4OSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 21, 2023
1 parent 3a1c980 commit 98e0f28
Show file tree
Hide file tree
Showing 14 changed files with 20,250 additions and 428 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,71 @@
]
}
}
},
"rest": {
"libraryClient": "OsConfigServiceClient",
"rpcs": {
"CancelPatchJob": {
"methods": [
"cancel_patch_job"
]
},
"CreatePatchDeployment": {
"methods": [
"create_patch_deployment"
]
},
"DeletePatchDeployment": {
"methods": [
"delete_patch_deployment"
]
},
"ExecutePatchJob": {
"methods": [
"execute_patch_job"
]
},
"GetPatchDeployment": {
"methods": [
"get_patch_deployment"
]
},
"GetPatchJob": {
"methods": [
"get_patch_job"
]
},
"ListPatchDeployments": {
"methods": [
"list_patch_deployments"
]
},
"ListPatchJobInstanceDetails": {
"methods": [
"list_patch_job_instance_details"
]
},
"ListPatchJobs": {
"methods": [
"list_patch_jobs"
]
},
"PausePatchDeployment": {
"methods": [
"pause_patch_deployment"
]
},
"ResumePatchDeployment": {
"methods": [
"resume_patch_deployment"
]
},
"UpdatePatchDeployment": {
"methods": [
"update_patch_deployment"
]
}
}
}
}
},
Expand Down Expand Up @@ -270,6 +335,71 @@
]
}
}
},
"rest": {
"libraryClient": "OsConfigZonalServiceClient",
"rpcs": {
"CreateOSPolicyAssignment": {
"methods": [
"create_os_policy_assignment"
]
},
"DeleteOSPolicyAssignment": {
"methods": [
"delete_os_policy_assignment"
]
},
"GetInventory": {
"methods": [
"get_inventory"
]
},
"GetOSPolicyAssignment": {
"methods": [
"get_os_policy_assignment"
]
},
"GetOSPolicyAssignmentReport": {
"methods": [
"get_os_policy_assignment_report"
]
},
"GetVulnerabilityReport": {
"methods": [
"get_vulnerability_report"
]
},
"ListInventories": {
"methods": [
"list_inventories"
]
},
"ListOSPolicyAssignmentReports": {
"methods": [
"list_os_policy_assignment_reports"
]
},
"ListOSPolicyAssignmentRevisions": {
"methods": [
"list_os_policy_assignment_revisions"
]
},
"ListOSPolicyAssignments": {
"methods": [
"list_os_policy_assignments"
]
},
"ListVulnerabilityReports": {
"methods": [
"list_vulnerability_reports"
]
},
"UpdateOSPolicyAssignment": {
"methods": [
"update_os_policy_assignment"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, OsConfigServiceTransport
from .transports.grpc import OsConfigServiceGrpcTransport
from .transports.grpc_asyncio import OsConfigServiceGrpcAsyncIOTransport
from .transports.rest import OsConfigServiceRestTransport


class OsConfigServiceClientMeta(type):
Expand All @@ -71,6 +72,7 @@ class OsConfigServiceClientMeta(type):
) # type: Dict[str, Type[OsConfigServiceTransport]]
_transport_registry["grpc"] = OsConfigServiceGrpcTransport
_transport_registry["grpc_asyncio"] = OsConfigServiceGrpcAsyncIOTransport
_transport_registry["rest"] = OsConfigServiceRestTransport

def get_transport_class(
cls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@
from .base import OsConfigServiceTransport
from .grpc import OsConfigServiceGrpcTransport
from .grpc_asyncio import OsConfigServiceGrpcAsyncIOTransport
from .rest import OsConfigServiceRestInterceptor, OsConfigServiceRestTransport

# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[OsConfigServiceTransport]]
_transport_registry["grpc"] = OsConfigServiceGrpcTransport
_transport_registry["grpc_asyncio"] = OsConfigServiceGrpcAsyncIOTransport
_transport_registry["rest"] = OsConfigServiceRestTransport

__all__ = (
"OsConfigServiceTransport",
"OsConfigServiceGrpcTransport",
"OsConfigServiceGrpcAsyncIOTransport",
"OsConfigServiceRestTransport",
"OsConfigServiceRestInterceptor",
)
Loading

0 comments on commit 98e0f28

Please sign in to comment.