Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
docs: Update formatting for Purpose class documentation (#271)
Browse files Browse the repository at this point in the history
* docs: Update the table format in SearchProjects docs

PiperOrigin-RevId: 528006710

Source-Link: googleapis/googleapis@f373a9c

Source-Link: googleapis/googleapis-gen@28c2158
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjhjMjE1ODhlZGFmMzVjNzNhZjY4YmJiODZkODk3MTNkZTc0OGM3YiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs: Update formatting for `Purpose` class documentation

docs: Add documentation for additional acceptable formats for `namespaced_tag_key` and `namespaced_tag_value`in `EffectiveTag`, `parent` in `ListTagKeysRequest`, `parent` in `TagKey`, and `namespaced_name` in `TagValue`
PiperOrigin-RevId: 529262150

Source-Link: googleapis/googleapis@e6c8485

Source-Link: googleapis/googleapis-gen@e3b832f
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTNiODMyZmM5MWUwZmI4MzA4YjEzZmQ3MjNmZTgyY2RjODI2ZWI0MyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed May 4, 2023
1 parent ad798c8 commit bb3ec07
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 110 deletions.
54 changes: 28 additions & 26 deletions google/cloud/resourcemanager_v3/services/projects/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,37 +531,39 @@ async def sample_search_projects():
query, then it will return results that match any of the
fields. Some eligible fields are:
::
| Field | Description |
|-------------------------|----------------------------------------------|
| displayName, name | Filters by displayName. |
| parent | Project's parent (for example: folders/123,
organizations/*). Prefer parent field over parent.type and parent.id.| |
parent.type | Parent's type: `folder` or `organization`. | |
parent.id | Parent's id number (for example: 123) | |
id, projectId | Filters by projectId. | |
state, lifecycleState | Filters by state. | |
labels | Filters by label name or value. | |
labels.\<key\> (where *key* is the name of a label) | Filters by label
name.|
- **``displayName``, ``name``**: Filters by
displayName.
- **``parent``**: Project's parent (for example:
``folders/123``, ``organizations/*``). Prefer
``parent`` field over ``parent.type`` and
``parent.id``.
- **``parent.type``**: Parent's type: ``folder`` or
``organization``.
- **``parent.id``**: Parent's id number (for example:
``123``).
- **``id``, ``projectId``**: Filters by projectId.
- **``state``, ``lifecycleState``**: Filters by state.
- **``labels``**: Filters by label name or value.
- **``labels.<key>`` (where ``<key>`` is the name of a
label)**: Filters by label name.
Search expressions are case insensitive.
Some examples queries:
::
| Query | Description |
|------------------|-----------------------------------------------------|
| name:how* | The project's name starts with "how". |
| name:Howl | The project's name is `Howl` or `howl`. |
| name:HOWL | Equivalent to above. |
| NAME:howl | Equivalent to above. |
| labels.color:* | The project has the label `color`. |
| labels.color:red | The project's label `color` has the value `red`. |
| labels.color:red labels.size:big | The project's label `color` has the
value `red` or its label `size` has the value `big`. |
- **``name:how*``**: The project's name starts with
"how".
- **``name:Howl``**: The project's name is ``Howl`` or
``howl``.
- **``name:HOWL``**: Equivalent to above.
- **``NAME:howl``**: Equivalent to above.
- **``labels.color:*``**: The project has the label
``color``.
- **``labels.color:red``**: The project's label
``color`` has the value ``red``.
- **``labels.color:red labels.size:big``**: The
project's label ``color`` has the value ``red`` or
its label ``size`` has the value ``big``.
If no query is specified, the call will return projects
for which the user has the
Expand Down
54 changes: 28 additions & 26 deletions google/cloud/resourcemanager_v3/services/projects/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,37 +741,39 @@ def sample_search_projects():
query, then it will return results that match any of the
fields. Some eligible fields are:
::
| Field | Description |
|-------------------------|----------------------------------------------|
| displayName, name | Filters by displayName. |
| parent | Project's parent (for example: folders/123,
organizations/*). Prefer parent field over parent.type and parent.id.| |
parent.type | Parent's type: `folder` or `organization`. | |
parent.id | Parent's id number (for example: 123) | |
id, projectId | Filters by projectId. | |
state, lifecycleState | Filters by state. | |
labels | Filters by label name or value. | |
labels.\<key\> (where *key* is the name of a label) | Filters by label
name.|
- **``displayName``, ``name``**: Filters by
displayName.
- **``parent``**: Project's parent (for example:
``folders/123``, ``organizations/*``). Prefer
``parent`` field over ``parent.type`` and
``parent.id``.
- **``parent.type``**: Parent's type: ``folder`` or
``organization``.
- **``parent.id``**: Parent's id number (for example:
``123``).
- **``id``, ``projectId``**: Filters by projectId.
- **``state``, ``lifecycleState``**: Filters by state.
- **``labels``**: Filters by label name or value.
- **``labels.<key>`` (where ``<key>`` is the name of a
label)**: Filters by label name.
Search expressions are case insensitive.
Some examples queries:
::
| Query | Description |
|------------------|-----------------------------------------------------|
| name:how* | The project's name starts with "how". |
| name:Howl | The project's name is `Howl` or `howl`. |
| name:HOWL | Equivalent to above. |
| NAME:howl | Equivalent to above. |
| labels.color:* | The project has the label `color`. |
| labels.color:red | The project's label `color` has the value `red`. |
| labels.color:red labels.size:big | The project's label `color` has the
value `red` or its label `size` has the value `big`. |
- **``name:how*``**: The project's name starts with
"how".
- **``name:Howl``**: The project's name is ``Howl`` or
``howl``.
- **``name:HOWL``**: Equivalent to above.
- **``NAME:howl``**: Equivalent to above.
- **``labels.color:*``**: The project has the label
``color``.
- **``labels.color:red``**: The project's label
``color`` has the value ``red``.
- **``labels.color:red labels.size:big``**: The
project's label ``color`` has the value ``red`` or
its label ``size`` has the value ``big``.
If no query is specified, the call will return projects
for which the user has the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,10 @@ async def sample_list_tag_keys():
The request object. The request message for listing all
TagKeys under a parent resource.
parent (:class:`str`):
Required. The resource name of the new TagKey's parent.
Must be of the form ``folders/{folder_id}`` or
``organizations/{org_id}``.
Required. The resource name of the TagKey's parent. Must
be of the form ``organizations/{org_id}`` or
``projects/{project_id}`` or
``projects/{project_number}``
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
7 changes: 4 additions & 3 deletions google/cloud/resourcemanager_v3/services/tag_keys/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,10 @@ def sample_list_tag_keys():
The request object. The request message for listing all
TagKeys under a parent resource.
parent (str):
Required. The resource name of the new TagKey's parent.
Must be of the form ``folders/{folder_id}`` or
``organizations/{org_id}``.
Required. The resource name of the TagKey's parent. Must
be of the form ``organizations/{org_id}`` or
``projects/{project_id}`` or
``projects/{project_number}``
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
51 changes: 25 additions & 26 deletions google/cloud/resourcemanager_v3/types/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,37 +303,36 @@ class SearchProjectsRequest(proto.Message):
return results that match any of the fields. Some eligible
fields are:
::
| Field | Description |
|-------------------------|----------------------------------------------|
| displayName, name | Filters by displayName. |
| parent | Project's parent (for example: folders/123,
organizations/*). Prefer parent field over parent.type and parent.id.| |
parent.type | Parent's type: `folder` or `organization`. | |
parent.id | Parent's id number (for example: 123) | |
id, projectId | Filters by projectId. | |
state, lifecycleState | Filters by state. | |
labels | Filters by label name or value. | |
labels.\<key\> (where *key* is the name of a label) | Filters by label
name.|
- **``displayName``, ``name``**: Filters by displayName.
- **``parent``**: Project's parent (for example:
``folders/123``, ``organizations/*``). Prefer ``parent``
field over ``parent.type`` and ``parent.id``.
- **``parent.type``**: Parent's type: ``folder`` or
``organization``.
- **``parent.id``**: Parent's id number (for example:
``123``).
- **``id``, ``projectId``**: Filters by projectId.
- **``state``, ``lifecycleState``**: Filters by state.
- **``labels``**: Filters by label name or value.
- **``labels.<key>`` (where ``<key>`` is the name of a
label)**: Filters by label name.
Search expressions are case insensitive.
Some examples queries:
::
| Query | Description |
|------------------|-----------------------------------------------------|
| name:how* | The project's name starts with "how". |
| name:Howl | The project's name is `Howl` or `howl`. |
| name:HOWL | Equivalent to above. |
| NAME:howl | Equivalent to above. |
| labels.color:* | The project has the label `color`. |
| labels.color:red | The project's label `color` has the value `red`. |
| labels.color:red labels.size:big | The project's label `color` has the
value `red` or its label `size` has the value `big`. |
- **``name:how*``**: The project's name starts with "how".
- **``name:Howl``**: The project's name is ``Howl`` or
``howl``.
- **``name:HOWL``**: Equivalent to above.
- **``NAME:howl``**: Equivalent to above.
- **``labels.color:*``**: The project has the label
``color``.
- **``labels.color:red``**: The project's label ``color``
has the value ``red``.
- **``labels.color:red labels.size:big``**: The project's
label ``color`` has the value ``red`` or its label
``size`` has the value ``big``.
If no query is specified, the call will return projects for
which the user has the ``resourcemanager.projects.get``
Expand Down
21 changes: 12 additions & 9 deletions google/cloud/resourcemanager_v3/types/tag_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,21 +287,24 @@ class EffectiveTag(proto.Message):
tag_value (str):
Resource name for TagValue in the format ``tagValues/456``.
namespaced_tag_value (str):
Namespaced name of the TagValue. Now only supported in the
format
``{organization_id}/{tag_key_short_name}/{tag_value_short_name}``.
Other formats will be supported when we add non-org parented
tags.
The namespaced name of the TagValue. Can be in the form
``{organization_id}/{tag_key_short_name}/{tag_value_short_name}``
or
``{project_id}/{tag_key_short_name}/{tag_value_short_name}``
or
``{project_number}/{tag_key_short_name}/{tag_value_short_name}``.
tag_key (str):
The name of the TagKey, in the format ``tagKeys/{id}``, such
as ``tagKeys/123``.
namespaced_tag_key (str):
The namespaced_name of the TagKey. Now only supported in the
format of ``{organization_id}/{tag_key_short_name}``. Other
formats will be supported when we add non-org parented tags.
The namespaced name of the TagKey. Can be in the form
``{organization_id}/{tag_key_short_name}`` or
``{project_id}/{tag_key_short_name}`` or
``{project_number}/{tag_key_short_name}``.
tag_key_parent_name (str):
The parent name of the tag key. Must be in the format
``organizations/{organization_id}``.
``organizations/{organization_id}`` or
``projects/{project_number}``
inherited (bool):
Indicates the inheritance status of a tag
value attached to the given resource. If the tag
Expand Down
34 changes: 23 additions & 11 deletions google/cloud/resourcemanager_v3/types/tag_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,23 @@ class Purpose(proto.Enum):
Unspecified purpose.
GCE_FIREWALL (1):
Purpose for Compute Engine firewalls. A corresponding
purpose_data should be set for the network the tag is
intended for. The key should be 'network' and the value
``purpose_data`` should be set for the network the tag is
intended for. The key should be ``network`` and the value
should be in either of these two formats:
-https://www.googleapis.com/compute/{compute_version}/projects/{project_id}/global/networks/{network_id}
-{project_id}/{network_name}
-
``https://www.googleapis.com/compute/{compute_version}/projects/{project_id}/global/networks/{network_id}``
- ``{project_id}/{network_name}``
Examples:
-https://www.googleapis.com/compute/staging_v1/projects/fail-closed-load-testing/global/networks/6992953698831725600
-fail-closed-load-testing/load-testing-network
-
``https://www.googleapis.com/compute/staging_v1/projects/fail-closed-load-testing/global/networks/6992953698831725600``
- ``fail-closed-load-testing/load-testing-network``
"""
PURPOSE_UNSPECIFIED = 0
GCE_FIREWALL = 1
Expand All @@ -73,8 +81,12 @@ class TagKey(proto.Message):
format ``tagKeys/{tag_key_id}``, where ``tag_key_id`` is the
generated numeric id for the TagKey.
parent (str):
Immutable. The resource name of the new TagKey's parent.
Must be of the form ``organizations/{org_id}``.
Immutable. The resource name of the TagKey's parent. A
TagKey can be parented by an Organization or a Project. For
a TagKey parented by an Organization, its parent must be in
the form ``organizations/{org_id}``. For a TagKey parented
by a Project, its parent can be in the form
``projects/{project_id}`` or ``projects/{project_number}``.
short_name (str):
Required. Immutable. The user friendly name for a TagKey.
The short name should be unique for TagKeys within the same
Expand Down Expand Up @@ -170,9 +182,9 @@ class ListTagKeysRequest(proto.Message):
Attributes:
parent (str):
Required. The resource name of the new TagKey's parent. Must
be of the form ``folders/{folder_id}`` or
``organizations/{org_id}``.
Required. The resource name of the TagKey's parent. Must be
of the form ``organizations/{org_id}`` or
``projects/{project_id}`` or ``projects/{project_number}``
page_size (int):
Optional. The maximum number of TagKeys to
return in the response. The server allows a
Expand Down
12 changes: 7 additions & 5 deletions google/cloud/resourcemanager_v3/types/tag_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ class TagValue(proto.Message):
dashes (-), underscores (_), dots (.), and alphanumerics
between.
namespaced_name (str):
Output only. Namespaced name of the TagValue. Now only
supported in the format
``{organization_id}/{tag_key_short_name}/{short_name}``.
Other formats will be supported when we add non-org parented
tags.
Output only. The namespaced name of the TagValue. Can be in
the form
``{organization_id}/{tag_key_short_name}/{tag_value_short_name}``
or
``{project_id}/{tag_key_short_name}/{tag_value_short_name}``
or
``{project_number}/{tag_key_short_name}/{tag_value_short_name}``.
description (str):
Optional. User-assigned description of the
TagValue. Must not exceed 256 characters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-resource-manager",
"version": "1.10.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit bb3ec07

Please sign in to comment.