@@ -38,19 +38,30 @@ class SourceContext(proto.Message):
38
38
SourceContext together with a path point to a unique revision of
39
39
a single file or directory.
40
40
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
+
41
48
Attributes:
42
49
cloud_repo (google.cloud.source_context_v1.types.CloudRepoSourceContext):
43
50
A SourceContext referring to a revision in a
44
51
cloud repo.
52
+ This field is a member of `oneof`_ ``context``.
45
53
cloud_workspace (google.cloud.source_context_v1.types.CloudWorkspaceSourceContext):
46
54
A SourceContext referring to a snapshot in a
47
55
cloud workspace.
56
+ This field is a member of `oneof`_ ``context``.
48
57
gerrit (google.cloud.source_context_v1.types.GerritSourceContext):
49
58
A SourceContext referring to a Gerrit
50
59
project.
60
+ This field is a member of `oneof`_ ``context``.
51
61
git (google.cloud.source_context_v1.types.GitSourceContext):
52
62
A SourceContext referring to any third party
53
63
Git repo (e.g. GitHub).
64
+ This field is a member of `oneof`_ ``context``.
54
65
"""
55
66
56
67
cloud_repo = proto .Field (
@@ -107,15 +118,25 @@ class CloudRepoSourceContext(proto.Message):
107
118
r"""A CloudRepoSourceContext denotes a particular revision in a
108
119
cloud repo (a repo hosted by the Google Cloud Platform).
109
120
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
+
110
128
Attributes:
111
129
repo_id (google.cloud.source_context_v1.types.RepoId):
112
130
The ID of the repo.
113
131
revision_id (str):
114
132
A revision ID.
133
+ This field is a member of `oneof`_ ``revision``.
115
134
alias_name (str):
116
135
The name of an alias (branch, tag, etc.).
136
+ This field is a member of `oneof`_ ``revision``.
117
137
alias_context (google.cloud.source_context_v1.types.AliasContext):
118
138
An alias, which may be a branch or tag.
139
+ This field is a member of `oneof`_ ``revision``.
119
140
"""
120
141
121
142
repo_id = proto .Field (proto .MESSAGE , number = 1 , message = "RepoId" ,)
@@ -145,6 +166,13 @@ class CloudWorkspaceSourceContext(proto.Message):
145
166
class GerritSourceContext (proto .Message ):
146
167
r"""A SourceContext referring to a Gerrit project.
147
168
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
+
148
176
Attributes:
149
177
host_uri (str):
150
178
The URI of a running Gerrit instance.
@@ -155,10 +183,13 @@ class GerritSourceContext(proto.Message):
155
183
hostURI/project.
156
184
revision_id (str):
157
185
A revision (commit) ID.
186
+ This field is a member of `oneof`_ ``revision``.
158
187
alias_name (str):
159
188
The name of an alias (branch, tag, etc.).
189
+ This field is a member of `oneof`_ ``revision``.
160
190
alias_context (google.cloud.source_context_v1.types.AliasContext):
161
191
An alias, which may be a branch or tag.
192
+ This field is a member of `oneof`_ ``revision``.
162
193
"""
163
194
164
195
host_uri = proto .Field (proto .STRING , number = 1 ,)
@@ -189,13 +220,22 @@ class GitSourceContext(proto.Message):
189
220
class RepoId (proto .Message ):
190
221
r"""A unique identifier for a cloud repo.
191
222
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
+
192
230
Attributes:
193
231
project_repo_id (google.cloud.source_context_v1.types.ProjectRepoId):
194
232
A combination of a project ID and a repo
195
233
name.
234
+ This field is a member of `oneof`_ ``id``.
196
235
uid (str):
197
236
A server-assigned, globally unique
198
237
identifier.
238
+ This field is a member of `oneof`_ ``id``.
199
239
"""
200
240
201
241
project_repo_id = proto .Field (
0 commit comments