diff --git a/google/cloud/recommender_v1/services/recommender/async_client.py b/google/cloud/recommender_v1/services/recommender/async_client.py index af38d91..e6eb6f1 100644 --- a/google/cloud/recommender_v1/services/recommender/async_client.py +++ b/google/cloud/recommender_v1/services/recommender/async_client.py @@ -691,8 +691,8 @@ async def mark_recommendation_claimed( state_metadata (:class:`Sequence[google.cloud.recommender_v1.types.MarkRecommendationClaimedRequest.StateMetadataEntry]`): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the - regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match - the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. + regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must + match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. This corresponds to the ``state_metadata`` field on the ``request`` instance; if ``request`` is provided, this @@ -800,8 +800,8 @@ async def mark_recommendation_succeeded( state_metadata (:class:`Sequence[google.cloud.recommender_v1.types.MarkRecommendationSucceededRequest.StateMetadataEntry]`): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the - regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match - the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. + regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must + match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. This corresponds to the ``state_metadata`` field on the ``request`` instance; if ``request`` is provided, this @@ -909,8 +909,8 @@ async def mark_recommendation_failed( state_metadata (:class:`Sequence[google.cloud.recommender_v1.types.MarkRecommendationFailedRequest.StateMetadataEntry]`): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the - regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match - the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. + regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must + match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. This corresponds to the ``state_metadata`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/google/cloud/recommender_v1/services/recommender/client.py b/google/cloud/recommender_v1/services/recommender/client.py index d9bec77..cd7f30f 100644 --- a/google/cloud/recommender_v1/services/recommender/client.py +++ b/google/cloud/recommender_v1/services/recommender/client.py @@ -888,8 +888,8 @@ def mark_recommendation_claimed( state_metadata (Sequence[google.cloud.recommender_v1.types.MarkRecommendationClaimedRequest.StateMetadataEntry]): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the - regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match - the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. + regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must + match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. This corresponds to the ``state_metadata`` field on the ``request`` instance; if ``request`` is provided, this @@ -1000,8 +1000,8 @@ def mark_recommendation_succeeded( state_metadata (Sequence[google.cloud.recommender_v1.types.MarkRecommendationSucceededRequest.StateMetadataEntry]): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the - regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match - the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. + regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must + match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. This corresponds to the ``state_metadata`` field on the ``request`` instance; if ``request`` is provided, this @@ -1112,8 +1112,8 @@ def mark_recommendation_failed( state_metadata (Sequence[google.cloud.recommender_v1.types.MarkRecommendationFailedRequest.StateMetadataEntry]): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the - regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match - the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. + regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must + match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. This corresponds to the ``state_metadata`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/google/cloud/recommender_v1/types/recommendation.py b/google/cloud/recommender_v1/types/recommendation.py index 23142f4..4879b4c 100644 --- a/google/cloud/recommender_v1/types/recommendation.py +++ b/google/cloud/recommender_v1/types/recommendation.py @@ -212,15 +212,35 @@ class Operation(proto.Message): intended to be an exact match per filter. To perform advanced matching, use path_value_matchers. - - Example: ``{ "/versions/*/name" : "it-123" - "/versions/*/targetSize/percent": 20 }`` - - Example: ``{ "/bindings/*/role": "roles/owner" - "/bindings/*/condition" : null }`` - - Example: ``{ "/bindings/*/role": "roles/owner" - "/bindings/*/members/*" : ["x@example.com", - "y@example.com"] }`` When both path_filters and - path_value_matchers are set, an implicit AND must be - performed. + - Example: + + :: + + { + "/versions/*/name" : "it-123" + "/versions/*/targetSize/percent": 20 + } + + - Example: + + :: + + { + "/bindings/*/role": "roles/owner" + "/bindings/*/condition" : null + } + + - Example: + + :: + + { + "/bindings/*/role": "roles/owner" + "/bindings/*/members/*" : ["x@example.com", "y@example.com"] + } + + When both path_filters and path_value_matchers are set, an + implicit AND must be performed. path_value_matchers (Sequence[google.cloud.recommender_v1.types.Operation.PathValueMatchersEntry]): Similar to path_filters, this contains set of filters to apply if ``path`` field referes to array elements. This is diff --git a/google/cloud/recommender_v1/types/recommender_service.py b/google/cloud/recommender_v1/types/recommender_service.py index 9b65552..1f432c6 100644 --- a/google/cloud/recommender_v1/types/recommender_service.py +++ b/google/cloud/recommender_v1/types/recommender_service.py @@ -206,8 +206,8 @@ class MarkRecommendationClaimedRequest(proto.Message): state_metadata (Sequence[google.cloud.recommender_v1.types.MarkRecommendationClaimedRequest.StateMetadataEntry]): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the regex - ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex - ``/^[a-zA-Z0-9_./-]{0,255}$/``. + ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the + regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. etag (str): Required. Fingerprint of the Recommendation. Provides optimistic locking. @@ -227,8 +227,8 @@ class MarkRecommendationSucceededRequest(proto.Message): state_metadata (Sequence[google.cloud.recommender_v1.types.MarkRecommendationSucceededRequest.StateMetadataEntry]): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the regex - ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex - ``/^[a-zA-Z0-9_./-]{0,255}$/``. + ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the + regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. etag (str): Required. Fingerprint of the Recommendation. Provides optimistic locking. @@ -248,8 +248,8 @@ class MarkRecommendationFailedRequest(proto.Message): state_metadata (Sequence[google.cloud.recommender_v1.types.MarkRecommendationFailedRequest.StateMetadataEntry]): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the regex - ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex - ``/^[a-zA-Z0-9_./-]{0,255}$/``. + ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the + regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. etag (str): Required. Fingerprint of the Recommendation. Provides optimistic locking. diff --git a/google/cloud/recommender_v1beta1/services/recommender/async_client.py b/google/cloud/recommender_v1beta1/services/recommender/async_client.py index e36fc7c..7e201a4 100644 --- a/google/cloud/recommender_v1beta1/services/recommender/async_client.py +++ b/google/cloud/recommender_v1beta1/services/recommender/async_client.py @@ -691,8 +691,8 @@ async def mark_recommendation_claimed( state_metadata (:class:`Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationClaimedRequest.StateMetadataEntry]`): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the - regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match - the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. + regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must + match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. This corresponds to the ``state_metadata`` field on the ``request`` instance; if ``request`` is provided, this @@ -800,8 +800,8 @@ async def mark_recommendation_succeeded( state_metadata (:class:`Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationSucceededRequest.StateMetadataEntry]`): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the - regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match - the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. + regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must + match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. This corresponds to the ``state_metadata`` field on the ``request`` instance; if ``request`` is provided, this @@ -909,8 +909,8 @@ async def mark_recommendation_failed( state_metadata (:class:`Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationFailedRequest.StateMetadataEntry]`): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the - regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match - the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. + regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must + match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. This corresponds to the ``state_metadata`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/google/cloud/recommender_v1beta1/services/recommender/client.py b/google/cloud/recommender_v1beta1/services/recommender/client.py index 2681347..a65de84 100644 --- a/google/cloud/recommender_v1beta1/services/recommender/client.py +++ b/google/cloud/recommender_v1beta1/services/recommender/client.py @@ -888,8 +888,8 @@ def mark_recommendation_claimed( state_metadata (Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationClaimedRequest.StateMetadataEntry]): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the - regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match - the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. + regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must + match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. This corresponds to the ``state_metadata`` field on the ``request`` instance; if ``request`` is provided, this @@ -1000,8 +1000,8 @@ def mark_recommendation_succeeded( state_metadata (Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationSucceededRequest.StateMetadataEntry]): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the - regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match - the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. + regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must + match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. This corresponds to the ``state_metadata`` field on the ``request`` instance; if ``request`` is provided, this @@ -1112,8 +1112,8 @@ def mark_recommendation_failed( state_metadata (Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationFailedRequest.StateMetadataEntry]): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the - regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match - the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. + regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must + match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. This corresponds to the ``state_metadata`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/google/cloud/recommender_v1beta1/types/recommendation.py b/google/cloud/recommender_v1beta1/types/recommendation.py index e8b3c19..863cd43 100644 --- a/google/cloud/recommender_v1beta1/types/recommendation.py +++ b/google/cloud/recommender_v1beta1/types/recommendation.py @@ -212,15 +212,35 @@ class Operation(proto.Message): intended to be an exact match per filter. To perform advanced matching, use path_value_matchers. - - Example: ``{ "/versions/*/name" : "it-123" - "/versions/*/targetSize/percent": 20 }`` - - Example: ``{ "/bindings/*/role": "roles/owner" - "/bindings/*/condition" : null }`` - - Example: ``{ "/bindings/*/role": "roles/owner" - "/bindings/*/members/*" : ["x@example.com", - "y@example.com"] }`` When both path_filters and - path_value_matchers are set, an implicit AND must be - performed. + - Example: + + :: + + { + "/versions/*/name" : "it-123" + "/versions/*/targetSize/percent": 20 + } + + - Example: + + :: + + { + "/bindings/*/role": "roles/owner" + "/bindings/*/condition" : null + } + + - Example: + + :: + + { + "/bindings/*/role": "roles/owner" + "/bindings/*/members/*" : ["x@example.com", "y@example.com"] + } + + When both path_filters and path_value_matchers are set, an + implicit AND must be performed. path_value_matchers (Sequence[google.cloud.recommender_v1beta1.types.Operation.PathValueMatchersEntry]): Similar to path_filters, this contains set of filters to apply if ``path`` field referes to array elements. This is diff --git a/google/cloud/recommender_v1beta1/types/recommender_service.py b/google/cloud/recommender_v1beta1/types/recommender_service.py index c6aeffc..0e0886a 100644 --- a/google/cloud/recommender_v1beta1/types/recommender_service.py +++ b/google/cloud/recommender_v1beta1/types/recommender_service.py @@ -206,8 +206,8 @@ class MarkRecommendationClaimedRequest(proto.Message): state_metadata (Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationClaimedRequest.StateMetadataEntry]): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the regex - ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex - ``/^[a-zA-Z0-9_./-]{0,255}$/``. + ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the + regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. etag (str): Required. Fingerprint of the Recommendation. Provides optimistic locking. @@ -227,8 +227,8 @@ class MarkRecommendationSucceededRequest(proto.Message): state_metadata (Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationSucceededRequest.StateMetadataEntry]): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the regex - ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex - ``/^[a-zA-Z0-9_./-]{0,255}$/``. + ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the + regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. etag (str): Required. Fingerprint of the Recommendation. Provides optimistic locking. @@ -248,8 +248,8 @@ class MarkRecommendationFailedRequest(proto.Message): state_metadata (Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationFailedRequest.StateMetadataEntry]): State properties to include with this state. Overwrites any existing ``state_metadata``. Keys must match the regex - ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex - ``/^[a-zA-Z0-9_./-]{0,255}$/``. + ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the + regex ``/^[a-zA-Z0-9_./-]{0,255}$/``. etag (str): Required. Fingerprint of the Recommendation. Provides optimistic locking. diff --git a/owlbot.py b/owlbot.py index 9766c15..2e547bf 100644 --- a/owlbot.py +++ b/owlbot.py @@ -24,23 +24,6 @@ default_version = "v1" for library in s.get_staging_dirs(default_version): - # Fix docstring with regex pattern that breaks docgen - s.replace(library / "google/**/*client.py", "(/\^.*\$/)", "``\g<1>``") - - # Fix more regex in docstrings - s.replace(library / "google/**/types/*.py", - "(regex\s+)(/.*?/)\.", - "\g<1>``\g<2>``.", - flags=re.MULTILINE | re.DOTALL, - ) - - # Fix docstring with JSON example by wrapping with backticks - s.replace(library / "google/**/types/recommendation.py", - "( - Example: )(\{.*?\})", - "\g<1>``\g<2>``", - flags=re.MULTILINE | re.DOTALL, - ) - s.move(library, excludes=["docs/index.rst", "README.rst", "setup.py"]) s.remove_staging_dirs()