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 (#113)

* 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

* 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

* 🦉 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 9, 2023
1 parent 9150f75 commit e7a2a92
Show file tree
Hide file tree
Showing 5 changed files with 22,815 additions and 93 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,241 @@
]
}
}
},
"rest": {
"libraryClient": "VmMigrationClient",
"rpcs": {
"AddGroupMigration": {
"methods": [
"add_group_migration"
]
},
"CancelCloneJob": {
"methods": [
"cancel_clone_job"
]
},
"CancelCutoverJob": {
"methods": [
"cancel_cutover_job"
]
},
"CreateCloneJob": {
"methods": [
"create_clone_job"
]
},
"CreateCutoverJob": {
"methods": [
"create_cutover_job"
]
},
"CreateDatacenterConnector": {
"methods": [
"create_datacenter_connector"
]
},
"CreateGroup": {
"methods": [
"create_group"
]
},
"CreateMigratingVm": {
"methods": [
"create_migrating_vm"
]
},
"CreateSource": {
"methods": [
"create_source"
]
},
"CreateTargetProject": {
"methods": [
"create_target_project"
]
},
"CreateUtilizationReport": {
"methods": [
"create_utilization_report"
]
},
"DeleteDatacenterConnector": {
"methods": [
"delete_datacenter_connector"
]
},
"DeleteGroup": {
"methods": [
"delete_group"
]
},
"DeleteMigratingVm": {
"methods": [
"delete_migrating_vm"
]
},
"DeleteSource": {
"methods": [
"delete_source"
]
},
"DeleteTargetProject": {
"methods": [
"delete_target_project"
]
},
"DeleteUtilizationReport": {
"methods": [
"delete_utilization_report"
]
},
"FetchInventory": {
"methods": [
"fetch_inventory"
]
},
"FinalizeMigration": {
"methods": [
"finalize_migration"
]
},
"GetCloneJob": {
"methods": [
"get_clone_job"
]
},
"GetCutoverJob": {
"methods": [
"get_cutover_job"
]
},
"GetDatacenterConnector": {
"methods": [
"get_datacenter_connector"
]
},
"GetGroup": {
"methods": [
"get_group"
]
},
"GetMigratingVm": {
"methods": [
"get_migrating_vm"
]
},
"GetReplicationCycle": {
"methods": [
"get_replication_cycle"
]
},
"GetSource": {
"methods": [
"get_source"
]
},
"GetTargetProject": {
"methods": [
"get_target_project"
]
},
"GetUtilizationReport": {
"methods": [
"get_utilization_report"
]
},
"ListCloneJobs": {
"methods": [
"list_clone_jobs"
]
},
"ListCutoverJobs": {
"methods": [
"list_cutover_jobs"
]
},
"ListDatacenterConnectors": {
"methods": [
"list_datacenter_connectors"
]
},
"ListGroups": {
"methods": [
"list_groups"
]
},
"ListMigratingVms": {
"methods": [
"list_migrating_vms"
]
},
"ListReplicationCycles": {
"methods": [
"list_replication_cycles"
]
},
"ListSources": {
"methods": [
"list_sources"
]
},
"ListTargetProjects": {
"methods": [
"list_target_projects"
]
},
"ListUtilizationReports": {
"methods": [
"list_utilization_reports"
]
},
"PauseMigration": {
"methods": [
"pause_migration"
]
},
"RemoveGroupMigration": {
"methods": [
"remove_group_migration"
]
},
"ResumeMigration": {
"methods": [
"resume_migration"
]
},
"StartMigration": {
"methods": [
"start_migration"
]
},
"UpdateGroup": {
"methods": [
"update_group"
]
},
"UpdateMigratingVm": {
"methods": [
"update_migrating_vm"
]
},
"UpdateSource": {
"methods": [
"update_source"
]
},
"UpdateTargetProject": {
"methods": [
"update_target_project"
]
},
"UpgradeAppliance": {
"methods": [
"upgrade_appliance"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, VmMigrationTransport
from .transports.grpc import VmMigrationGrpcTransport
from .transports.grpc_asyncio import VmMigrationGrpcAsyncIOTransport
from .transports.rest import VmMigrationRestTransport


class VmMigrationClientMeta(type):
Expand All @@ -77,6 +78,7 @@ class VmMigrationClientMeta(type):
_transport_registry = OrderedDict() # type: Dict[str, Type[VmMigrationTransport]]
_transport_registry["grpc"] = VmMigrationGrpcTransport
_transport_registry["grpc_asyncio"] = VmMigrationGrpcAsyncIOTransport
_transport_registry["rest"] = VmMigrationRestTransport

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 VmMigrationTransport
from .grpc import VmMigrationGrpcTransport
from .grpc_asyncio import VmMigrationGrpcAsyncIOTransport
from .rest import VmMigrationRestInterceptor, VmMigrationRestTransport

# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[VmMigrationTransport]]
_transport_registry["grpc"] = VmMigrationGrpcTransport
_transport_registry["grpc_asyncio"] = VmMigrationGrpcAsyncIOTransport
_transport_registry["rest"] = VmMigrationRestTransport

__all__ = (
"VmMigrationTransport",
"VmMigrationGrpcTransport",
"VmMigrationGrpcAsyncIOTransport",
"VmMigrationRestTransport",
"VmMigrationRestInterceptor",
)
Loading

0 comments on commit e7a2a92

Please sign in to comment.