GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — Access Display Names of enum fields via enum object by beccasaurus · Pull Request #1738 · GoogleCloudPlatform/python-docs-samples Conversation
Contributor
To get the display name of enum fields of protobuf objects, we had been copy/pasting the enum field names from the .proto into our code and using the int index of the enum field to get the display name Updated various samples to get enum field display names the newer, improved way: from google.cloud.mylibrary import enums enum_object = enums.EnumName(response.enum_field) print('The display name of enum_field is: {}'.format(enum_object.name)) Related: googleapis/google-cloud-python#6169 Language library needed to be updated to make use of this feature. Worked out-of-the-box for Video Intelligence and Text-to-Speech
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsRequires updating google-cloud-language to 1.1.0
alixhami
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm going to send a PR to update these tests to explicitly use the demomaker bucket to save future contributor friction, so this comment will no longer be necessary. Please remove so we can avoid merge conflicts.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsThis reverts commit 39d9bff. …ogleCloudPlatform/python-docs-samples into use-IntEnum-to-get-enum-display-names
alixhami
approved these changes
…ogleCloudPlatform/python-docs-samples into use-IntEnum-to-get-enum-display-names
busunkim96
pushed a commit
to googleapis/python-texttospeech
that referenced
this pull request
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96
pushed a commit
to googleapis/python-texttospeech
that referenced
this pull request
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96
pushed a commit
to googleapis/python-texttospeech
that referenced
this pull request
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96
pushed a commit
to googleapis/python-texttospeech
that referenced
this pull request
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96
pushed a commit
to busunkim96/python-language
that referenced
this pull request
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96
pushed a commit
to busunkim96/python-videointelligence
that referenced
this pull request
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96
pushed a commit
to googleapis/python-texttospeech
that referenced
this pull request
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96
pushed a commit
to googleapis/python-texttospeech
that referenced
this pull request
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
hkdevandla
pushed a commit
to hkdevandla/python-language
that referenced
this pull request
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96
pushed a commit
to googleapis/python-language
that referenced
this pull request
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
danoscarmike
pushed a commit
to googleapis/python-videointelligence
that referenced
this pull request
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
8 tasks
msampathkumar
pushed a commit
that referenced
this pull request
* Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bff.
m-strzelczyk
pushed a commit
that referenced
this pull request
* Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bff.
8 tasks
parthea
pushed a commit
to googleapis/google-cloud-python
that referenced
this pull request
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
dizcology
pushed a commit
that referenced
this pull request
* Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bff.
9 tasks
leahecole
pushed a commit
that referenced
this pull request
* Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bff.
parthea
pushed a commit
to googleapis/google-cloud-python
that referenced
this pull request
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
parthea
pushed a commit
to googleapis/google-cloud-python
that referenced
this pull request
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
parthea
pushed a commit
to googleapis/google-cloud-python
that referenced
this pull request
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
cla: yes
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | ||||||||||||
| 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. |