Skip to content

Commit 9a4948e

Browse files
feat: Add support for REST transport (#30)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 474644226 Source-Link: googleapis/googleapis@f90b329 Source-Link: googleapis/googleapis-gen@4ad8763 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFkODc2M2JkZTY3NmY5MmEzZWI3MDc1M2FlMWNmZWQwZTgxMzg3ZSJ9 PiperOrigin-RevId: 474571730 Source-Link: googleapis/googleapis@5a9ee4d Source-Link: googleapis/googleapis-gen@ceafe52 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2VhZmU1MjFmMTM3NjgwZmRlZTJmOWNhOWUxOTQ3Y2RkODI1MDcwZCJ9 fix(deps): require google-api-core>=1.33.1,>=2.8.0 fix(deps): require protobuf >= 3.20.1
1 parent e296327 commit 9a4948e

File tree

88 files changed

+29403
-2165
lines changed

Some content is hidden

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

88 files changed

+29403
-2165
lines changed

packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/gapic_metadata.json

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,26 @@
4646
]
4747
}
4848
}
49+
},
50+
"rest": {
51+
"libraryClient": "ProvisioningClient",
52+
"rpcs": {
53+
"CreateInstance": {
54+
"methods": [
55+
"create_instance"
56+
]
57+
},
58+
"DeleteInstance": {
59+
"methods": [
60+
"delete_instance"
61+
]
62+
},
63+
"GetInstance": {
64+
"methods": [
65+
"get_instance"
66+
]
67+
}
68+
}
4969
}
5070
}
5171
},
@@ -410,6 +430,186 @@
410430
]
411431
}
412432
}
433+
},
434+
"rest": {
435+
"libraryClient": "RegistryClient",
436+
"rpcs": {
437+
"CreateApi": {
438+
"methods": [
439+
"create_api"
440+
]
441+
},
442+
"CreateApiDeployment": {
443+
"methods": [
444+
"create_api_deployment"
445+
]
446+
},
447+
"CreateApiSpec": {
448+
"methods": [
449+
"create_api_spec"
450+
]
451+
},
452+
"CreateApiVersion": {
453+
"methods": [
454+
"create_api_version"
455+
]
456+
},
457+
"CreateArtifact": {
458+
"methods": [
459+
"create_artifact"
460+
]
461+
},
462+
"DeleteApi": {
463+
"methods": [
464+
"delete_api"
465+
]
466+
},
467+
"DeleteApiDeployment": {
468+
"methods": [
469+
"delete_api_deployment"
470+
]
471+
},
472+
"DeleteApiDeploymentRevision": {
473+
"methods": [
474+
"delete_api_deployment_revision"
475+
]
476+
},
477+
"DeleteApiSpec": {
478+
"methods": [
479+
"delete_api_spec"
480+
]
481+
},
482+
"DeleteApiSpecRevision": {
483+
"methods": [
484+
"delete_api_spec_revision"
485+
]
486+
},
487+
"DeleteApiVersion": {
488+
"methods": [
489+
"delete_api_version"
490+
]
491+
},
492+
"DeleteArtifact": {
493+
"methods": [
494+
"delete_artifact"
495+
]
496+
},
497+
"GetApi": {
498+
"methods": [
499+
"get_api"
500+
]
501+
},
502+
"GetApiDeployment": {
503+
"methods": [
504+
"get_api_deployment"
505+
]
506+
},
507+
"GetApiSpec": {
508+
"methods": [
509+
"get_api_spec"
510+
]
511+
},
512+
"GetApiSpecContents": {
513+
"methods": [
514+
"get_api_spec_contents"
515+
]
516+
},
517+
"GetApiVersion": {
518+
"methods": [
519+
"get_api_version"
520+
]
521+
},
522+
"GetArtifact": {
523+
"methods": [
524+
"get_artifact"
525+
]
526+
},
527+
"GetArtifactContents": {
528+
"methods": [
529+
"get_artifact_contents"
530+
]
531+
},
532+
"ListApiDeploymentRevisions": {
533+
"methods": [
534+
"list_api_deployment_revisions"
535+
]
536+
},
537+
"ListApiDeployments": {
538+
"methods": [
539+
"list_api_deployments"
540+
]
541+
},
542+
"ListApiSpecRevisions": {
543+
"methods": [
544+
"list_api_spec_revisions"
545+
]
546+
},
547+
"ListApiSpecs": {
548+
"methods": [
549+
"list_api_specs"
550+
]
551+
},
552+
"ListApiVersions": {
553+
"methods": [
554+
"list_api_versions"
555+
]
556+
},
557+
"ListApis": {
558+
"methods": [
559+
"list_apis"
560+
]
561+
},
562+
"ListArtifacts": {
563+
"methods": [
564+
"list_artifacts"
565+
]
566+
},
567+
"ReplaceArtifact": {
568+
"methods": [
569+
"replace_artifact"
570+
]
571+
},
572+
"RollbackApiDeployment": {
573+
"methods": [
574+
"rollback_api_deployment"
575+
]
576+
},
577+
"RollbackApiSpec": {
578+
"methods": [
579+
"rollback_api_spec"
580+
]
581+
},
582+
"TagApiDeploymentRevision": {
583+
"methods": [
584+
"tag_api_deployment_revision"
585+
]
586+
},
587+
"TagApiSpecRevision": {
588+
"methods": [
589+
"tag_api_spec_revision"
590+
]
591+
},
592+
"UpdateApi": {
593+
"methods": [
594+
"update_api"
595+
]
596+
},
597+
"UpdateApiDeployment": {
598+
"methods": [
599+
"update_api_deployment"
600+
]
601+
},
602+
"UpdateApiSpec": {
603+
"methods": [
604+
"update_api_spec"
605+
]
606+
},
607+
"UpdateApiVersion": {
608+
"methods": [
609+
"update_api_version"
610+
]
611+
}
612+
}
413613
}
414614
}
415615
}

packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/provisioning/client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
from .transports.base import ProvisioningTransport, DEFAULT_CLIENT_INFO
4747
from .transports.grpc import ProvisioningGrpcTransport
4848
from .transports.grpc_asyncio import ProvisioningGrpcAsyncIOTransport
49+
from .transports.rest import ProvisioningRestTransport
4950

5051

5152
class ProvisioningClientMeta(type):
@@ -59,6 +60,7 @@ class ProvisioningClientMeta(type):
5960
_transport_registry = OrderedDict() # type: Dict[str, Type[ProvisioningTransport]]
6061
_transport_registry["grpc"] = ProvisioningGrpcTransport
6162
_transport_registry["grpc_asyncio"] = ProvisioningGrpcAsyncIOTransport
63+
_transport_registry["rest"] = ProvisioningRestTransport
6264

6365
def get_transport_class(
6466
cls,
@@ -354,6 +356,9 @@ def __init__(
354356
transport (Union[str, ProvisioningTransport]): The
355357
transport to use. If set to None, a transport is chosen
356358
automatically.
359+
NOTE: "rest" transport functionality is currently in a
360+
beta state (preview). We welcome your feedback via an
361+
issue in this library's source repository.
357362
client_options (google.api_core.client_options.ClientOptions): Custom options for the
358363
client. It won't take effect if a ``transport`` instance is provided.
359364
(1) The ``api_endpoint`` property can be used to override the

packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/services/provisioning/transports/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,20 @@
1919
from .base import ProvisioningTransport
2020
from .grpc import ProvisioningGrpcTransport
2121
from .grpc_asyncio import ProvisioningGrpcAsyncIOTransport
22+
from .rest import ProvisioningRestTransport
23+
from .rest import ProvisioningRestInterceptor
2224

2325

2426
# Compile a registry of transports.
2527
_transport_registry = OrderedDict() # type: Dict[str, Type[ProvisioningTransport]]
2628
_transport_registry["grpc"] = ProvisioningGrpcTransport
2729
_transport_registry["grpc_asyncio"] = ProvisioningGrpcAsyncIOTransport
30+
_transport_registry["rest"] = ProvisioningRestTransport
2831

2932
__all__ = (
3033
"ProvisioningTransport",
3134
"ProvisioningGrpcTransport",
3235
"ProvisioningGrpcAsyncIOTransport",
36+
"ProvisioningRestTransport",
37+
"ProvisioningRestInterceptor",
3338
)

0 commit comments

Comments
 (0)