@@ -38,19 +38,30 @@ class SourceContext(proto.Message):
3838 SourceContext together with a path point to a unique revision of
3939 a single file or directory.
4040
41+ This message has `oneof`_ fields (mutually exclusive fields).
42+ For each oneof, at most one member field can be set at the same time.
43+ Setting any member of the oneof automatically clears all other
44+ members.
45+
46+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
47+
4148 Attributes:
4249 cloud_repo (google.cloud.source_context_v1.types.CloudRepoSourceContext):
4350 A SourceContext referring to a revision in a
4451 cloud repo.
52+ This field is a member of `oneof`_ ``context``.
4553 cloud_workspace (google.cloud.source_context_v1.types.CloudWorkspaceSourceContext):
4654 A SourceContext referring to a snapshot in a
4755 cloud workspace.
56+ This field is a member of `oneof`_ ``context``.
4857 gerrit (google.cloud.source_context_v1.types.GerritSourceContext):
4958 A SourceContext referring to a Gerrit
5059 project.
60+ This field is a member of `oneof`_ ``context``.
5161 git (google.cloud.source_context_v1.types.GitSourceContext):
5262 A SourceContext referring to any third party
5363 Git repo (e.g. GitHub).
64+ This field is a member of `oneof`_ ``context``.
5465 """
5566
5667 cloud_repo = proto .Field (
@@ -107,15 +118,25 @@ class CloudRepoSourceContext(proto.Message):
107118 r"""A CloudRepoSourceContext denotes a particular revision in a
108119 cloud repo (a repo hosted by the Google Cloud Platform).
109120
121+ This message has `oneof`_ fields (mutually exclusive fields).
122+ For each oneof, at most one member field can be set at the same time.
123+ Setting any member of the oneof automatically clears all other
124+ members.
125+
126+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
127+
110128 Attributes:
111129 repo_id (google.cloud.source_context_v1.types.RepoId):
112130 The ID of the repo.
113131 revision_id (str):
114132 A revision ID.
133+ This field is a member of `oneof`_ ``revision``.
115134 alias_name (str):
116135 The name of an alias (branch, tag, etc.).
136+ This field is a member of `oneof`_ ``revision``.
117137 alias_context (google.cloud.source_context_v1.types.AliasContext):
118138 An alias, which may be a branch or tag.
139+ This field is a member of `oneof`_ ``revision``.
119140 """
120141
121142 repo_id = proto .Field (proto .MESSAGE , number = 1 , message = "RepoId" ,)
@@ -145,6 +166,13 @@ class CloudWorkspaceSourceContext(proto.Message):
145166class GerritSourceContext (proto .Message ):
146167 r"""A SourceContext referring to a Gerrit project.
147168
169+ This message has `oneof`_ fields (mutually exclusive fields).
170+ For each oneof, at most one member field can be set at the same time.
171+ Setting any member of the oneof automatically clears all other
172+ members.
173+
174+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
175+
148176 Attributes:
149177 host_uri (str):
150178 The URI of a running Gerrit instance.
@@ -155,10 +183,13 @@ class GerritSourceContext(proto.Message):
155183 hostURI/project.
156184 revision_id (str):
157185 A revision (commit) ID.
186+ This field is a member of `oneof`_ ``revision``.
158187 alias_name (str):
159188 The name of an alias (branch, tag, etc.).
189+ This field is a member of `oneof`_ ``revision``.
160190 alias_context (google.cloud.source_context_v1.types.AliasContext):
161191 An alias, which may be a branch or tag.
192+ This field is a member of `oneof`_ ``revision``.
162193 """
163194
164195 host_uri = proto .Field (proto .STRING , number = 1 ,)
@@ -189,13 +220,22 @@ class GitSourceContext(proto.Message):
189220class RepoId (proto .Message ):
190221 r"""A unique identifier for a cloud repo.
191222
223+ This message has `oneof`_ fields (mutually exclusive fields).
224+ For each oneof, at most one member field can be set at the same time.
225+ Setting any member of the oneof automatically clears all other
226+ members.
227+
228+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
229+
192230 Attributes:
193231 project_repo_id (google.cloud.source_context_v1.types.ProjectRepoId):
194232 A combination of a project ID and a repo
195233 name.
234+ This field is a member of `oneof`_ ``id``.
196235 uid (str):
197236 A server-assigned, globally unique
198237 identifier.
238+ This field is a member of `oneof`_ ``id``.
199239 """
200240
201241 project_repo_id = proto .Field (
0 commit comments