GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — oneof proto not generating as oneof · Issue #484 · googleapis/gapic-generator-python

This repository was archived by the owner on Aug 25, 2026. It is now read-only.
This repository was archived by the owner on Aug 25, 2026. It is now read-only.

oneof proto not generating as oneof #484

Copy link
Copy link
Closed
#1133
#485
Closed
oneof proto not generating as oneof#484
#1133
#485
Copy link
Assignees
crwilcox
Labels
conversion blockingA surface delta, bug, missing feature, or other issue that prevents API conversionpriority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.

Description

@crwilcox
crwilcox
opened on Jun 25, 2020
Issue body actions
--- a/google/cloud/firestore_v1/types/document.py
+++ b/google/cloud/firestore_v1/types/document.py
@@ -128,19 +128,19 @@ class Value(proto.Message):
             A map value.
     """

-    null_value = proto.Field(proto.ENUM, number=11, enum=struct.NullValue,)
-    boolean_value = proto.Field(proto.BOOL, number=1)
-    integer_value = proto.Field(proto.INT64, number=2)
-    double_value = proto.Field(proto.DOUBLE, number=3)
+    null_value = proto.Field(proto.ENUM, number=11, enum=struct.NullValue, oneof="value_type")
+    boolean_value = proto.Field(proto.BOOL, number=1, oneof="value_type")
+    integer_value = proto.Field(proto.INT64, number=2, oneof="value_type")
+    double_value = proto.Field(proto.DOUBLE, number=3, oneof="value_type")
     timestamp_value = proto.Field(
-        proto.MESSAGE, number=10, message=timestamp.Timestamp,
+        proto.MESSAGE, number=10, message=timestamp.Timestamp, oneof="value_type"
     )
-    string_value = proto.Field(proto.STRING, number=17)
-    bytes_value = proto.Field(proto.BYTES, number=18)
-    reference_value = proto.Field(proto.STRING, number=5)
-    geo_point_value = proto.Field(proto.MESSAGE, number=8, message=latlng.LatLng,)
-    array_value = proto.Field(proto.MESSAGE, number=9, message="ArrayValue",)
-    map_value = proto.Field(proto.MESSAGE, number=6, message="MapValue",)
+    string_value = proto.Field(proto.STRING, number=17, oneof="value_type")
+    bytes_value = proto.Field(proto.BYTES, number=18, oneof="value_type")
+    reference_value = proto.Field(proto.STRING, number=5, oneof="value_type")
+    geo_point_value = proto.Field(proto.MESSAGE, number=8, message=latlng.LatLng, oneof="value_type")
+    array_value = proto.Field(proto.MESSAGE, number=9, message="ArrayValue", oneof="value_type")
+    map_value = proto.Field(proto.MESSAGE, number=6, message="MapValue", oneof="value_type")

Fix should be {% if field.oneof %}, oneof='{{ field.oneof }}'{% endif %} in https://github.com/googleapis/gapic-generator-python/blob/master/gapic/templates/%25namespace/%25name_%25version/%25sub/types/_message.py.j2

Activity

  1. crwilcox
    self-assigned this
    on Jun 25, 2020
  2. yoshi-automation
    added
    triage meI really want to be triaged.
    on Jun 26, 2020
  3. crwilcox
    added
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    on Jun 26, 2020
  4. yoshi-automation
    removed
    triage meI really want to be triaged.
    on Jun 26, 2020
  5. crwilcox
    removed their assignment
    on Jun 26, 2020
  6. crwilcox
    added
    conversion blockingA surface delta, bug, missing feature, or other issue that prevents API conversion
    on Jun 28, 2020
  7. crwilcox
    self-assigned this
    on Jun 30, 2020
  8. software-dov
    closed this as completedin #485on Jul 7, 2020
  9. software-dov
    added a commit that references this issue on Jul 7, 2020

    fix: add oneof fields to generated protoplus init (#485)

    This issue will close once commit be5a847 is merged into the 'main' branch.
    be5a847
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @crwilcox
    crwilcox

Labels

conversion blockingA surface delta, bug, missing feature, or other issue that prevents API conversionpriority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.