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

fix: fix docstring for first attribute of protos #1004

Merged
merged 2 commits into from
Oct 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class {{ message.name }}({{ p }}.Message):
r"""{{ message.meta.doc|rst(indent=4) }}{% if message.fields|length %}
r"""{{ message.meta.doc|rst(indent=4) }}
{% if message.fields|length %}

Attributes:
{% for field in message.fields.values() %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class {{ message.name }}({{ p }}.Message):
r"""{{ message.meta.doc|rst(indent=4) }}{% if message.fields|length %}
r"""{{ message.meta.doc|rst(indent=4) }}
{% if message.fields|length %}

Attributes:
{% for field in message.fields.values() %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class ContentType(proto.Enum):

class ExportAssetsRequest(proto.Message):
r"""Export asset request.

Attributes:
parent (str):
Required. The relative name of the root
Expand Down Expand Up @@ -187,6 +188,7 @@ class ExportAssetsResponse(proto.Message):

class ListAssetsRequest(proto.Message):
r"""ListAssets request.

Attributes:
parent (str):
Required. Name of the organization or project the assets
Expand Down Expand Up @@ -271,6 +273,7 @@ class ListAssetsRequest(proto.Message):

class ListAssetsResponse(proto.Message):
r"""ListAssets response.

Attributes:
read_time (google.protobuf.timestamp_pb2.Timestamp):
Time the snapshot was taken.
Expand Down Expand Up @@ -305,6 +308,7 @@ def raw_page(self):

class BatchGetAssetsHistoryRequest(proto.Message):
r"""Batch get assets history request.

Attributes:
parent (str):
Required. The relative name of the root
Expand Down Expand Up @@ -356,6 +360,7 @@ class BatchGetAssetsHistoryRequest(proto.Message):

class BatchGetAssetsHistoryResponse(proto.Message):
r"""Batch get assets history response.

Attributes:
assets (Sequence[google.cloud.asset_v1.types.TemporalAsset]):
A list of assets with valid time windows.
Expand All @@ -370,6 +375,7 @@ class BatchGetAssetsHistoryResponse(proto.Message):

class CreateFeedRequest(proto.Message):
r"""Create asset feed request.

Attributes:
parent (str):
Required. The name of the
Expand Down Expand Up @@ -409,6 +415,7 @@ class CreateFeedRequest(proto.Message):

class GetFeedRequest(proto.Message):
r"""Get asset feed request.

Attributes:
name (str):
Required. The name of the Feed and it must be in the format
Expand All @@ -425,6 +432,7 @@ class GetFeedRequest(proto.Message):

class ListFeedsRequest(proto.Message):
r"""List asset feeds request.

Attributes:
parent (str):
Required. The parent
Expand All @@ -443,6 +451,7 @@ class ListFeedsRequest(proto.Message):

class ListFeedsResponse(proto.Message):
r"""

Attributes:
feeds (Sequence[google.cloud.asset_v1.types.Feed]):
A list of feeds.
Expand All @@ -457,6 +466,7 @@ class ListFeedsResponse(proto.Message):

class UpdateFeedRequest(proto.Message):
r"""Update asset feed request.

Attributes:
feed (google.cloud.asset_v1.types.Feed):
Required. The new values of feed details. It must match an
Expand Down Expand Up @@ -484,6 +494,7 @@ class UpdateFeedRequest(proto.Message):

class DeleteFeedRequest(proto.Message):
r"""

Attributes:
name (str):
Required. The name of the feed and it must be in the format
Expand All @@ -500,6 +511,7 @@ class DeleteFeedRequest(proto.Message):

class OutputConfig(proto.Message):
r"""Output configuration for export assets destination.

Attributes:
gcs_destination (google.cloud.asset_v1.types.GcsDestination):
Destination on Cloud Storage.
Expand All @@ -525,6 +537,7 @@ class OutputConfig(proto.Message):

class OutputResult(proto.Message):
r"""Output result of export assets.

Attributes:
gcs_result (google.cloud.asset_v1.types.GcsOutputResult):
Export result on Cloud Storage.
Expand All @@ -540,6 +553,7 @@ class OutputResult(proto.Message):

class GcsOutputResult(proto.Message):
r"""A Cloud Storage output result.

Attributes:
uris (Sequence[str]):
List of uris of the Cloud Storage objects. Example:
Expand All @@ -554,6 +568,7 @@ class GcsOutputResult(proto.Message):

class GcsDestination(proto.Message):
r"""A Cloud Storage location.

Attributes:
uri (str):
The uri of the Cloud Storage object. It's the same uri that
Expand Down Expand Up @@ -592,6 +607,7 @@ class GcsDestination(proto.Message):

class BigQueryDestination(proto.Message):
r"""A BigQuery destination for exporting assets to.

Attributes:
dataset (str):
Required. The BigQuery dataset in format
Expand Down Expand Up @@ -719,6 +735,7 @@ class PartitionKey(proto.Enum):

class PubsubDestination(proto.Message):
r"""A Pub/Sub destination.

Attributes:
topic (str):
The name of the Pub/Sub topic to publish to. Example:
Expand All @@ -733,6 +750,7 @@ class PubsubDestination(proto.Message):

class FeedOutputConfig(proto.Message):
r"""Output configuration for asset feed destination.

Attributes:
pubsub_destination (google.cloud.asset_v1.types.PubsubDestination):
Destination on Pub/Sub.
Expand Down Expand Up @@ -838,6 +856,7 @@ class Feed(proto.Message):

class SearchAllResourcesRequest(proto.Message):
r"""Search all resources request.

Attributes:
scope (str):
Required. A scope can be a project, a folder, or an
Expand Down Expand Up @@ -983,6 +1002,7 @@ class SearchAllResourcesRequest(proto.Message):

class SearchAllResourcesResponse(proto.Message):
r"""Search all resources response.

Attributes:
results (Sequence[google.cloud.asset_v1.types.ResourceSearchResult]):
A list of Resources that match the search
Expand Down Expand Up @@ -1012,6 +1032,7 @@ def raw_page(self):

class SearchAllIamPoliciesRequest(proto.Message):
r"""Search all IAM policies request.

Attributes:
scope (str):
Required. A scope can be a project, a folder, or an
Expand Down Expand Up @@ -1150,6 +1171,7 @@ class SearchAllIamPoliciesRequest(proto.Message):

class SearchAllIamPoliciesResponse(proto.Message):
r"""Search all IAM policies response.

Attributes:
results (Sequence[google.cloud.asset_v1.types.IamPolicySearchResult]):
A list of IamPolicy that match the search
Expand Down Expand Up @@ -1179,6 +1201,7 @@ def raw_page(self):

class IamPolicyAnalysisQuery(proto.Message):
r"""## IAM policy analysis query message.

Attributes:
scope (str):
Required. The relative name of the root asset. Only
Expand Down Expand Up @@ -1279,6 +1302,7 @@ class AccessSelector(proto.Message):

class Options(proto.Message):
r"""Contains query options.

Attributes:
expand_groups (bool):
Optional. If true, the identities section of the result will
Expand Down Expand Up @@ -1395,6 +1419,7 @@ class Options(proto.Message):

class ConditionContext(proto.Message):
r"""The IAM conditions context.

Attributes:
access_time (google.protobuf.timestamp_pb2.Timestamp):
The hypothetical access timestamp to evaluate IAM
Expand Down Expand Up @@ -1497,6 +1522,7 @@ class AnalyzeIamPolicyResponse(proto.Message):

class IamPolicyAnalysis(proto.Message):
r"""An analysis message to group the query and results.

Attributes:
analysis_query (google.cloud.asset_v1.types.IamPolicyAnalysisQuery):
The analysis query.
Expand Down Expand Up @@ -1563,6 +1589,7 @@ class IamPolicyAnalysisOutputConfig(proto.Message):

class GcsDestination(proto.Message):
r"""A Cloud Storage location.

Attributes:
uri (str):
Required. The uri of the Cloud Storage object. It's the same
Expand All @@ -1585,6 +1612,7 @@ class GcsDestination(proto.Message):

class BigQueryDestination(proto.Message):
r"""A BigQuery destination.

Attributes:
dataset (str):
Required. The BigQuery dataset in format
Expand Down Expand Up @@ -1694,7 +1722,8 @@ class AnalyzeIamPolicyLongrunningRequest(proto.Message):
class AnalyzeIamPolicyLongrunningResponse(proto.Message):
r"""A response message for
[AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
"""

"""


__all__ = tuple(sorted(__protobuf__.manifest))
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class PriorAssetState(proto.Enum):

class TimeWindow(proto.Message):
r"""A time window specified by its ``start_time`` and ``end_time``.

Attributes:
start_time (google.protobuf.timestamp_pb2.Timestamp):
Start time of the time window (exclusive).
Expand Down Expand Up @@ -253,6 +254,7 @@ class Asset(proto.Message):

class Resource(proto.Message):
r"""A representation of a Google Cloud resource.

Attributes:
version (str):
The API version. Example: ``v1``
Expand Down Expand Up @@ -707,6 +709,7 @@ class IamPolicySearchResult(proto.Message):

class Explanation(proto.Message):
r"""Explanation about the IAM policy search result.

Attributes:
matched_permissions (Sequence[google.cloud.asset_v1.types.IamPolicySearchResult.Explanation.MatchedPermissionsEntry]):
The map from roles to their included permissions that match
Expand All @@ -723,6 +726,7 @@ class Explanation(proto.Message):

class Permissions(proto.Message):
r"""IAM permissions

Attributes:
permissions (Sequence[str]):
A list of permissions. A sample permission string:
Expand Down Expand Up @@ -806,6 +810,7 @@ class IamPolicyAnalysisState(proto.Message):

class ConditionEvaluation(proto.Message):
r"""The Condition evaluation.

Attributes:
evaluation_value (google.cloud.asset_v1.types.ConditionEvaluation.EvaluationValue):
The evaluation result.
Expand Down Expand Up @@ -855,6 +860,7 @@ class IamPolicyAnalysisResult(proto.Message):

class Resource(proto.Message):
r"""A Google Cloud resource under analysis.

Attributes:
full_resource_name (str):
The `full resource
Expand All @@ -875,6 +881,7 @@ class Resource(proto.Message):

class Access(proto.Message):
r"""An IAM role or permission under analysis.

Attributes:
role (str):
The role.
Expand Down Expand Up @@ -902,6 +909,7 @@ class Access(proto.Message):

class Identity(proto.Message):
r"""An identity under analysis.

Attributes:
name (str):
The identity name in any form of members appear in `IAM
Expand Down Expand Up @@ -932,6 +940,7 @@ class Identity(proto.Message):

class Edge(proto.Message):
r"""A directional edge.

Attributes:
source_node (str):
The source node of the edge. For example, it
Expand Down Expand Up @@ -1023,6 +1032,7 @@ class AccessControlList(proto.Message):

class IdentityList(proto.Message):
r"""The identities and group edges.

Attributes:
identities (Sequence[google.cloud.asset_v1.types.IamPolicyAnalysisResult.Identity]):
Only the identities that match one of the following
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

class GenerateAccessTokenRequest(proto.Message):
r"""

Attributes:
name (str):
Required. The resource name of the service account for which
Expand Down Expand Up @@ -92,6 +93,7 @@ class GenerateAccessTokenRequest(proto.Message):

class GenerateAccessTokenResponse(proto.Message):
r"""

Attributes:
access_token (str):
The OAuth 2.0 access token.
Expand All @@ -113,6 +115,7 @@ class GenerateAccessTokenResponse(proto.Message):

class SignBlobRequest(proto.Message):
r"""

Attributes:
name (str):
Required. The resource name of the service account for which
Expand Down Expand Up @@ -154,6 +157,7 @@ class SignBlobRequest(proto.Message):

class SignBlobResponse(proto.Message):
r"""

Attributes:
key_id (str):
The ID of the key used to sign the blob.
Expand All @@ -173,6 +177,7 @@ class SignBlobResponse(proto.Message):

class SignJwtRequest(proto.Message):
r"""

Attributes:
name (str):
Required. The resource name of the service account for which
Expand Down Expand Up @@ -215,6 +220,7 @@ class SignJwtRequest(proto.Message):

class SignJwtResponse(proto.Message):
r"""

Attributes:
key_id (str):
The ID of the key used to sign the JWT.
Expand All @@ -234,6 +240,7 @@ class SignJwtResponse(proto.Message):

class GenerateIdTokenRequest(proto.Message):
r"""

Attributes:
name (str):
Required. The resource name of the service account for which
Expand Down Expand Up @@ -285,6 +292,7 @@ class GenerateIdTokenRequest(proto.Message):

class GenerateIdTokenResponse(proto.Message):
r"""

Attributes:
token (str):
The OpenId Connect ID token.
Expand Down
Loading