Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support google.cloud.location.Locations and maybe other mixins #11694

Closed
coryan opened this issue May 22, 2023 · 4 comments · Fixed by #14675, #14691, #14707, #14723 or #14727
Closed

Support google.cloud.location.Locations and maybe other mixins #11694

coryan opened this issue May 22, 2023 · 4 comments · Fixed by #14675, #14691, #14707, #14723 or #14727
Assignees
Labels
cpp: generator Issues related to the C++ micro-generator type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@coryan
Copy link
Contributor

coryan commented May 22, 2023

A number of services include the Locations mixin:

https://github.com/googleapis/googleapis/blob/117be9dfdf65ff766a794c8b85d5d7480a1fd83d/google/cloud/location/locations.proto#L29-L32

These mixins do not appear in the .proto file, they only seem to appear in the YAML file:

https://github.com/googleapis/googleapis/blob/117be9dfdf65ff766a794c8b85d5d7480a1fd83d/google/cloud/clouddms/v1/datamigration_v1.yaml#L6-L10

But they are part of the service and included in the API configuration:

https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations

https://cloud.google.com/kms/docs/reference/rpc/google.cloud.location

I think the generator needs to support these. It is unclear if these methods should be part of the *Client , or there should be a common google::cloud::LocationClient with suitable endpoint defaults. Or some other solution. The first step is to write some kind of design doc.

@coryan coryan added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. cpp: generator Issues related to the C++ micro-generator labels May 22, 2023
@coryan
Copy link
Contributor Author

coryan commented Oct 4, 2023

We should do this, but needs some design.

@scotthart
Copy link
Member

Still want to do this as part of other improvements to generated libraries.

@cuiy0006
Copy link
Collaborator

cuiy0006 commented Sep 4, 2024

Design:

  • Design doc of C++ microgenerator service mixin
  • Draft the microgenerator code changes

Submit:

  • Add mixin utils to support extract mixin info from config files
  • Change http option utils to handle urls from mixin methods
  • Change standalone_main to add mixin headers to client libraries
  • Modify is_longrunning_operation to support operations mixin
  • Change descriptor_utils to support mixin in both method and service vars
  • Make *_generator.cc support mixin methods
  • Load mixin methods in make_generators.cc
  • Add manual code changes for Pubsub
  • Generate the mixin code in libraries by batch

@cuiy0006
Copy link
Collaborator

cuiy0006 commented Oct 4, 2024

The mixin is done. There is a followup issue #14762 to add tests for mixin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment