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

docs: add deprecation comments for message fields and enums #1738

Closed
wants to merge 4 commits into from

Conversation

parthea
Copy link
Contributor

@parthea parthea commented Aug 11, 2023

Fixes #1733 🦕

This PR is on hold until the client library AIPs are updated: https://google.aip.dev/client-libraries/4210 . Also see aip-dev/google.aip.dev#1198

@parthea parthea requested a review from a team as a code owner August 11, 2023 17:49
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Aug 11, 2023
@parthea parthea force-pushed the add-deprecation-note-for-enums-and-messages branch 2 times, most recently from 6dfb799 to b618b4b Compare August 11, 2023 17:51
@parthea parthea force-pushed the add-deprecation-note-for-enums-and-messages branch from b618b4b to 12402ca Compare August 11, 2023 18:01
@parthea parthea force-pushed the add-deprecation-note-for-enums-and-messages branch from 12402ca to 6328a95 Compare August 11, 2023 18:02
@parthea parthea changed the title docs: add deprecation comments for enums and message docs: add deprecation comments for messages and enums Aug 11, 2023
@parthea parthea changed the title docs: add deprecation comments for messages and enums docs: add deprecation comments for message fields and enums Aug 11, 2023
@parthea
Copy link
Contributor Author

parthea commented Aug 11, 2023

I tested the changes locally by regenerating the python client for google-cloud-contentwarehouse with these fixes. I've confirmed that the docs build passes. See the diff below:

(py39) partheniou@partheniou-vm-3:~/git/google-cloud-python$ git diff
diff --git a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/common.py b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/common.py
index 9aa4f3ee0a..0ddb949c62 100644
--- a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/common.py
+++ b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/common.py
@@ -80,6 +80,7 @@ class DatabaseType(proto.Enum):
         DB_INFRA_SPANNER (1):
             Internal Spanner
         DB_CLOUD_SQL_POSTGRES (2):
+            Deprecated.
             Cloud Sql with a Postgres Sql instance
     """
     DB_UNKNOWN = 0
diff --git a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/document.py b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/document.py
index 7f4f054f8e..31c2914ca1 100644
--- a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/document.py
+++ b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/document.py
@@ -141,6 +141,7 @@ class Document(proto.Message):
 
             This field is a member of `oneof`_ ``structured_content``.
         structured_content_uri (str):
+            Deprecated.
             A path linked to structured content file.
         raw_document_path (str):
             Raw document file in Cloud Storage path.
@@ -166,12 +167,14 @@ class Document(proto.Message):
             the byte representation of a PDF file, then this should be
             set to: RAW_DOCUMENT_FILE_TYPE_PDF.
         async_enabled (bool):
+            Deprecated.
             If true, makes the document visible to
             asynchronous policies and rules.
         content_category (google.cloud.contentwarehouse_v1.types.ContentCategory):
             Indicates the category (image, audio, video
             etc.) of the original content.
         text_extraction_disabled (bool):
+            Deprecated.
             If true, text extraction will not be
             performed.
         text_extraction_enabled (bool):
diff --git a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/document_link_service.py b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/document_link_service.py
index f2cc3e38f9..ca260a8faf 100644
--- a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/document_link_service.py
+++ b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/document_link_service.py
@@ -127,6 +127,7 @@ class ListLinkedSourcesRequest(proto.Message):
             The maximum number of document-links to
             return. The service may return fewer than this
             value.
+
             If unspecified, at most 50 document-links will
             be returned. The maximum value is 1000; values
             above 1000 will be coerced to 1000.
diff --git a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/filters.py b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/filters.py
index 369e3b2f03..39637e3f3f 100644
--- a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/filters.py
+++ b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/filters.py
@@ -94,6 +94,7 @@ class DocumentQuery(proto.Message):
             must be set. In addition, all other input fields related to
             search (pagination, histograms, etc.) will be ignored.
         custom_property_filter (str):
+            Deprecated.
             This filter specifies a structured syntax to match against
             the [PropertyDefinition].[is_filterable][] marked as
             ``true``. The syntax for this expression is a subset of SQL
diff --git a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/histogram.py b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/histogram.py
index 0635422b2c..d30c267381 100644
--- a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/histogram.py
+++ b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/types/histogram.py
@@ -44,6 +44,7 @@ class HistogramQuery(proto.Message):
             Controls if the histogram query requires the
             return of a precise count. Enable this flag may
             adversely impact performance.
+
             Defaults to true.
         filters (google.cloud.contentwarehouse_v1.types.HistogramQueryPropertyNameFilter):
             Optional. Filter the result of histogram

@parthea parthea marked this pull request as draft August 11, 2023 21:09
tests/unit/schema/wrappers/test_field.py Outdated Show resolved Hide resolved
test_utils/test_utils.py Outdated Show resolved Hide resolved
@parthea parthea closed this Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecated option is ignored for messages and enums
2 participants