• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/devtools/cloudbuild/v1/cloudbuild.proto
18 
19 package com.google.cloudbuild.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Location of the source in a Google Cloud Source Repository.
26  * </pre>
27  *
28  * Protobuf type {@code google.devtools.cloudbuild.v1.RepoSource}
29  */
30 public final class RepoSource extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.devtools.cloudbuild.v1.RepoSource)
33     RepoSourceOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use RepoSource.newBuilder() to construct.
RepoSource(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private RepoSource(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
RepoSource()40   private RepoSource() {
41     projectId_ = "";
42     repoName_ = "";
43     dir_ = "";
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new RepoSource();
50   }
51 
52   @java.lang.Override
getUnknownFields()53   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
54     return this.unknownFields;
55   }
56 
getDescriptor()57   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
58     return com.google.cloudbuild.v1.Cloudbuild
59         .internal_static_google_devtools_cloudbuild_v1_RepoSource_descriptor;
60   }
61 
62   @SuppressWarnings({"rawtypes"})
63   @java.lang.Override
internalGetMapField(int number)64   protected com.google.protobuf.MapField internalGetMapField(int number) {
65     switch (number) {
66       case 9:
67         return internalGetSubstitutions();
68       default:
69         throw new RuntimeException("Invalid map field number: " + number);
70     }
71   }
72 
73   @java.lang.Override
74   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()75       internalGetFieldAccessorTable() {
76     return com.google.cloudbuild.v1.Cloudbuild
77         .internal_static_google_devtools_cloudbuild_v1_RepoSource_fieldAccessorTable
78         .ensureFieldAccessorsInitialized(
79             com.google.cloudbuild.v1.RepoSource.class,
80             com.google.cloudbuild.v1.RepoSource.Builder.class);
81   }
82 
83   private int revisionCase_ = 0;
84   private java.lang.Object revision_;
85 
86   public enum RevisionCase
87       implements
88           com.google.protobuf.Internal.EnumLite,
89           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
90     BRANCH_NAME(3),
91     TAG_NAME(4),
92     COMMIT_SHA(5),
93     REVISION_NOT_SET(0);
94     private final int value;
95 
RevisionCase(int value)96     private RevisionCase(int value) {
97       this.value = value;
98     }
99     /**
100      * @param value The number of the enum to look for.
101      * @return The enum associated with the given number.
102      * @deprecated Use {@link #forNumber(int)} instead.
103      */
104     @java.lang.Deprecated
valueOf(int value)105     public static RevisionCase valueOf(int value) {
106       return forNumber(value);
107     }
108 
forNumber(int value)109     public static RevisionCase forNumber(int value) {
110       switch (value) {
111         case 3:
112           return BRANCH_NAME;
113         case 4:
114           return TAG_NAME;
115         case 5:
116           return COMMIT_SHA;
117         case 0:
118           return REVISION_NOT_SET;
119         default:
120           return null;
121       }
122     }
123 
getNumber()124     public int getNumber() {
125       return this.value;
126     }
127   };
128 
getRevisionCase()129   public RevisionCase getRevisionCase() {
130     return RevisionCase.forNumber(revisionCase_);
131   }
132 
133   public static final int PROJECT_ID_FIELD_NUMBER = 1;
134 
135   @SuppressWarnings("serial")
136   private volatile java.lang.Object projectId_ = "";
137   /**
138    *
139    *
140    * <pre>
141    * ID of the project that owns the Cloud Source Repository. If omitted, the
142    * project ID requesting the build is assumed.
143    * </pre>
144    *
145    * <code>string project_id = 1;</code>
146    *
147    * @return The projectId.
148    */
149   @java.lang.Override
getProjectId()150   public java.lang.String getProjectId() {
151     java.lang.Object ref = projectId_;
152     if (ref instanceof java.lang.String) {
153       return (java.lang.String) ref;
154     } else {
155       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
156       java.lang.String s = bs.toStringUtf8();
157       projectId_ = s;
158       return s;
159     }
160   }
161   /**
162    *
163    *
164    * <pre>
165    * ID of the project that owns the Cloud Source Repository. If omitted, the
166    * project ID requesting the build is assumed.
167    * </pre>
168    *
169    * <code>string project_id = 1;</code>
170    *
171    * @return The bytes for projectId.
172    */
173   @java.lang.Override
getProjectIdBytes()174   public com.google.protobuf.ByteString getProjectIdBytes() {
175     java.lang.Object ref = projectId_;
176     if (ref instanceof java.lang.String) {
177       com.google.protobuf.ByteString b =
178           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
179       projectId_ = b;
180       return b;
181     } else {
182       return (com.google.protobuf.ByteString) ref;
183     }
184   }
185 
186   public static final int REPO_NAME_FIELD_NUMBER = 2;
187 
188   @SuppressWarnings("serial")
189   private volatile java.lang.Object repoName_ = "";
190   /**
191    *
192    *
193    * <pre>
194    * Name of the Cloud Source Repository.
195    * </pre>
196    *
197    * <code>string repo_name = 2;</code>
198    *
199    * @return The repoName.
200    */
201   @java.lang.Override
getRepoName()202   public java.lang.String getRepoName() {
203     java.lang.Object ref = repoName_;
204     if (ref instanceof java.lang.String) {
205       return (java.lang.String) ref;
206     } else {
207       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
208       java.lang.String s = bs.toStringUtf8();
209       repoName_ = s;
210       return s;
211     }
212   }
213   /**
214    *
215    *
216    * <pre>
217    * Name of the Cloud Source Repository.
218    * </pre>
219    *
220    * <code>string repo_name = 2;</code>
221    *
222    * @return The bytes for repoName.
223    */
224   @java.lang.Override
getRepoNameBytes()225   public com.google.protobuf.ByteString getRepoNameBytes() {
226     java.lang.Object ref = repoName_;
227     if (ref instanceof java.lang.String) {
228       com.google.protobuf.ByteString b =
229           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
230       repoName_ = b;
231       return b;
232     } else {
233       return (com.google.protobuf.ByteString) ref;
234     }
235   }
236 
237   public static final int BRANCH_NAME_FIELD_NUMBER = 3;
238   /**
239    *
240    *
241    * <pre>
242    * Regex matching branches to build.
243    * The syntax of the regular expressions accepted is the syntax accepted by
244    * RE2 and described at https://github.com/google/re2/wiki/Syntax
245    * </pre>
246    *
247    * <code>string branch_name = 3;</code>
248    *
249    * @return Whether the branchName field is set.
250    */
hasBranchName()251   public boolean hasBranchName() {
252     return revisionCase_ == 3;
253   }
254   /**
255    *
256    *
257    * <pre>
258    * Regex matching branches to build.
259    * The syntax of the regular expressions accepted is the syntax accepted by
260    * RE2 and described at https://github.com/google/re2/wiki/Syntax
261    * </pre>
262    *
263    * <code>string branch_name = 3;</code>
264    *
265    * @return The branchName.
266    */
getBranchName()267   public java.lang.String getBranchName() {
268     java.lang.Object ref = "";
269     if (revisionCase_ == 3) {
270       ref = revision_;
271     }
272     if (ref instanceof java.lang.String) {
273       return (java.lang.String) ref;
274     } else {
275       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
276       java.lang.String s = bs.toStringUtf8();
277       if (revisionCase_ == 3) {
278         revision_ = s;
279       }
280       return s;
281     }
282   }
283   /**
284    *
285    *
286    * <pre>
287    * Regex matching branches to build.
288    * The syntax of the regular expressions accepted is the syntax accepted by
289    * RE2 and described at https://github.com/google/re2/wiki/Syntax
290    * </pre>
291    *
292    * <code>string branch_name = 3;</code>
293    *
294    * @return The bytes for branchName.
295    */
getBranchNameBytes()296   public com.google.protobuf.ByteString getBranchNameBytes() {
297     java.lang.Object ref = "";
298     if (revisionCase_ == 3) {
299       ref = revision_;
300     }
301     if (ref instanceof java.lang.String) {
302       com.google.protobuf.ByteString b =
303           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
304       if (revisionCase_ == 3) {
305         revision_ = b;
306       }
307       return b;
308     } else {
309       return (com.google.protobuf.ByteString) ref;
310     }
311   }
312 
313   public static final int TAG_NAME_FIELD_NUMBER = 4;
314   /**
315    *
316    *
317    * <pre>
318    * Regex matching tags to build.
319    * The syntax of the regular expressions accepted is the syntax accepted by
320    * RE2 and described at https://github.com/google/re2/wiki/Syntax
321    * </pre>
322    *
323    * <code>string tag_name = 4;</code>
324    *
325    * @return Whether the tagName field is set.
326    */
hasTagName()327   public boolean hasTagName() {
328     return revisionCase_ == 4;
329   }
330   /**
331    *
332    *
333    * <pre>
334    * Regex matching tags to build.
335    * The syntax of the regular expressions accepted is the syntax accepted by
336    * RE2 and described at https://github.com/google/re2/wiki/Syntax
337    * </pre>
338    *
339    * <code>string tag_name = 4;</code>
340    *
341    * @return The tagName.
342    */
getTagName()343   public java.lang.String getTagName() {
344     java.lang.Object ref = "";
345     if (revisionCase_ == 4) {
346       ref = revision_;
347     }
348     if (ref instanceof java.lang.String) {
349       return (java.lang.String) ref;
350     } else {
351       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
352       java.lang.String s = bs.toStringUtf8();
353       if (revisionCase_ == 4) {
354         revision_ = s;
355       }
356       return s;
357     }
358   }
359   /**
360    *
361    *
362    * <pre>
363    * Regex matching tags to build.
364    * The syntax of the regular expressions accepted is the syntax accepted by
365    * RE2 and described at https://github.com/google/re2/wiki/Syntax
366    * </pre>
367    *
368    * <code>string tag_name = 4;</code>
369    *
370    * @return The bytes for tagName.
371    */
getTagNameBytes()372   public com.google.protobuf.ByteString getTagNameBytes() {
373     java.lang.Object ref = "";
374     if (revisionCase_ == 4) {
375       ref = revision_;
376     }
377     if (ref instanceof java.lang.String) {
378       com.google.protobuf.ByteString b =
379           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
380       if (revisionCase_ == 4) {
381         revision_ = b;
382       }
383       return b;
384     } else {
385       return (com.google.protobuf.ByteString) ref;
386     }
387   }
388 
389   public static final int COMMIT_SHA_FIELD_NUMBER = 5;
390   /**
391    *
392    *
393    * <pre>
394    * Explicit commit SHA to build.
395    * </pre>
396    *
397    * <code>string commit_sha = 5;</code>
398    *
399    * @return Whether the commitSha field is set.
400    */
hasCommitSha()401   public boolean hasCommitSha() {
402     return revisionCase_ == 5;
403   }
404   /**
405    *
406    *
407    * <pre>
408    * Explicit commit SHA to build.
409    * </pre>
410    *
411    * <code>string commit_sha = 5;</code>
412    *
413    * @return The commitSha.
414    */
getCommitSha()415   public java.lang.String getCommitSha() {
416     java.lang.Object ref = "";
417     if (revisionCase_ == 5) {
418       ref = revision_;
419     }
420     if (ref instanceof java.lang.String) {
421       return (java.lang.String) ref;
422     } else {
423       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
424       java.lang.String s = bs.toStringUtf8();
425       if (revisionCase_ == 5) {
426         revision_ = s;
427       }
428       return s;
429     }
430   }
431   /**
432    *
433    *
434    * <pre>
435    * Explicit commit SHA to build.
436    * </pre>
437    *
438    * <code>string commit_sha = 5;</code>
439    *
440    * @return The bytes for commitSha.
441    */
getCommitShaBytes()442   public com.google.protobuf.ByteString getCommitShaBytes() {
443     java.lang.Object ref = "";
444     if (revisionCase_ == 5) {
445       ref = revision_;
446     }
447     if (ref instanceof java.lang.String) {
448       com.google.protobuf.ByteString b =
449           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
450       if (revisionCase_ == 5) {
451         revision_ = b;
452       }
453       return b;
454     } else {
455       return (com.google.protobuf.ByteString) ref;
456     }
457   }
458 
459   public static final int DIR_FIELD_NUMBER = 7;
460 
461   @SuppressWarnings("serial")
462   private volatile java.lang.Object dir_ = "";
463   /**
464    *
465    *
466    * <pre>
467    * Directory, relative to the source root, in which to run the build.
468    * This must be a relative path. If a step's `dir` is specified and is an
469    * absolute path, this value is ignored for that step's execution.
470    * </pre>
471    *
472    * <code>string dir = 7;</code>
473    *
474    * @return The dir.
475    */
476   @java.lang.Override
getDir()477   public java.lang.String getDir() {
478     java.lang.Object ref = dir_;
479     if (ref instanceof java.lang.String) {
480       return (java.lang.String) ref;
481     } else {
482       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
483       java.lang.String s = bs.toStringUtf8();
484       dir_ = s;
485       return s;
486     }
487   }
488   /**
489    *
490    *
491    * <pre>
492    * Directory, relative to the source root, in which to run the build.
493    * This must be a relative path. If a step's `dir` is specified and is an
494    * absolute path, this value is ignored for that step's execution.
495    * </pre>
496    *
497    * <code>string dir = 7;</code>
498    *
499    * @return The bytes for dir.
500    */
501   @java.lang.Override
getDirBytes()502   public com.google.protobuf.ByteString getDirBytes() {
503     java.lang.Object ref = dir_;
504     if (ref instanceof java.lang.String) {
505       com.google.protobuf.ByteString b =
506           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
507       dir_ = b;
508       return b;
509     } else {
510       return (com.google.protobuf.ByteString) ref;
511     }
512   }
513 
514   public static final int INVERT_REGEX_FIELD_NUMBER = 8;
515   private boolean invertRegex_ = false;
516   /**
517    *
518    *
519    * <pre>
520    * Only trigger a build if the revision regex does NOT match the revision
521    * regex.
522    * </pre>
523    *
524    * <code>bool invert_regex = 8;</code>
525    *
526    * @return The invertRegex.
527    */
528   @java.lang.Override
getInvertRegex()529   public boolean getInvertRegex() {
530     return invertRegex_;
531   }
532 
533   public static final int SUBSTITUTIONS_FIELD_NUMBER = 9;
534 
535   private static final class SubstitutionsDefaultEntryHolder {
536     static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
537         com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
538             com.google.cloudbuild.v1.Cloudbuild
539                 .internal_static_google_devtools_cloudbuild_v1_RepoSource_SubstitutionsEntry_descriptor,
540             com.google.protobuf.WireFormat.FieldType.STRING,
541             "",
542             com.google.protobuf.WireFormat.FieldType.STRING,
543             "");
544   }
545 
546   @SuppressWarnings("serial")
547   private com.google.protobuf.MapField<java.lang.String, java.lang.String> substitutions_;
548 
549   private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetSubstitutions()550       internalGetSubstitutions() {
551     if (substitutions_ == null) {
552       return com.google.protobuf.MapField.emptyMapField(
553           SubstitutionsDefaultEntryHolder.defaultEntry);
554     }
555     return substitutions_;
556   }
557 
getSubstitutionsCount()558   public int getSubstitutionsCount() {
559     return internalGetSubstitutions().getMap().size();
560   }
561   /**
562    *
563    *
564    * <pre>
565    * Substitutions to use in a triggered build.
566    * Should only be used with RunBuildTrigger
567    * </pre>
568    *
569    * <code>map&lt;string, string&gt; substitutions = 9;</code>
570    */
571   @java.lang.Override
containsSubstitutions(java.lang.String key)572   public boolean containsSubstitutions(java.lang.String key) {
573     if (key == null) {
574       throw new NullPointerException("map key");
575     }
576     return internalGetSubstitutions().getMap().containsKey(key);
577   }
578   /** Use {@link #getSubstitutionsMap()} instead. */
579   @java.lang.Override
580   @java.lang.Deprecated
getSubstitutions()581   public java.util.Map<java.lang.String, java.lang.String> getSubstitutions() {
582     return getSubstitutionsMap();
583   }
584   /**
585    *
586    *
587    * <pre>
588    * Substitutions to use in a triggered build.
589    * Should only be used with RunBuildTrigger
590    * </pre>
591    *
592    * <code>map&lt;string, string&gt; substitutions = 9;</code>
593    */
594   @java.lang.Override
getSubstitutionsMap()595   public java.util.Map<java.lang.String, java.lang.String> getSubstitutionsMap() {
596     return internalGetSubstitutions().getMap();
597   }
598   /**
599    *
600    *
601    * <pre>
602    * Substitutions to use in a triggered build.
603    * Should only be used with RunBuildTrigger
604    * </pre>
605    *
606    * <code>map&lt;string, string&gt; substitutions = 9;</code>
607    */
608   @java.lang.Override
getSubstitutionsOrDefault( java.lang.String key, java.lang.String defaultValue)609   public /* nullable */ java.lang.String getSubstitutionsOrDefault(
610       java.lang.String key,
611       /* nullable */
612       java.lang.String defaultValue) {
613     if (key == null) {
614       throw new NullPointerException("map key");
615     }
616     java.util.Map<java.lang.String, java.lang.String> map = internalGetSubstitutions().getMap();
617     return map.containsKey(key) ? map.get(key) : defaultValue;
618   }
619   /**
620    *
621    *
622    * <pre>
623    * Substitutions to use in a triggered build.
624    * Should only be used with RunBuildTrigger
625    * </pre>
626    *
627    * <code>map&lt;string, string&gt; substitutions = 9;</code>
628    */
629   @java.lang.Override
getSubstitutionsOrThrow(java.lang.String key)630   public java.lang.String getSubstitutionsOrThrow(java.lang.String key) {
631     if (key == null) {
632       throw new NullPointerException("map key");
633     }
634     java.util.Map<java.lang.String, java.lang.String> map = internalGetSubstitutions().getMap();
635     if (!map.containsKey(key)) {
636       throw new java.lang.IllegalArgumentException();
637     }
638     return map.get(key);
639   }
640 
641   private byte memoizedIsInitialized = -1;
642 
643   @java.lang.Override
isInitialized()644   public final boolean isInitialized() {
645     byte isInitialized = memoizedIsInitialized;
646     if (isInitialized == 1) return true;
647     if (isInitialized == 0) return false;
648 
649     memoizedIsInitialized = 1;
650     return true;
651   }
652 
653   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)654   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
655     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) {
656       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_);
657     }
658     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repoName_)) {
659       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, repoName_);
660     }
661     if (revisionCase_ == 3) {
662       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, revision_);
663     }
664     if (revisionCase_ == 4) {
665       com.google.protobuf.GeneratedMessageV3.writeString(output, 4, revision_);
666     }
667     if (revisionCase_ == 5) {
668       com.google.protobuf.GeneratedMessageV3.writeString(output, 5, revision_);
669     }
670     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dir_)) {
671       com.google.protobuf.GeneratedMessageV3.writeString(output, 7, dir_);
672     }
673     if (invertRegex_ != false) {
674       output.writeBool(8, invertRegex_);
675     }
676     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
677         output, internalGetSubstitutions(), SubstitutionsDefaultEntryHolder.defaultEntry, 9);
678     getUnknownFields().writeTo(output);
679   }
680 
681   @java.lang.Override
getSerializedSize()682   public int getSerializedSize() {
683     int size = memoizedSize;
684     if (size != -1) return size;
685 
686     size = 0;
687     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) {
688       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_);
689     }
690     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repoName_)) {
691       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, repoName_);
692     }
693     if (revisionCase_ == 3) {
694       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, revision_);
695     }
696     if (revisionCase_ == 4) {
697       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, revision_);
698     }
699     if (revisionCase_ == 5) {
700       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, revision_);
701     }
702     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dir_)) {
703       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, dir_);
704     }
705     if (invertRegex_ != false) {
706       size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, invertRegex_);
707     }
708     for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
709         internalGetSubstitutions().getMap().entrySet()) {
710       com.google.protobuf.MapEntry<java.lang.String, java.lang.String> substitutions__ =
711           SubstitutionsDefaultEntryHolder.defaultEntry
712               .newBuilderForType()
713               .setKey(entry.getKey())
714               .setValue(entry.getValue())
715               .build();
716       size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, substitutions__);
717     }
718     size += getUnknownFields().getSerializedSize();
719     memoizedSize = size;
720     return size;
721   }
722 
723   @java.lang.Override
equals(final java.lang.Object obj)724   public boolean equals(final java.lang.Object obj) {
725     if (obj == this) {
726       return true;
727     }
728     if (!(obj instanceof com.google.cloudbuild.v1.RepoSource)) {
729       return super.equals(obj);
730     }
731     com.google.cloudbuild.v1.RepoSource other = (com.google.cloudbuild.v1.RepoSource) obj;
732 
733     if (!getProjectId().equals(other.getProjectId())) return false;
734     if (!getRepoName().equals(other.getRepoName())) return false;
735     if (!getDir().equals(other.getDir())) return false;
736     if (getInvertRegex() != other.getInvertRegex()) return false;
737     if (!internalGetSubstitutions().equals(other.internalGetSubstitutions())) return false;
738     if (!getRevisionCase().equals(other.getRevisionCase())) return false;
739     switch (revisionCase_) {
740       case 3:
741         if (!getBranchName().equals(other.getBranchName())) return false;
742         break;
743       case 4:
744         if (!getTagName().equals(other.getTagName())) return false;
745         break;
746       case 5:
747         if (!getCommitSha().equals(other.getCommitSha())) return false;
748         break;
749       case 0:
750       default:
751     }
752     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
753     return true;
754   }
755 
756   @java.lang.Override
hashCode()757   public int hashCode() {
758     if (memoizedHashCode != 0) {
759       return memoizedHashCode;
760     }
761     int hash = 41;
762     hash = (19 * hash) + getDescriptor().hashCode();
763     hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER;
764     hash = (53 * hash) + getProjectId().hashCode();
765     hash = (37 * hash) + REPO_NAME_FIELD_NUMBER;
766     hash = (53 * hash) + getRepoName().hashCode();
767     hash = (37 * hash) + DIR_FIELD_NUMBER;
768     hash = (53 * hash) + getDir().hashCode();
769     hash = (37 * hash) + INVERT_REGEX_FIELD_NUMBER;
770     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInvertRegex());
771     if (!internalGetSubstitutions().getMap().isEmpty()) {
772       hash = (37 * hash) + SUBSTITUTIONS_FIELD_NUMBER;
773       hash = (53 * hash) + internalGetSubstitutions().hashCode();
774     }
775     switch (revisionCase_) {
776       case 3:
777         hash = (37 * hash) + BRANCH_NAME_FIELD_NUMBER;
778         hash = (53 * hash) + getBranchName().hashCode();
779         break;
780       case 4:
781         hash = (37 * hash) + TAG_NAME_FIELD_NUMBER;
782         hash = (53 * hash) + getTagName().hashCode();
783         break;
784       case 5:
785         hash = (37 * hash) + COMMIT_SHA_FIELD_NUMBER;
786         hash = (53 * hash) + getCommitSha().hashCode();
787         break;
788       case 0:
789       default:
790     }
791     hash = (29 * hash) + getUnknownFields().hashCode();
792     memoizedHashCode = hash;
793     return hash;
794   }
795 
parseFrom(java.nio.ByteBuffer data)796   public static com.google.cloudbuild.v1.RepoSource parseFrom(java.nio.ByteBuffer data)
797       throws com.google.protobuf.InvalidProtocolBufferException {
798     return PARSER.parseFrom(data);
799   }
800 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)801   public static com.google.cloudbuild.v1.RepoSource parseFrom(
802       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
803       throws com.google.protobuf.InvalidProtocolBufferException {
804     return PARSER.parseFrom(data, extensionRegistry);
805   }
806 
parseFrom(com.google.protobuf.ByteString data)807   public static com.google.cloudbuild.v1.RepoSource parseFrom(com.google.protobuf.ByteString data)
808       throws com.google.protobuf.InvalidProtocolBufferException {
809     return PARSER.parseFrom(data);
810   }
811 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)812   public static com.google.cloudbuild.v1.RepoSource parseFrom(
813       com.google.protobuf.ByteString data,
814       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
815       throws com.google.protobuf.InvalidProtocolBufferException {
816     return PARSER.parseFrom(data, extensionRegistry);
817   }
818 
parseFrom(byte[] data)819   public static com.google.cloudbuild.v1.RepoSource parseFrom(byte[] data)
820       throws com.google.protobuf.InvalidProtocolBufferException {
821     return PARSER.parseFrom(data);
822   }
823 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)824   public static com.google.cloudbuild.v1.RepoSource parseFrom(
825       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
826       throws com.google.protobuf.InvalidProtocolBufferException {
827     return PARSER.parseFrom(data, extensionRegistry);
828   }
829 
parseFrom(java.io.InputStream input)830   public static com.google.cloudbuild.v1.RepoSource parseFrom(java.io.InputStream input)
831       throws java.io.IOException {
832     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
833   }
834 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)835   public static com.google.cloudbuild.v1.RepoSource parseFrom(
836       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
837       throws java.io.IOException {
838     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
839         PARSER, input, extensionRegistry);
840   }
841 
parseDelimitedFrom(java.io.InputStream input)842   public static com.google.cloudbuild.v1.RepoSource parseDelimitedFrom(java.io.InputStream input)
843       throws java.io.IOException {
844     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
845   }
846 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)847   public static com.google.cloudbuild.v1.RepoSource parseDelimitedFrom(
848       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
849       throws java.io.IOException {
850     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
851         PARSER, input, extensionRegistry);
852   }
853 
parseFrom( com.google.protobuf.CodedInputStream input)854   public static com.google.cloudbuild.v1.RepoSource parseFrom(
855       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
856     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
857   }
858 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)859   public static com.google.cloudbuild.v1.RepoSource parseFrom(
860       com.google.protobuf.CodedInputStream input,
861       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
862       throws java.io.IOException {
863     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
864         PARSER, input, extensionRegistry);
865   }
866 
867   @java.lang.Override
newBuilderForType()868   public Builder newBuilderForType() {
869     return newBuilder();
870   }
871 
newBuilder()872   public static Builder newBuilder() {
873     return DEFAULT_INSTANCE.toBuilder();
874   }
875 
newBuilder(com.google.cloudbuild.v1.RepoSource prototype)876   public static Builder newBuilder(com.google.cloudbuild.v1.RepoSource prototype) {
877     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
878   }
879 
880   @java.lang.Override
toBuilder()881   public Builder toBuilder() {
882     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
883   }
884 
885   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)886   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
887     Builder builder = new Builder(parent);
888     return builder;
889   }
890   /**
891    *
892    *
893    * <pre>
894    * Location of the source in a Google Cloud Source Repository.
895    * </pre>
896    *
897    * Protobuf type {@code google.devtools.cloudbuild.v1.RepoSource}
898    */
899   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
900       implements
901       // @@protoc_insertion_point(builder_implements:google.devtools.cloudbuild.v1.RepoSource)
902       com.google.cloudbuild.v1.RepoSourceOrBuilder {
getDescriptor()903     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
904       return com.google.cloudbuild.v1.Cloudbuild
905           .internal_static_google_devtools_cloudbuild_v1_RepoSource_descriptor;
906     }
907 
908     @SuppressWarnings({"rawtypes"})
internalGetMapField(int number)909     protected com.google.protobuf.MapField internalGetMapField(int number) {
910       switch (number) {
911         case 9:
912           return internalGetSubstitutions();
913         default:
914           throw new RuntimeException("Invalid map field number: " + number);
915       }
916     }
917 
918     @SuppressWarnings({"rawtypes"})
internalGetMutableMapField(int number)919     protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
920       switch (number) {
921         case 9:
922           return internalGetMutableSubstitutions();
923         default:
924           throw new RuntimeException("Invalid map field number: " + number);
925       }
926     }
927 
928     @java.lang.Override
929     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()930         internalGetFieldAccessorTable() {
931       return com.google.cloudbuild.v1.Cloudbuild
932           .internal_static_google_devtools_cloudbuild_v1_RepoSource_fieldAccessorTable
933           .ensureFieldAccessorsInitialized(
934               com.google.cloudbuild.v1.RepoSource.class,
935               com.google.cloudbuild.v1.RepoSource.Builder.class);
936     }
937 
938     // Construct using com.google.cloudbuild.v1.RepoSource.newBuilder()
Builder()939     private Builder() {}
940 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)941     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
942       super(parent);
943     }
944 
945     @java.lang.Override
clear()946     public Builder clear() {
947       super.clear();
948       bitField0_ = 0;
949       projectId_ = "";
950       repoName_ = "";
951       dir_ = "";
952       invertRegex_ = false;
953       internalGetMutableSubstitutions().clear();
954       revisionCase_ = 0;
955       revision_ = null;
956       return this;
957     }
958 
959     @java.lang.Override
getDescriptorForType()960     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
961       return com.google.cloudbuild.v1.Cloudbuild
962           .internal_static_google_devtools_cloudbuild_v1_RepoSource_descriptor;
963     }
964 
965     @java.lang.Override
getDefaultInstanceForType()966     public com.google.cloudbuild.v1.RepoSource getDefaultInstanceForType() {
967       return com.google.cloudbuild.v1.RepoSource.getDefaultInstance();
968     }
969 
970     @java.lang.Override
build()971     public com.google.cloudbuild.v1.RepoSource build() {
972       com.google.cloudbuild.v1.RepoSource result = buildPartial();
973       if (!result.isInitialized()) {
974         throw newUninitializedMessageException(result);
975       }
976       return result;
977     }
978 
979     @java.lang.Override
buildPartial()980     public com.google.cloudbuild.v1.RepoSource buildPartial() {
981       com.google.cloudbuild.v1.RepoSource result = new com.google.cloudbuild.v1.RepoSource(this);
982       if (bitField0_ != 0) {
983         buildPartial0(result);
984       }
985       buildPartialOneofs(result);
986       onBuilt();
987       return result;
988     }
989 
buildPartial0(com.google.cloudbuild.v1.RepoSource result)990     private void buildPartial0(com.google.cloudbuild.v1.RepoSource result) {
991       int from_bitField0_ = bitField0_;
992       if (((from_bitField0_ & 0x00000001) != 0)) {
993         result.projectId_ = projectId_;
994       }
995       if (((from_bitField0_ & 0x00000002) != 0)) {
996         result.repoName_ = repoName_;
997       }
998       if (((from_bitField0_ & 0x00000020) != 0)) {
999         result.dir_ = dir_;
1000       }
1001       if (((from_bitField0_ & 0x00000040) != 0)) {
1002         result.invertRegex_ = invertRegex_;
1003       }
1004       if (((from_bitField0_ & 0x00000080) != 0)) {
1005         result.substitutions_ = internalGetSubstitutions();
1006         result.substitutions_.makeImmutable();
1007       }
1008     }
1009 
buildPartialOneofs(com.google.cloudbuild.v1.RepoSource result)1010     private void buildPartialOneofs(com.google.cloudbuild.v1.RepoSource result) {
1011       result.revisionCase_ = revisionCase_;
1012       result.revision_ = this.revision_;
1013     }
1014 
1015     @java.lang.Override
clone()1016     public Builder clone() {
1017       return super.clone();
1018     }
1019 
1020     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1021     public Builder setField(
1022         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1023       return super.setField(field, value);
1024     }
1025 
1026     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1027     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1028       return super.clearField(field);
1029     }
1030 
1031     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1032     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1033       return super.clearOneof(oneof);
1034     }
1035 
1036     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1037     public Builder setRepeatedField(
1038         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1039       return super.setRepeatedField(field, index, value);
1040     }
1041 
1042     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1043     public Builder addRepeatedField(
1044         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1045       return super.addRepeatedField(field, value);
1046     }
1047 
1048     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1049     public Builder mergeFrom(com.google.protobuf.Message other) {
1050       if (other instanceof com.google.cloudbuild.v1.RepoSource) {
1051         return mergeFrom((com.google.cloudbuild.v1.RepoSource) other);
1052       } else {
1053         super.mergeFrom(other);
1054         return this;
1055       }
1056     }
1057 
mergeFrom(com.google.cloudbuild.v1.RepoSource other)1058     public Builder mergeFrom(com.google.cloudbuild.v1.RepoSource other) {
1059       if (other == com.google.cloudbuild.v1.RepoSource.getDefaultInstance()) return this;
1060       if (!other.getProjectId().isEmpty()) {
1061         projectId_ = other.projectId_;
1062         bitField0_ |= 0x00000001;
1063         onChanged();
1064       }
1065       if (!other.getRepoName().isEmpty()) {
1066         repoName_ = other.repoName_;
1067         bitField0_ |= 0x00000002;
1068         onChanged();
1069       }
1070       if (!other.getDir().isEmpty()) {
1071         dir_ = other.dir_;
1072         bitField0_ |= 0x00000020;
1073         onChanged();
1074       }
1075       if (other.getInvertRegex() != false) {
1076         setInvertRegex(other.getInvertRegex());
1077       }
1078       internalGetMutableSubstitutions().mergeFrom(other.internalGetSubstitutions());
1079       bitField0_ |= 0x00000080;
1080       switch (other.getRevisionCase()) {
1081         case BRANCH_NAME:
1082           {
1083             revisionCase_ = 3;
1084             revision_ = other.revision_;
1085             onChanged();
1086             break;
1087           }
1088         case TAG_NAME:
1089           {
1090             revisionCase_ = 4;
1091             revision_ = other.revision_;
1092             onChanged();
1093             break;
1094           }
1095         case COMMIT_SHA:
1096           {
1097             revisionCase_ = 5;
1098             revision_ = other.revision_;
1099             onChanged();
1100             break;
1101           }
1102         case REVISION_NOT_SET:
1103           {
1104             break;
1105           }
1106       }
1107       this.mergeUnknownFields(other.getUnknownFields());
1108       onChanged();
1109       return this;
1110     }
1111 
1112     @java.lang.Override
isInitialized()1113     public final boolean isInitialized() {
1114       return true;
1115     }
1116 
1117     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1118     public Builder mergeFrom(
1119         com.google.protobuf.CodedInputStream input,
1120         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1121         throws java.io.IOException {
1122       if (extensionRegistry == null) {
1123         throw new java.lang.NullPointerException();
1124       }
1125       try {
1126         boolean done = false;
1127         while (!done) {
1128           int tag = input.readTag();
1129           switch (tag) {
1130             case 0:
1131               done = true;
1132               break;
1133             case 10:
1134               {
1135                 projectId_ = input.readStringRequireUtf8();
1136                 bitField0_ |= 0x00000001;
1137                 break;
1138               } // case 10
1139             case 18:
1140               {
1141                 repoName_ = input.readStringRequireUtf8();
1142                 bitField0_ |= 0x00000002;
1143                 break;
1144               } // case 18
1145             case 26:
1146               {
1147                 java.lang.String s = input.readStringRequireUtf8();
1148                 revisionCase_ = 3;
1149                 revision_ = s;
1150                 break;
1151               } // case 26
1152             case 34:
1153               {
1154                 java.lang.String s = input.readStringRequireUtf8();
1155                 revisionCase_ = 4;
1156                 revision_ = s;
1157                 break;
1158               } // case 34
1159             case 42:
1160               {
1161                 java.lang.String s = input.readStringRequireUtf8();
1162                 revisionCase_ = 5;
1163                 revision_ = s;
1164                 break;
1165               } // case 42
1166             case 58:
1167               {
1168                 dir_ = input.readStringRequireUtf8();
1169                 bitField0_ |= 0x00000020;
1170                 break;
1171               } // case 58
1172             case 64:
1173               {
1174                 invertRegex_ = input.readBool();
1175                 bitField0_ |= 0x00000040;
1176                 break;
1177               } // case 64
1178             case 74:
1179               {
1180                 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> substitutions__ =
1181                     input.readMessage(
1182                         SubstitutionsDefaultEntryHolder.defaultEntry.getParserForType(),
1183                         extensionRegistry);
1184                 internalGetMutableSubstitutions()
1185                     .getMutableMap()
1186                     .put(substitutions__.getKey(), substitutions__.getValue());
1187                 bitField0_ |= 0x00000080;
1188                 break;
1189               } // case 74
1190             default:
1191               {
1192                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1193                   done = true; // was an endgroup tag
1194                 }
1195                 break;
1196               } // default:
1197           } // switch (tag)
1198         } // while (!done)
1199       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1200         throw e.unwrapIOException();
1201       } finally {
1202         onChanged();
1203       } // finally
1204       return this;
1205     }
1206 
1207     private int revisionCase_ = 0;
1208     private java.lang.Object revision_;
1209 
getRevisionCase()1210     public RevisionCase getRevisionCase() {
1211       return RevisionCase.forNumber(revisionCase_);
1212     }
1213 
clearRevision()1214     public Builder clearRevision() {
1215       revisionCase_ = 0;
1216       revision_ = null;
1217       onChanged();
1218       return this;
1219     }
1220 
1221     private int bitField0_;
1222 
1223     private java.lang.Object projectId_ = "";
1224     /**
1225      *
1226      *
1227      * <pre>
1228      * ID of the project that owns the Cloud Source Repository. If omitted, the
1229      * project ID requesting the build is assumed.
1230      * </pre>
1231      *
1232      * <code>string project_id = 1;</code>
1233      *
1234      * @return The projectId.
1235      */
getProjectId()1236     public java.lang.String getProjectId() {
1237       java.lang.Object ref = projectId_;
1238       if (!(ref instanceof java.lang.String)) {
1239         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1240         java.lang.String s = bs.toStringUtf8();
1241         projectId_ = s;
1242         return s;
1243       } else {
1244         return (java.lang.String) ref;
1245       }
1246     }
1247     /**
1248      *
1249      *
1250      * <pre>
1251      * ID of the project that owns the Cloud Source Repository. If omitted, the
1252      * project ID requesting the build is assumed.
1253      * </pre>
1254      *
1255      * <code>string project_id = 1;</code>
1256      *
1257      * @return The bytes for projectId.
1258      */
getProjectIdBytes()1259     public com.google.protobuf.ByteString getProjectIdBytes() {
1260       java.lang.Object ref = projectId_;
1261       if (ref instanceof String) {
1262         com.google.protobuf.ByteString b =
1263             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1264         projectId_ = b;
1265         return b;
1266       } else {
1267         return (com.google.protobuf.ByteString) ref;
1268       }
1269     }
1270     /**
1271      *
1272      *
1273      * <pre>
1274      * ID of the project that owns the Cloud Source Repository. If omitted, the
1275      * project ID requesting the build is assumed.
1276      * </pre>
1277      *
1278      * <code>string project_id = 1;</code>
1279      *
1280      * @param value The projectId to set.
1281      * @return This builder for chaining.
1282      */
setProjectId(java.lang.String value)1283     public Builder setProjectId(java.lang.String value) {
1284       if (value == null) {
1285         throw new NullPointerException();
1286       }
1287       projectId_ = value;
1288       bitField0_ |= 0x00000001;
1289       onChanged();
1290       return this;
1291     }
1292     /**
1293      *
1294      *
1295      * <pre>
1296      * ID of the project that owns the Cloud Source Repository. If omitted, the
1297      * project ID requesting the build is assumed.
1298      * </pre>
1299      *
1300      * <code>string project_id = 1;</code>
1301      *
1302      * @return This builder for chaining.
1303      */
clearProjectId()1304     public Builder clearProjectId() {
1305       projectId_ = getDefaultInstance().getProjectId();
1306       bitField0_ = (bitField0_ & ~0x00000001);
1307       onChanged();
1308       return this;
1309     }
1310     /**
1311      *
1312      *
1313      * <pre>
1314      * ID of the project that owns the Cloud Source Repository. If omitted, the
1315      * project ID requesting the build is assumed.
1316      * </pre>
1317      *
1318      * <code>string project_id = 1;</code>
1319      *
1320      * @param value The bytes for projectId to set.
1321      * @return This builder for chaining.
1322      */
setProjectIdBytes(com.google.protobuf.ByteString value)1323     public Builder setProjectIdBytes(com.google.protobuf.ByteString value) {
1324       if (value == null) {
1325         throw new NullPointerException();
1326       }
1327       checkByteStringIsUtf8(value);
1328       projectId_ = value;
1329       bitField0_ |= 0x00000001;
1330       onChanged();
1331       return this;
1332     }
1333 
1334     private java.lang.Object repoName_ = "";
1335     /**
1336      *
1337      *
1338      * <pre>
1339      * Name of the Cloud Source Repository.
1340      * </pre>
1341      *
1342      * <code>string repo_name = 2;</code>
1343      *
1344      * @return The repoName.
1345      */
getRepoName()1346     public java.lang.String getRepoName() {
1347       java.lang.Object ref = repoName_;
1348       if (!(ref instanceof java.lang.String)) {
1349         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1350         java.lang.String s = bs.toStringUtf8();
1351         repoName_ = s;
1352         return s;
1353       } else {
1354         return (java.lang.String) ref;
1355       }
1356     }
1357     /**
1358      *
1359      *
1360      * <pre>
1361      * Name of the Cloud Source Repository.
1362      * </pre>
1363      *
1364      * <code>string repo_name = 2;</code>
1365      *
1366      * @return The bytes for repoName.
1367      */
getRepoNameBytes()1368     public com.google.protobuf.ByteString getRepoNameBytes() {
1369       java.lang.Object ref = repoName_;
1370       if (ref instanceof String) {
1371         com.google.protobuf.ByteString b =
1372             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1373         repoName_ = b;
1374         return b;
1375       } else {
1376         return (com.google.protobuf.ByteString) ref;
1377       }
1378     }
1379     /**
1380      *
1381      *
1382      * <pre>
1383      * Name of the Cloud Source Repository.
1384      * </pre>
1385      *
1386      * <code>string repo_name = 2;</code>
1387      *
1388      * @param value The repoName to set.
1389      * @return This builder for chaining.
1390      */
setRepoName(java.lang.String value)1391     public Builder setRepoName(java.lang.String value) {
1392       if (value == null) {
1393         throw new NullPointerException();
1394       }
1395       repoName_ = value;
1396       bitField0_ |= 0x00000002;
1397       onChanged();
1398       return this;
1399     }
1400     /**
1401      *
1402      *
1403      * <pre>
1404      * Name of the Cloud Source Repository.
1405      * </pre>
1406      *
1407      * <code>string repo_name = 2;</code>
1408      *
1409      * @return This builder for chaining.
1410      */
clearRepoName()1411     public Builder clearRepoName() {
1412       repoName_ = getDefaultInstance().getRepoName();
1413       bitField0_ = (bitField0_ & ~0x00000002);
1414       onChanged();
1415       return this;
1416     }
1417     /**
1418      *
1419      *
1420      * <pre>
1421      * Name of the Cloud Source Repository.
1422      * </pre>
1423      *
1424      * <code>string repo_name = 2;</code>
1425      *
1426      * @param value The bytes for repoName to set.
1427      * @return This builder for chaining.
1428      */
setRepoNameBytes(com.google.protobuf.ByteString value)1429     public Builder setRepoNameBytes(com.google.protobuf.ByteString value) {
1430       if (value == null) {
1431         throw new NullPointerException();
1432       }
1433       checkByteStringIsUtf8(value);
1434       repoName_ = value;
1435       bitField0_ |= 0x00000002;
1436       onChanged();
1437       return this;
1438     }
1439 
1440     /**
1441      *
1442      *
1443      * <pre>
1444      * Regex matching branches to build.
1445      * The syntax of the regular expressions accepted is the syntax accepted by
1446      * RE2 and described at https://github.com/google/re2/wiki/Syntax
1447      * </pre>
1448      *
1449      * <code>string branch_name = 3;</code>
1450      *
1451      * @return Whether the branchName field is set.
1452      */
1453     @java.lang.Override
hasBranchName()1454     public boolean hasBranchName() {
1455       return revisionCase_ == 3;
1456     }
1457     /**
1458      *
1459      *
1460      * <pre>
1461      * Regex matching branches to build.
1462      * The syntax of the regular expressions accepted is the syntax accepted by
1463      * RE2 and described at https://github.com/google/re2/wiki/Syntax
1464      * </pre>
1465      *
1466      * <code>string branch_name = 3;</code>
1467      *
1468      * @return The branchName.
1469      */
1470     @java.lang.Override
getBranchName()1471     public java.lang.String getBranchName() {
1472       java.lang.Object ref = "";
1473       if (revisionCase_ == 3) {
1474         ref = revision_;
1475       }
1476       if (!(ref instanceof java.lang.String)) {
1477         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1478         java.lang.String s = bs.toStringUtf8();
1479         if (revisionCase_ == 3) {
1480           revision_ = s;
1481         }
1482         return s;
1483       } else {
1484         return (java.lang.String) ref;
1485       }
1486     }
1487     /**
1488      *
1489      *
1490      * <pre>
1491      * Regex matching branches to build.
1492      * The syntax of the regular expressions accepted is the syntax accepted by
1493      * RE2 and described at https://github.com/google/re2/wiki/Syntax
1494      * </pre>
1495      *
1496      * <code>string branch_name = 3;</code>
1497      *
1498      * @return The bytes for branchName.
1499      */
1500     @java.lang.Override
getBranchNameBytes()1501     public com.google.protobuf.ByteString getBranchNameBytes() {
1502       java.lang.Object ref = "";
1503       if (revisionCase_ == 3) {
1504         ref = revision_;
1505       }
1506       if (ref instanceof String) {
1507         com.google.protobuf.ByteString b =
1508             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1509         if (revisionCase_ == 3) {
1510           revision_ = b;
1511         }
1512         return b;
1513       } else {
1514         return (com.google.protobuf.ByteString) ref;
1515       }
1516     }
1517     /**
1518      *
1519      *
1520      * <pre>
1521      * Regex matching branches to build.
1522      * The syntax of the regular expressions accepted is the syntax accepted by
1523      * RE2 and described at https://github.com/google/re2/wiki/Syntax
1524      * </pre>
1525      *
1526      * <code>string branch_name = 3;</code>
1527      *
1528      * @param value The branchName to set.
1529      * @return This builder for chaining.
1530      */
setBranchName(java.lang.String value)1531     public Builder setBranchName(java.lang.String value) {
1532       if (value == null) {
1533         throw new NullPointerException();
1534       }
1535       revisionCase_ = 3;
1536       revision_ = value;
1537       onChanged();
1538       return this;
1539     }
1540     /**
1541      *
1542      *
1543      * <pre>
1544      * Regex matching branches to build.
1545      * The syntax of the regular expressions accepted is the syntax accepted by
1546      * RE2 and described at https://github.com/google/re2/wiki/Syntax
1547      * </pre>
1548      *
1549      * <code>string branch_name = 3;</code>
1550      *
1551      * @return This builder for chaining.
1552      */
clearBranchName()1553     public Builder clearBranchName() {
1554       if (revisionCase_ == 3) {
1555         revisionCase_ = 0;
1556         revision_ = null;
1557         onChanged();
1558       }
1559       return this;
1560     }
1561     /**
1562      *
1563      *
1564      * <pre>
1565      * Regex matching branches to build.
1566      * The syntax of the regular expressions accepted is the syntax accepted by
1567      * RE2 and described at https://github.com/google/re2/wiki/Syntax
1568      * </pre>
1569      *
1570      * <code>string branch_name = 3;</code>
1571      *
1572      * @param value The bytes for branchName to set.
1573      * @return This builder for chaining.
1574      */
setBranchNameBytes(com.google.protobuf.ByteString value)1575     public Builder setBranchNameBytes(com.google.protobuf.ByteString value) {
1576       if (value == null) {
1577         throw new NullPointerException();
1578       }
1579       checkByteStringIsUtf8(value);
1580       revisionCase_ = 3;
1581       revision_ = value;
1582       onChanged();
1583       return this;
1584     }
1585 
1586     /**
1587      *
1588      *
1589      * <pre>
1590      * Regex matching tags to build.
1591      * The syntax of the regular expressions accepted is the syntax accepted by
1592      * RE2 and described at https://github.com/google/re2/wiki/Syntax
1593      * </pre>
1594      *
1595      * <code>string tag_name = 4;</code>
1596      *
1597      * @return Whether the tagName field is set.
1598      */
1599     @java.lang.Override
hasTagName()1600     public boolean hasTagName() {
1601       return revisionCase_ == 4;
1602     }
1603     /**
1604      *
1605      *
1606      * <pre>
1607      * Regex matching tags to build.
1608      * The syntax of the regular expressions accepted is the syntax accepted by
1609      * RE2 and described at https://github.com/google/re2/wiki/Syntax
1610      * </pre>
1611      *
1612      * <code>string tag_name = 4;</code>
1613      *
1614      * @return The tagName.
1615      */
1616     @java.lang.Override
getTagName()1617     public java.lang.String getTagName() {
1618       java.lang.Object ref = "";
1619       if (revisionCase_ == 4) {
1620         ref = revision_;
1621       }
1622       if (!(ref instanceof java.lang.String)) {
1623         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1624         java.lang.String s = bs.toStringUtf8();
1625         if (revisionCase_ == 4) {
1626           revision_ = s;
1627         }
1628         return s;
1629       } else {
1630         return (java.lang.String) ref;
1631       }
1632     }
1633     /**
1634      *
1635      *
1636      * <pre>
1637      * Regex matching tags to build.
1638      * The syntax of the regular expressions accepted is the syntax accepted by
1639      * RE2 and described at https://github.com/google/re2/wiki/Syntax
1640      * </pre>
1641      *
1642      * <code>string tag_name = 4;</code>
1643      *
1644      * @return The bytes for tagName.
1645      */
1646     @java.lang.Override
getTagNameBytes()1647     public com.google.protobuf.ByteString getTagNameBytes() {
1648       java.lang.Object ref = "";
1649       if (revisionCase_ == 4) {
1650         ref = revision_;
1651       }
1652       if (ref instanceof String) {
1653         com.google.protobuf.ByteString b =
1654             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1655         if (revisionCase_ == 4) {
1656           revision_ = b;
1657         }
1658         return b;
1659       } else {
1660         return (com.google.protobuf.ByteString) ref;
1661       }
1662     }
1663     /**
1664      *
1665      *
1666      * <pre>
1667      * Regex matching tags to build.
1668      * The syntax of the regular expressions accepted is the syntax accepted by
1669      * RE2 and described at https://github.com/google/re2/wiki/Syntax
1670      * </pre>
1671      *
1672      * <code>string tag_name = 4;</code>
1673      *
1674      * @param value The tagName to set.
1675      * @return This builder for chaining.
1676      */
setTagName(java.lang.String value)1677     public Builder setTagName(java.lang.String value) {
1678       if (value == null) {
1679         throw new NullPointerException();
1680       }
1681       revisionCase_ = 4;
1682       revision_ = value;
1683       onChanged();
1684       return this;
1685     }
1686     /**
1687      *
1688      *
1689      * <pre>
1690      * Regex matching tags to build.
1691      * The syntax of the regular expressions accepted is the syntax accepted by
1692      * RE2 and described at https://github.com/google/re2/wiki/Syntax
1693      * </pre>
1694      *
1695      * <code>string tag_name = 4;</code>
1696      *
1697      * @return This builder for chaining.
1698      */
clearTagName()1699     public Builder clearTagName() {
1700       if (revisionCase_ == 4) {
1701         revisionCase_ = 0;
1702         revision_ = null;
1703         onChanged();
1704       }
1705       return this;
1706     }
1707     /**
1708      *
1709      *
1710      * <pre>
1711      * Regex matching tags to build.
1712      * The syntax of the regular expressions accepted is the syntax accepted by
1713      * RE2 and described at https://github.com/google/re2/wiki/Syntax
1714      * </pre>
1715      *
1716      * <code>string tag_name = 4;</code>
1717      *
1718      * @param value The bytes for tagName to set.
1719      * @return This builder for chaining.
1720      */
setTagNameBytes(com.google.protobuf.ByteString value)1721     public Builder setTagNameBytes(com.google.protobuf.ByteString value) {
1722       if (value == null) {
1723         throw new NullPointerException();
1724       }
1725       checkByteStringIsUtf8(value);
1726       revisionCase_ = 4;
1727       revision_ = value;
1728       onChanged();
1729       return this;
1730     }
1731 
1732     /**
1733      *
1734      *
1735      * <pre>
1736      * Explicit commit SHA to build.
1737      * </pre>
1738      *
1739      * <code>string commit_sha = 5;</code>
1740      *
1741      * @return Whether the commitSha field is set.
1742      */
1743     @java.lang.Override
hasCommitSha()1744     public boolean hasCommitSha() {
1745       return revisionCase_ == 5;
1746     }
1747     /**
1748      *
1749      *
1750      * <pre>
1751      * Explicit commit SHA to build.
1752      * </pre>
1753      *
1754      * <code>string commit_sha = 5;</code>
1755      *
1756      * @return The commitSha.
1757      */
1758     @java.lang.Override
getCommitSha()1759     public java.lang.String getCommitSha() {
1760       java.lang.Object ref = "";
1761       if (revisionCase_ == 5) {
1762         ref = revision_;
1763       }
1764       if (!(ref instanceof java.lang.String)) {
1765         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1766         java.lang.String s = bs.toStringUtf8();
1767         if (revisionCase_ == 5) {
1768           revision_ = s;
1769         }
1770         return s;
1771       } else {
1772         return (java.lang.String) ref;
1773       }
1774     }
1775     /**
1776      *
1777      *
1778      * <pre>
1779      * Explicit commit SHA to build.
1780      * </pre>
1781      *
1782      * <code>string commit_sha = 5;</code>
1783      *
1784      * @return The bytes for commitSha.
1785      */
1786     @java.lang.Override
getCommitShaBytes()1787     public com.google.protobuf.ByteString getCommitShaBytes() {
1788       java.lang.Object ref = "";
1789       if (revisionCase_ == 5) {
1790         ref = revision_;
1791       }
1792       if (ref instanceof String) {
1793         com.google.protobuf.ByteString b =
1794             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1795         if (revisionCase_ == 5) {
1796           revision_ = b;
1797         }
1798         return b;
1799       } else {
1800         return (com.google.protobuf.ByteString) ref;
1801       }
1802     }
1803     /**
1804      *
1805      *
1806      * <pre>
1807      * Explicit commit SHA to build.
1808      * </pre>
1809      *
1810      * <code>string commit_sha = 5;</code>
1811      *
1812      * @param value The commitSha to set.
1813      * @return This builder for chaining.
1814      */
setCommitSha(java.lang.String value)1815     public Builder setCommitSha(java.lang.String value) {
1816       if (value == null) {
1817         throw new NullPointerException();
1818       }
1819       revisionCase_ = 5;
1820       revision_ = value;
1821       onChanged();
1822       return this;
1823     }
1824     /**
1825      *
1826      *
1827      * <pre>
1828      * Explicit commit SHA to build.
1829      * </pre>
1830      *
1831      * <code>string commit_sha = 5;</code>
1832      *
1833      * @return This builder for chaining.
1834      */
clearCommitSha()1835     public Builder clearCommitSha() {
1836       if (revisionCase_ == 5) {
1837         revisionCase_ = 0;
1838         revision_ = null;
1839         onChanged();
1840       }
1841       return this;
1842     }
1843     /**
1844      *
1845      *
1846      * <pre>
1847      * Explicit commit SHA to build.
1848      * </pre>
1849      *
1850      * <code>string commit_sha = 5;</code>
1851      *
1852      * @param value The bytes for commitSha to set.
1853      * @return This builder for chaining.
1854      */
setCommitShaBytes(com.google.protobuf.ByteString value)1855     public Builder setCommitShaBytes(com.google.protobuf.ByteString value) {
1856       if (value == null) {
1857         throw new NullPointerException();
1858       }
1859       checkByteStringIsUtf8(value);
1860       revisionCase_ = 5;
1861       revision_ = value;
1862       onChanged();
1863       return this;
1864     }
1865 
1866     private java.lang.Object dir_ = "";
1867     /**
1868      *
1869      *
1870      * <pre>
1871      * Directory, relative to the source root, in which to run the build.
1872      * This must be a relative path. If a step's `dir` is specified and is an
1873      * absolute path, this value is ignored for that step's execution.
1874      * </pre>
1875      *
1876      * <code>string dir = 7;</code>
1877      *
1878      * @return The dir.
1879      */
getDir()1880     public java.lang.String getDir() {
1881       java.lang.Object ref = dir_;
1882       if (!(ref instanceof java.lang.String)) {
1883         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1884         java.lang.String s = bs.toStringUtf8();
1885         dir_ = s;
1886         return s;
1887       } else {
1888         return (java.lang.String) ref;
1889       }
1890     }
1891     /**
1892      *
1893      *
1894      * <pre>
1895      * Directory, relative to the source root, in which to run the build.
1896      * This must be a relative path. If a step's `dir` is specified and is an
1897      * absolute path, this value is ignored for that step's execution.
1898      * </pre>
1899      *
1900      * <code>string dir = 7;</code>
1901      *
1902      * @return The bytes for dir.
1903      */
getDirBytes()1904     public com.google.protobuf.ByteString getDirBytes() {
1905       java.lang.Object ref = dir_;
1906       if (ref instanceof String) {
1907         com.google.protobuf.ByteString b =
1908             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1909         dir_ = b;
1910         return b;
1911       } else {
1912         return (com.google.protobuf.ByteString) ref;
1913       }
1914     }
1915     /**
1916      *
1917      *
1918      * <pre>
1919      * Directory, relative to the source root, in which to run the build.
1920      * This must be a relative path. If a step's `dir` is specified and is an
1921      * absolute path, this value is ignored for that step's execution.
1922      * </pre>
1923      *
1924      * <code>string dir = 7;</code>
1925      *
1926      * @param value The dir to set.
1927      * @return This builder for chaining.
1928      */
setDir(java.lang.String value)1929     public Builder setDir(java.lang.String value) {
1930       if (value == null) {
1931         throw new NullPointerException();
1932       }
1933       dir_ = value;
1934       bitField0_ |= 0x00000020;
1935       onChanged();
1936       return this;
1937     }
1938     /**
1939      *
1940      *
1941      * <pre>
1942      * Directory, relative to the source root, in which to run the build.
1943      * This must be a relative path. If a step's `dir` is specified and is an
1944      * absolute path, this value is ignored for that step's execution.
1945      * </pre>
1946      *
1947      * <code>string dir = 7;</code>
1948      *
1949      * @return This builder for chaining.
1950      */
clearDir()1951     public Builder clearDir() {
1952       dir_ = getDefaultInstance().getDir();
1953       bitField0_ = (bitField0_ & ~0x00000020);
1954       onChanged();
1955       return this;
1956     }
1957     /**
1958      *
1959      *
1960      * <pre>
1961      * Directory, relative to the source root, in which to run the build.
1962      * This must be a relative path. If a step's `dir` is specified and is an
1963      * absolute path, this value is ignored for that step's execution.
1964      * </pre>
1965      *
1966      * <code>string dir = 7;</code>
1967      *
1968      * @param value The bytes for dir to set.
1969      * @return This builder for chaining.
1970      */
setDirBytes(com.google.protobuf.ByteString value)1971     public Builder setDirBytes(com.google.protobuf.ByteString value) {
1972       if (value == null) {
1973         throw new NullPointerException();
1974       }
1975       checkByteStringIsUtf8(value);
1976       dir_ = value;
1977       bitField0_ |= 0x00000020;
1978       onChanged();
1979       return this;
1980     }
1981 
1982     private boolean invertRegex_;
1983     /**
1984      *
1985      *
1986      * <pre>
1987      * Only trigger a build if the revision regex does NOT match the revision
1988      * regex.
1989      * </pre>
1990      *
1991      * <code>bool invert_regex = 8;</code>
1992      *
1993      * @return The invertRegex.
1994      */
1995     @java.lang.Override
getInvertRegex()1996     public boolean getInvertRegex() {
1997       return invertRegex_;
1998     }
1999     /**
2000      *
2001      *
2002      * <pre>
2003      * Only trigger a build if the revision regex does NOT match the revision
2004      * regex.
2005      * </pre>
2006      *
2007      * <code>bool invert_regex = 8;</code>
2008      *
2009      * @param value The invertRegex to set.
2010      * @return This builder for chaining.
2011      */
setInvertRegex(boolean value)2012     public Builder setInvertRegex(boolean value) {
2013 
2014       invertRegex_ = value;
2015       bitField0_ |= 0x00000040;
2016       onChanged();
2017       return this;
2018     }
2019     /**
2020      *
2021      *
2022      * <pre>
2023      * Only trigger a build if the revision regex does NOT match the revision
2024      * regex.
2025      * </pre>
2026      *
2027      * <code>bool invert_regex = 8;</code>
2028      *
2029      * @return This builder for chaining.
2030      */
clearInvertRegex()2031     public Builder clearInvertRegex() {
2032       bitField0_ = (bitField0_ & ~0x00000040);
2033       invertRegex_ = false;
2034       onChanged();
2035       return this;
2036     }
2037 
2038     private com.google.protobuf.MapField<java.lang.String, java.lang.String> substitutions_;
2039 
2040     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetSubstitutions()2041         internalGetSubstitutions() {
2042       if (substitutions_ == null) {
2043         return com.google.protobuf.MapField.emptyMapField(
2044             SubstitutionsDefaultEntryHolder.defaultEntry);
2045       }
2046       return substitutions_;
2047     }
2048 
2049     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableSubstitutions()2050         internalGetMutableSubstitutions() {
2051       if (substitutions_ == null) {
2052         substitutions_ =
2053             com.google.protobuf.MapField.newMapField(SubstitutionsDefaultEntryHolder.defaultEntry);
2054       }
2055       if (!substitutions_.isMutable()) {
2056         substitutions_ = substitutions_.copy();
2057       }
2058       bitField0_ |= 0x00000080;
2059       onChanged();
2060       return substitutions_;
2061     }
2062 
getSubstitutionsCount()2063     public int getSubstitutionsCount() {
2064       return internalGetSubstitutions().getMap().size();
2065     }
2066     /**
2067      *
2068      *
2069      * <pre>
2070      * Substitutions to use in a triggered build.
2071      * Should only be used with RunBuildTrigger
2072      * </pre>
2073      *
2074      * <code>map&lt;string, string&gt; substitutions = 9;</code>
2075      */
2076     @java.lang.Override
containsSubstitutions(java.lang.String key)2077     public boolean containsSubstitutions(java.lang.String key) {
2078       if (key == null) {
2079         throw new NullPointerException("map key");
2080       }
2081       return internalGetSubstitutions().getMap().containsKey(key);
2082     }
2083     /** Use {@link #getSubstitutionsMap()} instead. */
2084     @java.lang.Override
2085     @java.lang.Deprecated
getSubstitutions()2086     public java.util.Map<java.lang.String, java.lang.String> getSubstitutions() {
2087       return getSubstitutionsMap();
2088     }
2089     /**
2090      *
2091      *
2092      * <pre>
2093      * Substitutions to use in a triggered build.
2094      * Should only be used with RunBuildTrigger
2095      * </pre>
2096      *
2097      * <code>map&lt;string, string&gt; substitutions = 9;</code>
2098      */
2099     @java.lang.Override
getSubstitutionsMap()2100     public java.util.Map<java.lang.String, java.lang.String> getSubstitutionsMap() {
2101       return internalGetSubstitutions().getMap();
2102     }
2103     /**
2104      *
2105      *
2106      * <pre>
2107      * Substitutions to use in a triggered build.
2108      * Should only be used with RunBuildTrigger
2109      * </pre>
2110      *
2111      * <code>map&lt;string, string&gt; substitutions = 9;</code>
2112      */
2113     @java.lang.Override
getSubstitutionsOrDefault( java.lang.String key, java.lang.String defaultValue)2114     public /* nullable */ java.lang.String getSubstitutionsOrDefault(
2115         java.lang.String key,
2116         /* nullable */
2117         java.lang.String defaultValue) {
2118       if (key == null) {
2119         throw new NullPointerException("map key");
2120       }
2121       java.util.Map<java.lang.String, java.lang.String> map = internalGetSubstitutions().getMap();
2122       return map.containsKey(key) ? map.get(key) : defaultValue;
2123     }
2124     /**
2125      *
2126      *
2127      * <pre>
2128      * Substitutions to use in a triggered build.
2129      * Should only be used with RunBuildTrigger
2130      * </pre>
2131      *
2132      * <code>map&lt;string, string&gt; substitutions = 9;</code>
2133      */
2134     @java.lang.Override
getSubstitutionsOrThrow(java.lang.String key)2135     public java.lang.String getSubstitutionsOrThrow(java.lang.String key) {
2136       if (key == null) {
2137         throw new NullPointerException("map key");
2138       }
2139       java.util.Map<java.lang.String, java.lang.String> map = internalGetSubstitutions().getMap();
2140       if (!map.containsKey(key)) {
2141         throw new java.lang.IllegalArgumentException();
2142       }
2143       return map.get(key);
2144     }
2145 
clearSubstitutions()2146     public Builder clearSubstitutions() {
2147       bitField0_ = (bitField0_ & ~0x00000080);
2148       internalGetMutableSubstitutions().getMutableMap().clear();
2149       return this;
2150     }
2151     /**
2152      *
2153      *
2154      * <pre>
2155      * Substitutions to use in a triggered build.
2156      * Should only be used with RunBuildTrigger
2157      * </pre>
2158      *
2159      * <code>map&lt;string, string&gt; substitutions = 9;</code>
2160      */
removeSubstitutions(java.lang.String key)2161     public Builder removeSubstitutions(java.lang.String key) {
2162       if (key == null) {
2163         throw new NullPointerException("map key");
2164       }
2165       internalGetMutableSubstitutions().getMutableMap().remove(key);
2166       return this;
2167     }
2168     /** Use alternate mutation accessors instead. */
2169     @java.lang.Deprecated
getMutableSubstitutions()2170     public java.util.Map<java.lang.String, java.lang.String> getMutableSubstitutions() {
2171       bitField0_ |= 0x00000080;
2172       return internalGetMutableSubstitutions().getMutableMap();
2173     }
2174     /**
2175      *
2176      *
2177      * <pre>
2178      * Substitutions to use in a triggered build.
2179      * Should only be used with RunBuildTrigger
2180      * </pre>
2181      *
2182      * <code>map&lt;string, string&gt; substitutions = 9;</code>
2183      */
putSubstitutions(java.lang.String key, java.lang.String value)2184     public Builder putSubstitutions(java.lang.String key, java.lang.String value) {
2185       if (key == null) {
2186         throw new NullPointerException("map key");
2187       }
2188       if (value == null) {
2189         throw new NullPointerException("map value");
2190       }
2191       internalGetMutableSubstitutions().getMutableMap().put(key, value);
2192       bitField0_ |= 0x00000080;
2193       return this;
2194     }
2195     /**
2196      *
2197      *
2198      * <pre>
2199      * Substitutions to use in a triggered build.
2200      * Should only be used with RunBuildTrigger
2201      * </pre>
2202      *
2203      * <code>map&lt;string, string&gt; substitutions = 9;</code>
2204      */
putAllSubstitutions(java.util.Map<java.lang.String, java.lang.String> values)2205     public Builder putAllSubstitutions(java.util.Map<java.lang.String, java.lang.String> values) {
2206       internalGetMutableSubstitutions().getMutableMap().putAll(values);
2207       bitField0_ |= 0x00000080;
2208       return this;
2209     }
2210 
2211     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2212     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
2213       return super.setUnknownFields(unknownFields);
2214     }
2215 
2216     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2217     public final Builder mergeUnknownFields(
2218         final com.google.protobuf.UnknownFieldSet unknownFields) {
2219       return super.mergeUnknownFields(unknownFields);
2220     }
2221 
2222     // @@protoc_insertion_point(builder_scope:google.devtools.cloudbuild.v1.RepoSource)
2223   }
2224 
2225   // @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.RepoSource)
2226   private static final com.google.cloudbuild.v1.RepoSource DEFAULT_INSTANCE;
2227 
2228   static {
2229     DEFAULT_INSTANCE = new com.google.cloudbuild.v1.RepoSource();
2230   }
2231 
getDefaultInstance()2232   public static com.google.cloudbuild.v1.RepoSource getDefaultInstance() {
2233     return DEFAULT_INSTANCE;
2234   }
2235 
2236   private static final com.google.protobuf.Parser<RepoSource> PARSER =
2237       new com.google.protobuf.AbstractParser<RepoSource>() {
2238         @java.lang.Override
2239         public RepoSource parsePartialFrom(
2240             com.google.protobuf.CodedInputStream input,
2241             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2242             throws com.google.protobuf.InvalidProtocolBufferException {
2243           Builder builder = newBuilder();
2244           try {
2245             builder.mergeFrom(input, extensionRegistry);
2246           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2247             throw e.setUnfinishedMessage(builder.buildPartial());
2248           } catch (com.google.protobuf.UninitializedMessageException e) {
2249             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2250           } catch (java.io.IOException e) {
2251             throw new com.google.protobuf.InvalidProtocolBufferException(e)
2252                 .setUnfinishedMessage(builder.buildPartial());
2253           }
2254           return builder.buildPartial();
2255         }
2256       };
2257 
parser()2258   public static com.google.protobuf.Parser<RepoSource> parser() {
2259     return PARSER;
2260   }
2261 
2262   @java.lang.Override
getParserForType()2263   public com.google.protobuf.Parser<RepoSource> getParserForType() {
2264     return PARSER;
2265   }
2266 
2267   @java.lang.Override
getDefaultInstanceForType()2268   public com.google.cloudbuild.v1.RepoSource getDefaultInstanceForType() {
2269     return DEFAULT_INSTANCE;
2270   }
2271 }
2272