• 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  * Configuration for an automated build in response to source repository
26  * changes.
27  * </pre>
28  *
29  * Protobuf type {@code google.devtools.cloudbuild.v1.BuildTrigger}
30  */
31 public final class BuildTrigger extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.devtools.cloudbuild.v1.BuildTrigger)
34     BuildTriggerOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use BuildTrigger.newBuilder() to construct.
BuildTrigger(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private BuildTrigger(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
BuildTrigger()41   private BuildTrigger() {
42     resourceName_ = "";
43     id_ = "";
44     description_ = "";
45     name_ = "";
46     tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
47     ignoredFiles_ = com.google.protobuf.LazyStringArrayList.EMPTY;
48     includedFiles_ = com.google.protobuf.LazyStringArrayList.EMPTY;
49     filter_ = "";
50     serviceAccount_ = "";
51   }
52 
53   @java.lang.Override
54   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)55   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
56     return new BuildTrigger();
57   }
58 
59   @java.lang.Override
getUnknownFields()60   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
61     return this.unknownFields;
62   }
63 
getDescriptor()64   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
65     return com.google.cloudbuild.v1.Cloudbuild
66         .internal_static_google_devtools_cloudbuild_v1_BuildTrigger_descriptor;
67   }
68 
69   @SuppressWarnings({"rawtypes"})
70   @java.lang.Override
internalGetMapField(int number)71   protected com.google.protobuf.MapField internalGetMapField(int number) {
72     switch (number) {
73       case 11:
74         return internalGetSubstitutions();
75       default:
76         throw new RuntimeException("Invalid map field number: " + number);
77     }
78   }
79 
80   @java.lang.Override
81   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()82       internalGetFieldAccessorTable() {
83     return com.google.cloudbuild.v1.Cloudbuild
84         .internal_static_google_devtools_cloudbuild_v1_BuildTrigger_fieldAccessorTable
85         .ensureFieldAccessorsInitialized(
86             com.google.cloudbuild.v1.BuildTrigger.class,
87             com.google.cloudbuild.v1.BuildTrigger.Builder.class);
88   }
89 
90   private int buildTemplateCase_ = 0;
91   private java.lang.Object buildTemplate_;
92 
93   public enum BuildTemplateCase
94       implements
95           com.google.protobuf.Internal.EnumLite,
96           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
97     AUTODETECT(18),
98     BUILD(4),
99     FILENAME(8),
100     BUILDTEMPLATE_NOT_SET(0);
101     private final int value;
102 
BuildTemplateCase(int value)103     private BuildTemplateCase(int value) {
104       this.value = value;
105     }
106     /**
107      * @param value The number of the enum to look for.
108      * @return The enum associated with the given number.
109      * @deprecated Use {@link #forNumber(int)} instead.
110      */
111     @java.lang.Deprecated
valueOf(int value)112     public static BuildTemplateCase valueOf(int value) {
113       return forNumber(value);
114     }
115 
forNumber(int value)116     public static BuildTemplateCase forNumber(int value) {
117       switch (value) {
118         case 18:
119           return AUTODETECT;
120         case 4:
121           return BUILD;
122         case 8:
123           return FILENAME;
124         case 0:
125           return BUILDTEMPLATE_NOT_SET;
126         default:
127           return null;
128       }
129     }
130 
getNumber()131     public int getNumber() {
132       return this.value;
133     }
134   };
135 
getBuildTemplateCase()136   public BuildTemplateCase getBuildTemplateCase() {
137     return BuildTemplateCase.forNumber(buildTemplateCase_);
138   }
139 
140   public static final int RESOURCE_NAME_FIELD_NUMBER = 34;
141 
142   @SuppressWarnings("serial")
143   private volatile java.lang.Object resourceName_ = "";
144   /**
145    *
146    *
147    * <pre>
148    * The `Trigger` name with format:
149    * `projects/{project}/locations/{location}/triggers/{trigger}`, where
150    * {trigger} is a unique identifier generated by the service.
151    * </pre>
152    *
153    * <code>string resource_name = 34;</code>
154    *
155    * @return The resourceName.
156    */
157   @java.lang.Override
getResourceName()158   public java.lang.String getResourceName() {
159     java.lang.Object ref = resourceName_;
160     if (ref instanceof java.lang.String) {
161       return (java.lang.String) ref;
162     } else {
163       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
164       java.lang.String s = bs.toStringUtf8();
165       resourceName_ = s;
166       return s;
167     }
168   }
169   /**
170    *
171    *
172    * <pre>
173    * The `Trigger` name with format:
174    * `projects/{project}/locations/{location}/triggers/{trigger}`, where
175    * {trigger} is a unique identifier generated by the service.
176    * </pre>
177    *
178    * <code>string resource_name = 34;</code>
179    *
180    * @return The bytes for resourceName.
181    */
182   @java.lang.Override
getResourceNameBytes()183   public com.google.protobuf.ByteString getResourceNameBytes() {
184     java.lang.Object ref = resourceName_;
185     if (ref instanceof java.lang.String) {
186       com.google.protobuf.ByteString b =
187           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
188       resourceName_ = b;
189       return b;
190     } else {
191       return (com.google.protobuf.ByteString) ref;
192     }
193   }
194 
195   public static final int ID_FIELD_NUMBER = 1;
196 
197   @SuppressWarnings("serial")
198   private volatile java.lang.Object id_ = "";
199   /**
200    *
201    *
202    * <pre>
203    * Output only. Unique identifier of the trigger.
204    * </pre>
205    *
206    * <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
207    *
208    * @return The id.
209    */
210   @java.lang.Override
getId()211   public java.lang.String getId() {
212     java.lang.Object ref = id_;
213     if (ref instanceof java.lang.String) {
214       return (java.lang.String) ref;
215     } else {
216       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
217       java.lang.String s = bs.toStringUtf8();
218       id_ = s;
219       return s;
220     }
221   }
222   /**
223    *
224    *
225    * <pre>
226    * Output only. Unique identifier of the trigger.
227    * </pre>
228    *
229    * <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
230    *
231    * @return The bytes for id.
232    */
233   @java.lang.Override
getIdBytes()234   public com.google.protobuf.ByteString getIdBytes() {
235     java.lang.Object ref = id_;
236     if (ref instanceof java.lang.String) {
237       com.google.protobuf.ByteString b =
238           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
239       id_ = b;
240       return b;
241     } else {
242       return (com.google.protobuf.ByteString) ref;
243     }
244   }
245 
246   public static final int DESCRIPTION_FIELD_NUMBER = 10;
247 
248   @SuppressWarnings("serial")
249   private volatile java.lang.Object description_ = "";
250   /**
251    *
252    *
253    * <pre>
254    * Human-readable description of this trigger.
255    * </pre>
256    *
257    * <code>string description = 10;</code>
258    *
259    * @return The description.
260    */
261   @java.lang.Override
getDescription()262   public java.lang.String getDescription() {
263     java.lang.Object ref = description_;
264     if (ref instanceof java.lang.String) {
265       return (java.lang.String) ref;
266     } else {
267       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
268       java.lang.String s = bs.toStringUtf8();
269       description_ = s;
270       return s;
271     }
272   }
273   /**
274    *
275    *
276    * <pre>
277    * Human-readable description of this trigger.
278    * </pre>
279    *
280    * <code>string description = 10;</code>
281    *
282    * @return The bytes for description.
283    */
284   @java.lang.Override
getDescriptionBytes()285   public com.google.protobuf.ByteString getDescriptionBytes() {
286     java.lang.Object ref = description_;
287     if (ref instanceof java.lang.String) {
288       com.google.protobuf.ByteString b =
289           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
290       description_ = b;
291       return b;
292     } else {
293       return (com.google.protobuf.ByteString) ref;
294     }
295   }
296 
297   public static final int NAME_FIELD_NUMBER = 21;
298 
299   @SuppressWarnings("serial")
300   private volatile java.lang.Object name_ = "";
301   /**
302    *
303    *
304    * <pre>
305    * User-assigned name of the trigger. Must be unique within the project.
306    * Trigger names must meet the following requirements:
307    * + They must contain only alphanumeric characters and dashes.
308    * + They can be 1-64 characters long.
309    * + They must begin and end with an alphanumeric character.
310    * </pre>
311    *
312    * <code>string name = 21;</code>
313    *
314    * @return The name.
315    */
316   @java.lang.Override
getName()317   public java.lang.String getName() {
318     java.lang.Object ref = name_;
319     if (ref instanceof java.lang.String) {
320       return (java.lang.String) ref;
321     } else {
322       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
323       java.lang.String s = bs.toStringUtf8();
324       name_ = s;
325       return s;
326     }
327   }
328   /**
329    *
330    *
331    * <pre>
332    * User-assigned name of the trigger. Must be unique within the project.
333    * Trigger names must meet the following requirements:
334    * + They must contain only alphanumeric characters and dashes.
335    * + They can be 1-64 characters long.
336    * + They must begin and end with an alphanumeric character.
337    * </pre>
338    *
339    * <code>string name = 21;</code>
340    *
341    * @return The bytes for name.
342    */
343   @java.lang.Override
getNameBytes()344   public com.google.protobuf.ByteString getNameBytes() {
345     java.lang.Object ref = name_;
346     if (ref instanceof java.lang.String) {
347       com.google.protobuf.ByteString b =
348           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
349       name_ = b;
350       return b;
351     } else {
352       return (com.google.protobuf.ByteString) ref;
353     }
354   }
355 
356   public static final int TAGS_FIELD_NUMBER = 19;
357 
358   @SuppressWarnings("serial")
359   private com.google.protobuf.LazyStringList tags_;
360   /**
361    *
362    *
363    * <pre>
364    * Tags for annotation of a `BuildTrigger`
365    * </pre>
366    *
367    * <code>repeated string tags = 19;</code>
368    *
369    * @return A list containing the tags.
370    */
getTagsList()371   public com.google.protobuf.ProtocolStringList getTagsList() {
372     return tags_;
373   }
374   /**
375    *
376    *
377    * <pre>
378    * Tags for annotation of a `BuildTrigger`
379    * </pre>
380    *
381    * <code>repeated string tags = 19;</code>
382    *
383    * @return The count of tags.
384    */
getTagsCount()385   public int getTagsCount() {
386     return tags_.size();
387   }
388   /**
389    *
390    *
391    * <pre>
392    * Tags for annotation of a `BuildTrigger`
393    * </pre>
394    *
395    * <code>repeated string tags = 19;</code>
396    *
397    * @param index The index of the element to return.
398    * @return The tags at the given index.
399    */
getTags(int index)400   public java.lang.String getTags(int index) {
401     return tags_.get(index);
402   }
403   /**
404    *
405    *
406    * <pre>
407    * Tags for annotation of a `BuildTrigger`
408    * </pre>
409    *
410    * <code>repeated string tags = 19;</code>
411    *
412    * @param index The index of the value to return.
413    * @return The bytes of the tags at the given index.
414    */
getTagsBytes(int index)415   public com.google.protobuf.ByteString getTagsBytes(int index) {
416     return tags_.getByteString(index);
417   }
418 
419   public static final int TRIGGER_TEMPLATE_FIELD_NUMBER = 7;
420   private com.google.cloudbuild.v1.RepoSource triggerTemplate_;
421   /**
422    *
423    *
424    * <pre>
425    * Template describing the types of source changes to trigger a build.
426    * Branch and tag names in trigger templates are interpreted as regular
427    * expressions. Any branch or tag change that matches that regular expression
428    * will trigger a build.
429    * Mutually exclusive with `github`.
430    * </pre>
431    *
432    * <code>.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;</code>
433    *
434    * @return Whether the triggerTemplate field is set.
435    */
436   @java.lang.Override
hasTriggerTemplate()437   public boolean hasTriggerTemplate() {
438     return triggerTemplate_ != null;
439   }
440   /**
441    *
442    *
443    * <pre>
444    * Template describing the types of source changes to trigger a build.
445    * Branch and tag names in trigger templates are interpreted as regular
446    * expressions. Any branch or tag change that matches that regular expression
447    * will trigger a build.
448    * Mutually exclusive with `github`.
449    * </pre>
450    *
451    * <code>.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;</code>
452    *
453    * @return The triggerTemplate.
454    */
455   @java.lang.Override
getTriggerTemplate()456   public com.google.cloudbuild.v1.RepoSource getTriggerTemplate() {
457     return triggerTemplate_ == null
458         ? com.google.cloudbuild.v1.RepoSource.getDefaultInstance()
459         : triggerTemplate_;
460   }
461   /**
462    *
463    *
464    * <pre>
465    * Template describing the types of source changes to trigger a build.
466    * Branch and tag names in trigger templates are interpreted as regular
467    * expressions. Any branch or tag change that matches that regular expression
468    * will trigger a build.
469    * Mutually exclusive with `github`.
470    * </pre>
471    *
472    * <code>.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;</code>
473    */
474   @java.lang.Override
getTriggerTemplateOrBuilder()475   public com.google.cloudbuild.v1.RepoSourceOrBuilder getTriggerTemplateOrBuilder() {
476     return triggerTemplate_ == null
477         ? com.google.cloudbuild.v1.RepoSource.getDefaultInstance()
478         : triggerTemplate_;
479   }
480 
481   public static final int GITHUB_FIELD_NUMBER = 13;
482   private com.google.cloudbuild.v1.GitHubEventsConfig github_;
483   /**
484    *
485    *
486    * <pre>
487    * GitHubEventsConfig describes the configuration of a trigger that creates
488    * a build whenever a GitHub event is received.
489    * Mutually exclusive with `trigger_template`.
490    * </pre>
491    *
492    * <code>.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;</code>
493    *
494    * @return Whether the github field is set.
495    */
496   @java.lang.Override
hasGithub()497   public boolean hasGithub() {
498     return github_ != null;
499   }
500   /**
501    *
502    *
503    * <pre>
504    * GitHubEventsConfig describes the configuration of a trigger that creates
505    * a build whenever a GitHub event is received.
506    * Mutually exclusive with `trigger_template`.
507    * </pre>
508    *
509    * <code>.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;</code>
510    *
511    * @return The github.
512    */
513   @java.lang.Override
getGithub()514   public com.google.cloudbuild.v1.GitHubEventsConfig getGithub() {
515     return github_ == null
516         ? com.google.cloudbuild.v1.GitHubEventsConfig.getDefaultInstance()
517         : github_;
518   }
519   /**
520    *
521    *
522    * <pre>
523    * GitHubEventsConfig describes the configuration of a trigger that creates
524    * a build whenever a GitHub event is received.
525    * Mutually exclusive with `trigger_template`.
526    * </pre>
527    *
528    * <code>.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;</code>
529    */
530   @java.lang.Override
getGithubOrBuilder()531   public com.google.cloudbuild.v1.GitHubEventsConfigOrBuilder getGithubOrBuilder() {
532     return github_ == null
533         ? com.google.cloudbuild.v1.GitHubEventsConfig.getDefaultInstance()
534         : github_;
535   }
536 
537   public static final int PUBSUB_CONFIG_FIELD_NUMBER = 29;
538   private com.google.cloudbuild.v1.PubsubConfig pubsubConfig_;
539   /**
540    *
541    *
542    * <pre>
543    * PubsubConfig describes the configuration of a trigger that
544    * creates a build whenever a Pub/Sub message is published.
545    * </pre>
546    *
547    * <code>.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;</code>
548    *
549    * @return Whether the pubsubConfig field is set.
550    */
551   @java.lang.Override
hasPubsubConfig()552   public boolean hasPubsubConfig() {
553     return pubsubConfig_ != null;
554   }
555   /**
556    *
557    *
558    * <pre>
559    * PubsubConfig describes the configuration of a trigger that
560    * creates a build whenever a Pub/Sub message is published.
561    * </pre>
562    *
563    * <code>.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;</code>
564    *
565    * @return The pubsubConfig.
566    */
567   @java.lang.Override
getPubsubConfig()568   public com.google.cloudbuild.v1.PubsubConfig getPubsubConfig() {
569     return pubsubConfig_ == null
570         ? com.google.cloudbuild.v1.PubsubConfig.getDefaultInstance()
571         : pubsubConfig_;
572   }
573   /**
574    *
575    *
576    * <pre>
577    * PubsubConfig describes the configuration of a trigger that
578    * creates a build whenever a Pub/Sub message is published.
579    * </pre>
580    *
581    * <code>.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;</code>
582    */
583   @java.lang.Override
getPubsubConfigOrBuilder()584   public com.google.cloudbuild.v1.PubsubConfigOrBuilder getPubsubConfigOrBuilder() {
585     return pubsubConfig_ == null
586         ? com.google.cloudbuild.v1.PubsubConfig.getDefaultInstance()
587         : pubsubConfig_;
588   }
589 
590   public static final int WEBHOOK_CONFIG_FIELD_NUMBER = 31;
591   private com.google.cloudbuild.v1.WebhookConfig webhookConfig_;
592   /**
593    *
594    *
595    * <pre>
596    * WebhookConfig describes the configuration of a trigger that
597    * creates a build whenever a webhook is sent to a trigger's webhook URL.
598    * </pre>
599    *
600    * <code>.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;</code>
601    *
602    * @return Whether the webhookConfig field is set.
603    */
604   @java.lang.Override
hasWebhookConfig()605   public boolean hasWebhookConfig() {
606     return webhookConfig_ != null;
607   }
608   /**
609    *
610    *
611    * <pre>
612    * WebhookConfig describes the configuration of a trigger that
613    * creates a build whenever a webhook is sent to a trigger's webhook URL.
614    * </pre>
615    *
616    * <code>.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;</code>
617    *
618    * @return The webhookConfig.
619    */
620   @java.lang.Override
getWebhookConfig()621   public com.google.cloudbuild.v1.WebhookConfig getWebhookConfig() {
622     return webhookConfig_ == null
623         ? com.google.cloudbuild.v1.WebhookConfig.getDefaultInstance()
624         : webhookConfig_;
625   }
626   /**
627    *
628    *
629    * <pre>
630    * WebhookConfig describes the configuration of a trigger that
631    * creates a build whenever a webhook is sent to a trigger's webhook URL.
632    * </pre>
633    *
634    * <code>.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;</code>
635    */
636   @java.lang.Override
getWebhookConfigOrBuilder()637   public com.google.cloudbuild.v1.WebhookConfigOrBuilder getWebhookConfigOrBuilder() {
638     return webhookConfig_ == null
639         ? com.google.cloudbuild.v1.WebhookConfig.getDefaultInstance()
640         : webhookConfig_;
641   }
642 
643   public static final int AUTODETECT_FIELD_NUMBER = 18;
644   /**
645    *
646    *
647    * <pre>
648    * Autodetect build configuration.  The following precedence is used (case
649    * insensitive):
650    * 1. cloudbuild.yaml
651    * 2. cloudbuild.yml
652    * 3. cloudbuild.json
653    * 4. Dockerfile
654    * Currently only available for GitHub App Triggers.
655    * </pre>
656    *
657    * <code>bool autodetect = 18;</code>
658    *
659    * @return Whether the autodetect field is set.
660    */
661   @java.lang.Override
hasAutodetect()662   public boolean hasAutodetect() {
663     return buildTemplateCase_ == 18;
664   }
665   /**
666    *
667    *
668    * <pre>
669    * Autodetect build configuration.  The following precedence is used (case
670    * insensitive):
671    * 1. cloudbuild.yaml
672    * 2. cloudbuild.yml
673    * 3. cloudbuild.json
674    * 4. Dockerfile
675    * Currently only available for GitHub App Triggers.
676    * </pre>
677    *
678    * <code>bool autodetect = 18;</code>
679    *
680    * @return The autodetect.
681    */
682   @java.lang.Override
getAutodetect()683   public boolean getAutodetect() {
684     if (buildTemplateCase_ == 18) {
685       return (java.lang.Boolean) buildTemplate_;
686     }
687     return false;
688   }
689 
690   public static final int BUILD_FIELD_NUMBER = 4;
691   /**
692    *
693    *
694    * <pre>
695    * Contents of the build template.
696    * </pre>
697    *
698    * <code>.google.devtools.cloudbuild.v1.Build build = 4;</code>
699    *
700    * @return Whether the build field is set.
701    */
702   @java.lang.Override
hasBuild()703   public boolean hasBuild() {
704     return buildTemplateCase_ == 4;
705   }
706   /**
707    *
708    *
709    * <pre>
710    * Contents of the build template.
711    * </pre>
712    *
713    * <code>.google.devtools.cloudbuild.v1.Build build = 4;</code>
714    *
715    * @return The build.
716    */
717   @java.lang.Override
getBuild()718   public com.google.cloudbuild.v1.Build getBuild() {
719     if (buildTemplateCase_ == 4) {
720       return (com.google.cloudbuild.v1.Build) buildTemplate_;
721     }
722     return com.google.cloudbuild.v1.Build.getDefaultInstance();
723   }
724   /**
725    *
726    *
727    * <pre>
728    * Contents of the build template.
729    * </pre>
730    *
731    * <code>.google.devtools.cloudbuild.v1.Build build = 4;</code>
732    */
733   @java.lang.Override
getBuildOrBuilder()734   public com.google.cloudbuild.v1.BuildOrBuilder getBuildOrBuilder() {
735     if (buildTemplateCase_ == 4) {
736       return (com.google.cloudbuild.v1.Build) buildTemplate_;
737     }
738     return com.google.cloudbuild.v1.Build.getDefaultInstance();
739   }
740 
741   public static final int FILENAME_FIELD_NUMBER = 8;
742   /**
743    *
744    *
745    * <pre>
746    * Path, from the source root, to the build configuration file
747    * (i.e. cloudbuild.yaml).
748    * </pre>
749    *
750    * <code>string filename = 8;</code>
751    *
752    * @return Whether the filename field is set.
753    */
hasFilename()754   public boolean hasFilename() {
755     return buildTemplateCase_ == 8;
756   }
757   /**
758    *
759    *
760    * <pre>
761    * Path, from the source root, to the build configuration file
762    * (i.e. cloudbuild.yaml).
763    * </pre>
764    *
765    * <code>string filename = 8;</code>
766    *
767    * @return The filename.
768    */
getFilename()769   public java.lang.String getFilename() {
770     java.lang.Object ref = "";
771     if (buildTemplateCase_ == 8) {
772       ref = buildTemplate_;
773     }
774     if (ref instanceof java.lang.String) {
775       return (java.lang.String) ref;
776     } else {
777       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
778       java.lang.String s = bs.toStringUtf8();
779       if (buildTemplateCase_ == 8) {
780         buildTemplate_ = s;
781       }
782       return s;
783     }
784   }
785   /**
786    *
787    *
788    * <pre>
789    * Path, from the source root, to the build configuration file
790    * (i.e. cloudbuild.yaml).
791    * </pre>
792    *
793    * <code>string filename = 8;</code>
794    *
795    * @return The bytes for filename.
796    */
getFilenameBytes()797   public com.google.protobuf.ByteString getFilenameBytes() {
798     java.lang.Object ref = "";
799     if (buildTemplateCase_ == 8) {
800       ref = buildTemplate_;
801     }
802     if (ref instanceof java.lang.String) {
803       com.google.protobuf.ByteString b =
804           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
805       if (buildTemplateCase_ == 8) {
806         buildTemplate_ = b;
807       }
808       return b;
809     } else {
810       return (com.google.protobuf.ByteString) ref;
811     }
812   }
813 
814   public static final int CREATE_TIME_FIELD_NUMBER = 5;
815   private com.google.protobuf.Timestamp createTime_;
816   /**
817    *
818    *
819    * <pre>
820    * Output only. Time when the trigger was created.
821    * </pre>
822    *
823    * <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
824    * </code>
825    *
826    * @return Whether the createTime field is set.
827    */
828   @java.lang.Override
hasCreateTime()829   public boolean hasCreateTime() {
830     return createTime_ != null;
831   }
832   /**
833    *
834    *
835    * <pre>
836    * Output only. Time when the trigger was created.
837    * </pre>
838    *
839    * <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
840    * </code>
841    *
842    * @return The createTime.
843    */
844   @java.lang.Override
getCreateTime()845   public com.google.protobuf.Timestamp getCreateTime() {
846     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
847   }
848   /**
849    *
850    *
851    * <pre>
852    * Output only. Time when the trigger was created.
853    * </pre>
854    *
855    * <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
856    * </code>
857    */
858   @java.lang.Override
getCreateTimeOrBuilder()859   public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
860     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
861   }
862 
863   public static final int DISABLED_FIELD_NUMBER = 9;
864   private boolean disabled_ = false;
865   /**
866    *
867    *
868    * <pre>
869    * If true, the trigger will never automatically execute a build.
870    * </pre>
871    *
872    * <code>bool disabled = 9;</code>
873    *
874    * @return The disabled.
875    */
876   @java.lang.Override
getDisabled()877   public boolean getDisabled() {
878     return disabled_;
879   }
880 
881   public static final int SUBSTITUTIONS_FIELD_NUMBER = 11;
882 
883   private static final class SubstitutionsDefaultEntryHolder {
884     static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
885         com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
886             com.google.cloudbuild.v1.Cloudbuild
887                 .internal_static_google_devtools_cloudbuild_v1_BuildTrigger_SubstitutionsEntry_descriptor,
888             com.google.protobuf.WireFormat.FieldType.STRING,
889             "",
890             com.google.protobuf.WireFormat.FieldType.STRING,
891             "");
892   }
893 
894   @SuppressWarnings("serial")
895   private com.google.protobuf.MapField<java.lang.String, java.lang.String> substitutions_;
896 
897   private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetSubstitutions()898       internalGetSubstitutions() {
899     if (substitutions_ == null) {
900       return com.google.protobuf.MapField.emptyMapField(
901           SubstitutionsDefaultEntryHolder.defaultEntry);
902     }
903     return substitutions_;
904   }
905 
getSubstitutionsCount()906   public int getSubstitutionsCount() {
907     return internalGetSubstitutions().getMap().size();
908   }
909   /**
910    *
911    *
912    * <pre>
913    * Substitutions for Build resource. The keys must match the following
914    * regular expression: `^_[A-Z0-9_]+$`.
915    * </pre>
916    *
917    * <code>map&lt;string, string&gt; substitutions = 11;</code>
918    */
919   @java.lang.Override
containsSubstitutions(java.lang.String key)920   public boolean containsSubstitutions(java.lang.String key) {
921     if (key == null) {
922       throw new NullPointerException("map key");
923     }
924     return internalGetSubstitutions().getMap().containsKey(key);
925   }
926   /** Use {@link #getSubstitutionsMap()} instead. */
927   @java.lang.Override
928   @java.lang.Deprecated
getSubstitutions()929   public java.util.Map<java.lang.String, java.lang.String> getSubstitutions() {
930     return getSubstitutionsMap();
931   }
932   /**
933    *
934    *
935    * <pre>
936    * Substitutions for Build resource. The keys must match the following
937    * regular expression: `^_[A-Z0-9_]+$`.
938    * </pre>
939    *
940    * <code>map&lt;string, string&gt; substitutions = 11;</code>
941    */
942   @java.lang.Override
getSubstitutionsMap()943   public java.util.Map<java.lang.String, java.lang.String> getSubstitutionsMap() {
944     return internalGetSubstitutions().getMap();
945   }
946   /**
947    *
948    *
949    * <pre>
950    * Substitutions for Build resource. The keys must match the following
951    * regular expression: `^_[A-Z0-9_]+$`.
952    * </pre>
953    *
954    * <code>map&lt;string, string&gt; substitutions = 11;</code>
955    */
956   @java.lang.Override
getSubstitutionsOrDefault( java.lang.String key, java.lang.String defaultValue)957   public /* nullable */ java.lang.String getSubstitutionsOrDefault(
958       java.lang.String key,
959       /* nullable */
960       java.lang.String defaultValue) {
961     if (key == null) {
962       throw new NullPointerException("map key");
963     }
964     java.util.Map<java.lang.String, java.lang.String> map = internalGetSubstitutions().getMap();
965     return map.containsKey(key) ? map.get(key) : defaultValue;
966   }
967   /**
968    *
969    *
970    * <pre>
971    * Substitutions for Build resource. The keys must match the following
972    * regular expression: `^_[A-Z0-9_]+$`.
973    * </pre>
974    *
975    * <code>map&lt;string, string&gt; substitutions = 11;</code>
976    */
977   @java.lang.Override
getSubstitutionsOrThrow(java.lang.String key)978   public java.lang.String getSubstitutionsOrThrow(java.lang.String key) {
979     if (key == null) {
980       throw new NullPointerException("map key");
981     }
982     java.util.Map<java.lang.String, java.lang.String> map = internalGetSubstitutions().getMap();
983     if (!map.containsKey(key)) {
984       throw new java.lang.IllegalArgumentException();
985     }
986     return map.get(key);
987   }
988 
989   public static final int IGNORED_FILES_FIELD_NUMBER = 15;
990 
991   @SuppressWarnings("serial")
992   private com.google.protobuf.LazyStringList ignoredFiles_;
993   /**
994    *
995    *
996    * <pre>
997    * ignored_files and included_files are file glob matches using
998    * https://golang.org/pkg/path/filepath/#Match extended with support for "**".
999    * If ignored_files and changed files are both empty, then they are
1000    * not used to determine whether or not to trigger a build.
1001    * If ignored_files is not empty, then we ignore any files that match
1002    * any of the ignored_file globs. If the change has no files that are
1003    * outside of the ignored_files globs, then we do not trigger a build.
1004    * </pre>
1005    *
1006    * <code>repeated string ignored_files = 15;</code>
1007    *
1008    * @return A list containing the ignoredFiles.
1009    */
getIgnoredFilesList()1010   public com.google.protobuf.ProtocolStringList getIgnoredFilesList() {
1011     return ignoredFiles_;
1012   }
1013   /**
1014    *
1015    *
1016    * <pre>
1017    * ignored_files and included_files are file glob matches using
1018    * https://golang.org/pkg/path/filepath/#Match extended with support for "**".
1019    * If ignored_files and changed files are both empty, then they are
1020    * not used to determine whether or not to trigger a build.
1021    * If ignored_files is not empty, then we ignore any files that match
1022    * any of the ignored_file globs. If the change has no files that are
1023    * outside of the ignored_files globs, then we do not trigger a build.
1024    * </pre>
1025    *
1026    * <code>repeated string ignored_files = 15;</code>
1027    *
1028    * @return The count of ignoredFiles.
1029    */
getIgnoredFilesCount()1030   public int getIgnoredFilesCount() {
1031     return ignoredFiles_.size();
1032   }
1033   /**
1034    *
1035    *
1036    * <pre>
1037    * ignored_files and included_files are file glob matches using
1038    * https://golang.org/pkg/path/filepath/#Match extended with support for "**".
1039    * If ignored_files and changed files are both empty, then they are
1040    * not used to determine whether or not to trigger a build.
1041    * If ignored_files is not empty, then we ignore any files that match
1042    * any of the ignored_file globs. If the change has no files that are
1043    * outside of the ignored_files globs, then we do not trigger a build.
1044    * </pre>
1045    *
1046    * <code>repeated string ignored_files = 15;</code>
1047    *
1048    * @param index The index of the element to return.
1049    * @return The ignoredFiles at the given index.
1050    */
getIgnoredFiles(int index)1051   public java.lang.String getIgnoredFiles(int index) {
1052     return ignoredFiles_.get(index);
1053   }
1054   /**
1055    *
1056    *
1057    * <pre>
1058    * ignored_files and included_files are file glob matches using
1059    * https://golang.org/pkg/path/filepath/#Match extended with support for "**".
1060    * If ignored_files and changed files are both empty, then they are
1061    * not used to determine whether or not to trigger a build.
1062    * If ignored_files is not empty, then we ignore any files that match
1063    * any of the ignored_file globs. If the change has no files that are
1064    * outside of the ignored_files globs, then we do not trigger a build.
1065    * </pre>
1066    *
1067    * <code>repeated string ignored_files = 15;</code>
1068    *
1069    * @param index The index of the value to return.
1070    * @return The bytes of the ignoredFiles at the given index.
1071    */
getIgnoredFilesBytes(int index)1072   public com.google.protobuf.ByteString getIgnoredFilesBytes(int index) {
1073     return ignoredFiles_.getByteString(index);
1074   }
1075 
1076   public static final int INCLUDED_FILES_FIELD_NUMBER = 16;
1077 
1078   @SuppressWarnings("serial")
1079   private com.google.protobuf.LazyStringList includedFiles_;
1080   /**
1081    *
1082    *
1083    * <pre>
1084    * If any of the files altered in the commit pass the ignored_files
1085    * filter and included_files is empty, then as far as this filter is
1086    * concerned, we should trigger the build.
1087    * If any of the files altered in the commit pass the ignored_files
1088    * filter and included_files is not empty, then we make sure that at
1089    * least one of those files matches a included_files glob. If not,
1090    * then we do not trigger a build.
1091    * </pre>
1092    *
1093    * <code>repeated string included_files = 16;</code>
1094    *
1095    * @return A list containing the includedFiles.
1096    */
getIncludedFilesList()1097   public com.google.protobuf.ProtocolStringList getIncludedFilesList() {
1098     return includedFiles_;
1099   }
1100   /**
1101    *
1102    *
1103    * <pre>
1104    * If any of the files altered in the commit pass the ignored_files
1105    * filter and included_files is empty, then as far as this filter is
1106    * concerned, we should trigger the build.
1107    * If any of the files altered in the commit pass the ignored_files
1108    * filter and included_files is not empty, then we make sure that at
1109    * least one of those files matches a included_files glob. If not,
1110    * then we do not trigger a build.
1111    * </pre>
1112    *
1113    * <code>repeated string included_files = 16;</code>
1114    *
1115    * @return The count of includedFiles.
1116    */
getIncludedFilesCount()1117   public int getIncludedFilesCount() {
1118     return includedFiles_.size();
1119   }
1120   /**
1121    *
1122    *
1123    * <pre>
1124    * If any of the files altered in the commit pass the ignored_files
1125    * filter and included_files is empty, then as far as this filter is
1126    * concerned, we should trigger the build.
1127    * If any of the files altered in the commit pass the ignored_files
1128    * filter and included_files is not empty, then we make sure that at
1129    * least one of those files matches a included_files glob. If not,
1130    * then we do not trigger a build.
1131    * </pre>
1132    *
1133    * <code>repeated string included_files = 16;</code>
1134    *
1135    * @param index The index of the element to return.
1136    * @return The includedFiles at the given index.
1137    */
getIncludedFiles(int index)1138   public java.lang.String getIncludedFiles(int index) {
1139     return includedFiles_.get(index);
1140   }
1141   /**
1142    *
1143    *
1144    * <pre>
1145    * If any of the files altered in the commit pass the ignored_files
1146    * filter and included_files is empty, then as far as this filter is
1147    * concerned, we should trigger the build.
1148    * If any of the files altered in the commit pass the ignored_files
1149    * filter and included_files is not empty, then we make sure that at
1150    * least one of those files matches a included_files glob. If not,
1151    * then we do not trigger a build.
1152    * </pre>
1153    *
1154    * <code>repeated string included_files = 16;</code>
1155    *
1156    * @param index The index of the value to return.
1157    * @return The bytes of the includedFiles at the given index.
1158    */
getIncludedFilesBytes(int index)1159   public com.google.protobuf.ByteString getIncludedFilesBytes(int index) {
1160     return includedFiles_.getByteString(index);
1161   }
1162 
1163   public static final int FILTER_FIELD_NUMBER = 30;
1164 
1165   @SuppressWarnings("serial")
1166   private volatile java.lang.Object filter_ = "";
1167   /**
1168    *
1169    *
1170    * <pre>
1171    * Optional. A Common Expression Language string.
1172    * </pre>
1173    *
1174    * <code>string filter = 30 [(.google.api.field_behavior) = OPTIONAL];</code>
1175    *
1176    * @return The filter.
1177    */
1178   @java.lang.Override
getFilter()1179   public java.lang.String getFilter() {
1180     java.lang.Object ref = filter_;
1181     if (ref instanceof java.lang.String) {
1182       return (java.lang.String) ref;
1183     } else {
1184       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1185       java.lang.String s = bs.toStringUtf8();
1186       filter_ = s;
1187       return s;
1188     }
1189   }
1190   /**
1191    *
1192    *
1193    * <pre>
1194    * Optional. A Common Expression Language string.
1195    * </pre>
1196    *
1197    * <code>string filter = 30 [(.google.api.field_behavior) = OPTIONAL];</code>
1198    *
1199    * @return The bytes for filter.
1200    */
1201   @java.lang.Override
getFilterBytes()1202   public com.google.protobuf.ByteString getFilterBytes() {
1203     java.lang.Object ref = filter_;
1204     if (ref instanceof java.lang.String) {
1205       com.google.protobuf.ByteString b =
1206           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1207       filter_ = b;
1208       return b;
1209     } else {
1210       return (com.google.protobuf.ByteString) ref;
1211     }
1212   }
1213 
1214   public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 33;
1215 
1216   @SuppressWarnings("serial")
1217   private volatile java.lang.Object serviceAccount_ = "";
1218   /**
1219    *
1220    *
1221    * <pre>
1222    * The service account used for all user-controlled operations including
1223    * UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
1224    * If no service account is set, then the standard Cloud Build service account
1225    * ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
1226    * Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
1227    * </pre>
1228    *
1229    * <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
1230    *
1231    * @return The serviceAccount.
1232    */
1233   @java.lang.Override
getServiceAccount()1234   public java.lang.String getServiceAccount() {
1235     java.lang.Object ref = serviceAccount_;
1236     if (ref instanceof java.lang.String) {
1237       return (java.lang.String) ref;
1238     } else {
1239       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1240       java.lang.String s = bs.toStringUtf8();
1241       serviceAccount_ = s;
1242       return s;
1243     }
1244   }
1245   /**
1246    *
1247    *
1248    * <pre>
1249    * The service account used for all user-controlled operations including
1250    * UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
1251    * If no service account is set, then the standard Cloud Build service account
1252    * ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
1253    * Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
1254    * </pre>
1255    *
1256    * <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
1257    *
1258    * @return The bytes for serviceAccount.
1259    */
1260   @java.lang.Override
getServiceAccountBytes()1261   public com.google.protobuf.ByteString getServiceAccountBytes() {
1262     java.lang.Object ref = serviceAccount_;
1263     if (ref instanceof java.lang.String) {
1264       com.google.protobuf.ByteString b =
1265           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1266       serviceAccount_ = b;
1267       return b;
1268     } else {
1269       return (com.google.protobuf.ByteString) ref;
1270     }
1271   }
1272 
1273   private byte memoizedIsInitialized = -1;
1274 
1275   @java.lang.Override
isInitialized()1276   public final boolean isInitialized() {
1277     byte isInitialized = memoizedIsInitialized;
1278     if (isInitialized == 1) return true;
1279     if (isInitialized == 0) return false;
1280 
1281     memoizedIsInitialized = 1;
1282     return true;
1283   }
1284 
1285   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1286   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1287     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
1288       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
1289     }
1290     if (buildTemplateCase_ == 4) {
1291       output.writeMessage(4, (com.google.cloudbuild.v1.Build) buildTemplate_);
1292     }
1293     if (createTime_ != null) {
1294       output.writeMessage(5, getCreateTime());
1295     }
1296     if (triggerTemplate_ != null) {
1297       output.writeMessage(7, getTriggerTemplate());
1298     }
1299     if (buildTemplateCase_ == 8) {
1300       com.google.protobuf.GeneratedMessageV3.writeString(output, 8, buildTemplate_);
1301     }
1302     if (disabled_ != false) {
1303       output.writeBool(9, disabled_);
1304     }
1305     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
1306       com.google.protobuf.GeneratedMessageV3.writeString(output, 10, description_);
1307     }
1308     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
1309         output, internalGetSubstitutions(), SubstitutionsDefaultEntryHolder.defaultEntry, 11);
1310     if (github_ != null) {
1311       output.writeMessage(13, getGithub());
1312     }
1313     for (int i = 0; i < ignoredFiles_.size(); i++) {
1314       com.google.protobuf.GeneratedMessageV3.writeString(output, 15, ignoredFiles_.getRaw(i));
1315     }
1316     for (int i = 0; i < includedFiles_.size(); i++) {
1317       com.google.protobuf.GeneratedMessageV3.writeString(output, 16, includedFiles_.getRaw(i));
1318     }
1319     if (buildTemplateCase_ == 18) {
1320       output.writeBool(18, (boolean) ((java.lang.Boolean) buildTemplate_));
1321     }
1322     for (int i = 0; i < tags_.size(); i++) {
1323       com.google.protobuf.GeneratedMessageV3.writeString(output, 19, tags_.getRaw(i));
1324     }
1325     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
1326       com.google.protobuf.GeneratedMessageV3.writeString(output, 21, name_);
1327     }
1328     if (pubsubConfig_ != null) {
1329       output.writeMessage(29, getPubsubConfig());
1330     }
1331     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
1332       com.google.protobuf.GeneratedMessageV3.writeString(output, 30, filter_);
1333     }
1334     if (webhookConfig_ != null) {
1335       output.writeMessage(31, getWebhookConfig());
1336     }
1337     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) {
1338       com.google.protobuf.GeneratedMessageV3.writeString(output, 33, serviceAccount_);
1339     }
1340     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) {
1341       com.google.protobuf.GeneratedMessageV3.writeString(output, 34, resourceName_);
1342     }
1343     getUnknownFields().writeTo(output);
1344   }
1345 
1346   @java.lang.Override
getSerializedSize()1347   public int getSerializedSize() {
1348     int size = memoizedSize;
1349     if (size != -1) return size;
1350 
1351     size = 0;
1352     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
1353       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
1354     }
1355     if (buildTemplateCase_ == 4) {
1356       size +=
1357           com.google.protobuf.CodedOutputStream.computeMessageSize(
1358               4, (com.google.cloudbuild.v1.Build) buildTemplate_);
1359     }
1360     if (createTime_ != null) {
1361       size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime());
1362     }
1363     if (triggerTemplate_ != null) {
1364       size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTriggerTemplate());
1365     }
1366     if (buildTemplateCase_ == 8) {
1367       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, buildTemplate_);
1368     }
1369     if (disabled_ != false) {
1370       size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, disabled_);
1371     }
1372     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
1373       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, description_);
1374     }
1375     for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
1376         internalGetSubstitutions().getMap().entrySet()) {
1377       com.google.protobuf.MapEntry<java.lang.String, java.lang.String> substitutions__ =
1378           SubstitutionsDefaultEntryHolder.defaultEntry
1379               .newBuilderForType()
1380               .setKey(entry.getKey())
1381               .setValue(entry.getValue())
1382               .build();
1383       size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, substitutions__);
1384     }
1385     if (github_ != null) {
1386       size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getGithub());
1387     }
1388     {
1389       int dataSize = 0;
1390       for (int i = 0; i < ignoredFiles_.size(); i++) {
1391         dataSize += computeStringSizeNoTag(ignoredFiles_.getRaw(i));
1392       }
1393       size += dataSize;
1394       size += 1 * getIgnoredFilesList().size();
1395     }
1396     {
1397       int dataSize = 0;
1398       for (int i = 0; i < includedFiles_.size(); i++) {
1399         dataSize += computeStringSizeNoTag(includedFiles_.getRaw(i));
1400       }
1401       size += dataSize;
1402       size += 2 * getIncludedFilesList().size();
1403     }
1404     if (buildTemplateCase_ == 18) {
1405       size +=
1406           com.google.protobuf.CodedOutputStream.computeBoolSize(
1407               18, (boolean) ((java.lang.Boolean) buildTemplate_));
1408     }
1409     {
1410       int dataSize = 0;
1411       for (int i = 0; i < tags_.size(); i++) {
1412         dataSize += computeStringSizeNoTag(tags_.getRaw(i));
1413       }
1414       size += dataSize;
1415       size += 2 * getTagsList().size();
1416     }
1417     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
1418       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, name_);
1419     }
1420     if (pubsubConfig_ != null) {
1421       size += com.google.protobuf.CodedOutputStream.computeMessageSize(29, getPubsubConfig());
1422     }
1423     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
1424       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(30, filter_);
1425     }
1426     if (webhookConfig_ != null) {
1427       size += com.google.protobuf.CodedOutputStream.computeMessageSize(31, getWebhookConfig());
1428     }
1429     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) {
1430       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(33, serviceAccount_);
1431     }
1432     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) {
1433       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(34, resourceName_);
1434     }
1435     size += getUnknownFields().getSerializedSize();
1436     memoizedSize = size;
1437     return size;
1438   }
1439 
1440   @java.lang.Override
equals(final java.lang.Object obj)1441   public boolean equals(final java.lang.Object obj) {
1442     if (obj == this) {
1443       return true;
1444     }
1445     if (!(obj instanceof com.google.cloudbuild.v1.BuildTrigger)) {
1446       return super.equals(obj);
1447     }
1448     com.google.cloudbuild.v1.BuildTrigger other = (com.google.cloudbuild.v1.BuildTrigger) obj;
1449 
1450     if (!getResourceName().equals(other.getResourceName())) return false;
1451     if (!getId().equals(other.getId())) return false;
1452     if (!getDescription().equals(other.getDescription())) return false;
1453     if (!getName().equals(other.getName())) return false;
1454     if (!getTagsList().equals(other.getTagsList())) return false;
1455     if (hasTriggerTemplate() != other.hasTriggerTemplate()) return false;
1456     if (hasTriggerTemplate()) {
1457       if (!getTriggerTemplate().equals(other.getTriggerTemplate())) return false;
1458     }
1459     if (hasGithub() != other.hasGithub()) return false;
1460     if (hasGithub()) {
1461       if (!getGithub().equals(other.getGithub())) return false;
1462     }
1463     if (hasPubsubConfig() != other.hasPubsubConfig()) return false;
1464     if (hasPubsubConfig()) {
1465       if (!getPubsubConfig().equals(other.getPubsubConfig())) return false;
1466     }
1467     if (hasWebhookConfig() != other.hasWebhookConfig()) return false;
1468     if (hasWebhookConfig()) {
1469       if (!getWebhookConfig().equals(other.getWebhookConfig())) return false;
1470     }
1471     if (hasCreateTime() != other.hasCreateTime()) return false;
1472     if (hasCreateTime()) {
1473       if (!getCreateTime().equals(other.getCreateTime())) return false;
1474     }
1475     if (getDisabled() != other.getDisabled()) return false;
1476     if (!internalGetSubstitutions().equals(other.internalGetSubstitutions())) return false;
1477     if (!getIgnoredFilesList().equals(other.getIgnoredFilesList())) return false;
1478     if (!getIncludedFilesList().equals(other.getIncludedFilesList())) return false;
1479     if (!getFilter().equals(other.getFilter())) return false;
1480     if (!getServiceAccount().equals(other.getServiceAccount())) return false;
1481     if (!getBuildTemplateCase().equals(other.getBuildTemplateCase())) return false;
1482     switch (buildTemplateCase_) {
1483       case 18:
1484         if (getAutodetect() != other.getAutodetect()) return false;
1485         break;
1486       case 4:
1487         if (!getBuild().equals(other.getBuild())) return false;
1488         break;
1489       case 8:
1490         if (!getFilename().equals(other.getFilename())) return false;
1491         break;
1492       case 0:
1493       default:
1494     }
1495     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1496     return true;
1497   }
1498 
1499   @java.lang.Override
hashCode()1500   public int hashCode() {
1501     if (memoizedHashCode != 0) {
1502       return memoizedHashCode;
1503     }
1504     int hash = 41;
1505     hash = (19 * hash) + getDescriptor().hashCode();
1506     hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER;
1507     hash = (53 * hash) + getResourceName().hashCode();
1508     hash = (37 * hash) + ID_FIELD_NUMBER;
1509     hash = (53 * hash) + getId().hashCode();
1510     hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
1511     hash = (53 * hash) + getDescription().hashCode();
1512     hash = (37 * hash) + NAME_FIELD_NUMBER;
1513     hash = (53 * hash) + getName().hashCode();
1514     if (getTagsCount() > 0) {
1515       hash = (37 * hash) + TAGS_FIELD_NUMBER;
1516       hash = (53 * hash) + getTagsList().hashCode();
1517     }
1518     if (hasTriggerTemplate()) {
1519       hash = (37 * hash) + TRIGGER_TEMPLATE_FIELD_NUMBER;
1520       hash = (53 * hash) + getTriggerTemplate().hashCode();
1521     }
1522     if (hasGithub()) {
1523       hash = (37 * hash) + GITHUB_FIELD_NUMBER;
1524       hash = (53 * hash) + getGithub().hashCode();
1525     }
1526     if (hasPubsubConfig()) {
1527       hash = (37 * hash) + PUBSUB_CONFIG_FIELD_NUMBER;
1528       hash = (53 * hash) + getPubsubConfig().hashCode();
1529     }
1530     if (hasWebhookConfig()) {
1531       hash = (37 * hash) + WEBHOOK_CONFIG_FIELD_NUMBER;
1532       hash = (53 * hash) + getWebhookConfig().hashCode();
1533     }
1534     if (hasCreateTime()) {
1535       hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
1536       hash = (53 * hash) + getCreateTime().hashCode();
1537     }
1538     hash = (37 * hash) + DISABLED_FIELD_NUMBER;
1539     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisabled());
1540     if (!internalGetSubstitutions().getMap().isEmpty()) {
1541       hash = (37 * hash) + SUBSTITUTIONS_FIELD_NUMBER;
1542       hash = (53 * hash) + internalGetSubstitutions().hashCode();
1543     }
1544     if (getIgnoredFilesCount() > 0) {
1545       hash = (37 * hash) + IGNORED_FILES_FIELD_NUMBER;
1546       hash = (53 * hash) + getIgnoredFilesList().hashCode();
1547     }
1548     if (getIncludedFilesCount() > 0) {
1549       hash = (37 * hash) + INCLUDED_FILES_FIELD_NUMBER;
1550       hash = (53 * hash) + getIncludedFilesList().hashCode();
1551     }
1552     hash = (37 * hash) + FILTER_FIELD_NUMBER;
1553     hash = (53 * hash) + getFilter().hashCode();
1554     hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER;
1555     hash = (53 * hash) + getServiceAccount().hashCode();
1556     switch (buildTemplateCase_) {
1557       case 18:
1558         hash = (37 * hash) + AUTODETECT_FIELD_NUMBER;
1559         hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutodetect());
1560         break;
1561       case 4:
1562         hash = (37 * hash) + BUILD_FIELD_NUMBER;
1563         hash = (53 * hash) + getBuild().hashCode();
1564         break;
1565       case 8:
1566         hash = (37 * hash) + FILENAME_FIELD_NUMBER;
1567         hash = (53 * hash) + getFilename().hashCode();
1568         break;
1569       case 0:
1570       default:
1571     }
1572     hash = (29 * hash) + getUnknownFields().hashCode();
1573     memoizedHashCode = hash;
1574     return hash;
1575   }
1576 
parseFrom(java.nio.ByteBuffer data)1577   public static com.google.cloudbuild.v1.BuildTrigger parseFrom(java.nio.ByteBuffer data)
1578       throws com.google.protobuf.InvalidProtocolBufferException {
1579     return PARSER.parseFrom(data);
1580   }
1581 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1582   public static com.google.cloudbuild.v1.BuildTrigger parseFrom(
1583       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1584       throws com.google.protobuf.InvalidProtocolBufferException {
1585     return PARSER.parseFrom(data, extensionRegistry);
1586   }
1587 
parseFrom(com.google.protobuf.ByteString data)1588   public static com.google.cloudbuild.v1.BuildTrigger parseFrom(com.google.protobuf.ByteString data)
1589       throws com.google.protobuf.InvalidProtocolBufferException {
1590     return PARSER.parseFrom(data);
1591   }
1592 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1593   public static com.google.cloudbuild.v1.BuildTrigger parseFrom(
1594       com.google.protobuf.ByteString data,
1595       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1596       throws com.google.protobuf.InvalidProtocolBufferException {
1597     return PARSER.parseFrom(data, extensionRegistry);
1598   }
1599 
parseFrom(byte[] data)1600   public static com.google.cloudbuild.v1.BuildTrigger parseFrom(byte[] data)
1601       throws com.google.protobuf.InvalidProtocolBufferException {
1602     return PARSER.parseFrom(data);
1603   }
1604 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1605   public static com.google.cloudbuild.v1.BuildTrigger parseFrom(
1606       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1607       throws com.google.protobuf.InvalidProtocolBufferException {
1608     return PARSER.parseFrom(data, extensionRegistry);
1609   }
1610 
parseFrom(java.io.InputStream input)1611   public static com.google.cloudbuild.v1.BuildTrigger parseFrom(java.io.InputStream input)
1612       throws java.io.IOException {
1613     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1614   }
1615 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1616   public static com.google.cloudbuild.v1.BuildTrigger parseFrom(
1617       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1618       throws java.io.IOException {
1619     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1620         PARSER, input, extensionRegistry);
1621   }
1622 
parseDelimitedFrom(java.io.InputStream input)1623   public static com.google.cloudbuild.v1.BuildTrigger parseDelimitedFrom(java.io.InputStream input)
1624       throws java.io.IOException {
1625     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1626   }
1627 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1628   public static com.google.cloudbuild.v1.BuildTrigger parseDelimitedFrom(
1629       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1630       throws java.io.IOException {
1631     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1632         PARSER, input, extensionRegistry);
1633   }
1634 
parseFrom( com.google.protobuf.CodedInputStream input)1635   public static com.google.cloudbuild.v1.BuildTrigger parseFrom(
1636       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1637     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1638   }
1639 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1640   public static com.google.cloudbuild.v1.BuildTrigger parseFrom(
1641       com.google.protobuf.CodedInputStream input,
1642       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1643       throws java.io.IOException {
1644     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1645         PARSER, input, extensionRegistry);
1646   }
1647 
1648   @java.lang.Override
newBuilderForType()1649   public Builder newBuilderForType() {
1650     return newBuilder();
1651   }
1652 
newBuilder()1653   public static Builder newBuilder() {
1654     return DEFAULT_INSTANCE.toBuilder();
1655   }
1656 
newBuilder(com.google.cloudbuild.v1.BuildTrigger prototype)1657   public static Builder newBuilder(com.google.cloudbuild.v1.BuildTrigger prototype) {
1658     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1659   }
1660 
1661   @java.lang.Override
toBuilder()1662   public Builder toBuilder() {
1663     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1664   }
1665 
1666   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1667   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1668     Builder builder = new Builder(parent);
1669     return builder;
1670   }
1671   /**
1672    *
1673    *
1674    * <pre>
1675    * Configuration for an automated build in response to source repository
1676    * changes.
1677    * </pre>
1678    *
1679    * Protobuf type {@code google.devtools.cloudbuild.v1.BuildTrigger}
1680    */
1681   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1682       implements
1683       // @@protoc_insertion_point(builder_implements:google.devtools.cloudbuild.v1.BuildTrigger)
1684       com.google.cloudbuild.v1.BuildTriggerOrBuilder {
getDescriptor()1685     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1686       return com.google.cloudbuild.v1.Cloudbuild
1687           .internal_static_google_devtools_cloudbuild_v1_BuildTrigger_descriptor;
1688     }
1689 
1690     @SuppressWarnings({"rawtypes"})
internalGetMapField(int number)1691     protected com.google.protobuf.MapField internalGetMapField(int number) {
1692       switch (number) {
1693         case 11:
1694           return internalGetSubstitutions();
1695         default:
1696           throw new RuntimeException("Invalid map field number: " + number);
1697       }
1698     }
1699 
1700     @SuppressWarnings({"rawtypes"})
internalGetMutableMapField(int number)1701     protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
1702       switch (number) {
1703         case 11:
1704           return internalGetMutableSubstitutions();
1705         default:
1706           throw new RuntimeException("Invalid map field number: " + number);
1707       }
1708     }
1709 
1710     @java.lang.Override
1711     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1712         internalGetFieldAccessorTable() {
1713       return com.google.cloudbuild.v1.Cloudbuild
1714           .internal_static_google_devtools_cloudbuild_v1_BuildTrigger_fieldAccessorTable
1715           .ensureFieldAccessorsInitialized(
1716               com.google.cloudbuild.v1.BuildTrigger.class,
1717               com.google.cloudbuild.v1.BuildTrigger.Builder.class);
1718     }
1719 
1720     // Construct using com.google.cloudbuild.v1.BuildTrigger.newBuilder()
Builder()1721     private Builder() {}
1722 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1723     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1724       super(parent);
1725     }
1726 
1727     @java.lang.Override
clear()1728     public Builder clear() {
1729       super.clear();
1730       bitField0_ = 0;
1731       resourceName_ = "";
1732       id_ = "";
1733       description_ = "";
1734       name_ = "";
1735       tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1736       bitField0_ = (bitField0_ & ~0x00000010);
1737       triggerTemplate_ = null;
1738       if (triggerTemplateBuilder_ != null) {
1739         triggerTemplateBuilder_.dispose();
1740         triggerTemplateBuilder_ = null;
1741       }
1742       github_ = null;
1743       if (githubBuilder_ != null) {
1744         githubBuilder_.dispose();
1745         githubBuilder_ = null;
1746       }
1747       pubsubConfig_ = null;
1748       if (pubsubConfigBuilder_ != null) {
1749         pubsubConfigBuilder_.dispose();
1750         pubsubConfigBuilder_ = null;
1751       }
1752       webhookConfig_ = null;
1753       if (webhookConfigBuilder_ != null) {
1754         webhookConfigBuilder_.dispose();
1755         webhookConfigBuilder_ = null;
1756       }
1757       if (buildBuilder_ != null) {
1758         buildBuilder_.clear();
1759       }
1760       createTime_ = null;
1761       if (createTimeBuilder_ != null) {
1762         createTimeBuilder_.dispose();
1763         createTimeBuilder_ = null;
1764       }
1765       disabled_ = false;
1766       internalGetMutableSubstitutions().clear();
1767       ignoredFiles_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1768       bitField0_ = (bitField0_ & ~0x00008000);
1769       includedFiles_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1770       bitField0_ = (bitField0_ & ~0x00010000);
1771       filter_ = "";
1772       serviceAccount_ = "";
1773       buildTemplateCase_ = 0;
1774       buildTemplate_ = null;
1775       return this;
1776     }
1777 
1778     @java.lang.Override
getDescriptorForType()1779     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1780       return com.google.cloudbuild.v1.Cloudbuild
1781           .internal_static_google_devtools_cloudbuild_v1_BuildTrigger_descriptor;
1782     }
1783 
1784     @java.lang.Override
getDefaultInstanceForType()1785     public com.google.cloudbuild.v1.BuildTrigger getDefaultInstanceForType() {
1786       return com.google.cloudbuild.v1.BuildTrigger.getDefaultInstance();
1787     }
1788 
1789     @java.lang.Override
build()1790     public com.google.cloudbuild.v1.BuildTrigger build() {
1791       com.google.cloudbuild.v1.BuildTrigger result = buildPartial();
1792       if (!result.isInitialized()) {
1793         throw newUninitializedMessageException(result);
1794       }
1795       return result;
1796     }
1797 
1798     @java.lang.Override
buildPartial()1799     public com.google.cloudbuild.v1.BuildTrigger buildPartial() {
1800       com.google.cloudbuild.v1.BuildTrigger result =
1801           new com.google.cloudbuild.v1.BuildTrigger(this);
1802       buildPartialRepeatedFields(result);
1803       if (bitField0_ != 0) {
1804         buildPartial0(result);
1805       }
1806       buildPartialOneofs(result);
1807       onBuilt();
1808       return result;
1809     }
1810 
buildPartialRepeatedFields(com.google.cloudbuild.v1.BuildTrigger result)1811     private void buildPartialRepeatedFields(com.google.cloudbuild.v1.BuildTrigger result) {
1812       if (((bitField0_ & 0x00000010) != 0)) {
1813         tags_ = tags_.getUnmodifiableView();
1814         bitField0_ = (bitField0_ & ~0x00000010);
1815       }
1816       result.tags_ = tags_;
1817       if (((bitField0_ & 0x00008000) != 0)) {
1818         ignoredFiles_ = ignoredFiles_.getUnmodifiableView();
1819         bitField0_ = (bitField0_ & ~0x00008000);
1820       }
1821       result.ignoredFiles_ = ignoredFiles_;
1822       if (((bitField0_ & 0x00010000) != 0)) {
1823         includedFiles_ = includedFiles_.getUnmodifiableView();
1824         bitField0_ = (bitField0_ & ~0x00010000);
1825       }
1826       result.includedFiles_ = includedFiles_;
1827     }
1828 
buildPartial0(com.google.cloudbuild.v1.BuildTrigger result)1829     private void buildPartial0(com.google.cloudbuild.v1.BuildTrigger result) {
1830       int from_bitField0_ = bitField0_;
1831       if (((from_bitField0_ & 0x00000001) != 0)) {
1832         result.resourceName_ = resourceName_;
1833       }
1834       if (((from_bitField0_ & 0x00000002) != 0)) {
1835         result.id_ = id_;
1836       }
1837       if (((from_bitField0_ & 0x00000004) != 0)) {
1838         result.description_ = description_;
1839       }
1840       if (((from_bitField0_ & 0x00000008) != 0)) {
1841         result.name_ = name_;
1842       }
1843       if (((from_bitField0_ & 0x00000020) != 0)) {
1844         result.triggerTemplate_ =
1845             triggerTemplateBuilder_ == null ? triggerTemplate_ : triggerTemplateBuilder_.build();
1846       }
1847       if (((from_bitField0_ & 0x00000040) != 0)) {
1848         result.github_ = githubBuilder_ == null ? github_ : githubBuilder_.build();
1849       }
1850       if (((from_bitField0_ & 0x00000080) != 0)) {
1851         result.pubsubConfig_ =
1852             pubsubConfigBuilder_ == null ? pubsubConfig_ : pubsubConfigBuilder_.build();
1853       }
1854       if (((from_bitField0_ & 0x00000100) != 0)) {
1855         result.webhookConfig_ =
1856             webhookConfigBuilder_ == null ? webhookConfig_ : webhookConfigBuilder_.build();
1857       }
1858       if (((from_bitField0_ & 0x00001000) != 0)) {
1859         result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
1860       }
1861       if (((from_bitField0_ & 0x00002000) != 0)) {
1862         result.disabled_ = disabled_;
1863       }
1864       if (((from_bitField0_ & 0x00004000) != 0)) {
1865         result.substitutions_ = internalGetSubstitutions();
1866         result.substitutions_.makeImmutable();
1867       }
1868       if (((from_bitField0_ & 0x00020000) != 0)) {
1869         result.filter_ = filter_;
1870       }
1871       if (((from_bitField0_ & 0x00040000) != 0)) {
1872         result.serviceAccount_ = serviceAccount_;
1873       }
1874     }
1875 
buildPartialOneofs(com.google.cloudbuild.v1.BuildTrigger result)1876     private void buildPartialOneofs(com.google.cloudbuild.v1.BuildTrigger result) {
1877       result.buildTemplateCase_ = buildTemplateCase_;
1878       result.buildTemplate_ = this.buildTemplate_;
1879       if (buildTemplateCase_ == 4 && buildBuilder_ != null) {
1880         result.buildTemplate_ = buildBuilder_.build();
1881       }
1882     }
1883 
1884     @java.lang.Override
clone()1885     public Builder clone() {
1886       return super.clone();
1887     }
1888 
1889     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1890     public Builder setField(
1891         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1892       return super.setField(field, value);
1893     }
1894 
1895     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1896     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1897       return super.clearField(field);
1898     }
1899 
1900     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1901     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1902       return super.clearOneof(oneof);
1903     }
1904 
1905     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1906     public Builder setRepeatedField(
1907         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1908       return super.setRepeatedField(field, index, value);
1909     }
1910 
1911     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1912     public Builder addRepeatedField(
1913         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1914       return super.addRepeatedField(field, value);
1915     }
1916 
1917     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1918     public Builder mergeFrom(com.google.protobuf.Message other) {
1919       if (other instanceof com.google.cloudbuild.v1.BuildTrigger) {
1920         return mergeFrom((com.google.cloudbuild.v1.BuildTrigger) other);
1921       } else {
1922         super.mergeFrom(other);
1923         return this;
1924       }
1925     }
1926 
mergeFrom(com.google.cloudbuild.v1.BuildTrigger other)1927     public Builder mergeFrom(com.google.cloudbuild.v1.BuildTrigger other) {
1928       if (other == com.google.cloudbuild.v1.BuildTrigger.getDefaultInstance()) return this;
1929       if (!other.getResourceName().isEmpty()) {
1930         resourceName_ = other.resourceName_;
1931         bitField0_ |= 0x00000001;
1932         onChanged();
1933       }
1934       if (!other.getId().isEmpty()) {
1935         id_ = other.id_;
1936         bitField0_ |= 0x00000002;
1937         onChanged();
1938       }
1939       if (!other.getDescription().isEmpty()) {
1940         description_ = other.description_;
1941         bitField0_ |= 0x00000004;
1942         onChanged();
1943       }
1944       if (!other.getName().isEmpty()) {
1945         name_ = other.name_;
1946         bitField0_ |= 0x00000008;
1947         onChanged();
1948       }
1949       if (!other.tags_.isEmpty()) {
1950         if (tags_.isEmpty()) {
1951           tags_ = other.tags_;
1952           bitField0_ = (bitField0_ & ~0x00000010);
1953         } else {
1954           ensureTagsIsMutable();
1955           tags_.addAll(other.tags_);
1956         }
1957         onChanged();
1958       }
1959       if (other.hasTriggerTemplate()) {
1960         mergeTriggerTemplate(other.getTriggerTemplate());
1961       }
1962       if (other.hasGithub()) {
1963         mergeGithub(other.getGithub());
1964       }
1965       if (other.hasPubsubConfig()) {
1966         mergePubsubConfig(other.getPubsubConfig());
1967       }
1968       if (other.hasWebhookConfig()) {
1969         mergeWebhookConfig(other.getWebhookConfig());
1970       }
1971       if (other.hasCreateTime()) {
1972         mergeCreateTime(other.getCreateTime());
1973       }
1974       if (other.getDisabled() != false) {
1975         setDisabled(other.getDisabled());
1976       }
1977       internalGetMutableSubstitutions().mergeFrom(other.internalGetSubstitutions());
1978       bitField0_ |= 0x00004000;
1979       if (!other.ignoredFiles_.isEmpty()) {
1980         if (ignoredFiles_.isEmpty()) {
1981           ignoredFiles_ = other.ignoredFiles_;
1982           bitField0_ = (bitField0_ & ~0x00008000);
1983         } else {
1984           ensureIgnoredFilesIsMutable();
1985           ignoredFiles_.addAll(other.ignoredFiles_);
1986         }
1987         onChanged();
1988       }
1989       if (!other.includedFiles_.isEmpty()) {
1990         if (includedFiles_.isEmpty()) {
1991           includedFiles_ = other.includedFiles_;
1992           bitField0_ = (bitField0_ & ~0x00010000);
1993         } else {
1994           ensureIncludedFilesIsMutable();
1995           includedFiles_.addAll(other.includedFiles_);
1996         }
1997         onChanged();
1998       }
1999       if (!other.getFilter().isEmpty()) {
2000         filter_ = other.filter_;
2001         bitField0_ |= 0x00020000;
2002         onChanged();
2003       }
2004       if (!other.getServiceAccount().isEmpty()) {
2005         serviceAccount_ = other.serviceAccount_;
2006         bitField0_ |= 0x00040000;
2007         onChanged();
2008       }
2009       switch (other.getBuildTemplateCase()) {
2010         case AUTODETECT:
2011           {
2012             setAutodetect(other.getAutodetect());
2013             break;
2014           }
2015         case BUILD:
2016           {
2017             mergeBuild(other.getBuild());
2018             break;
2019           }
2020         case FILENAME:
2021           {
2022             buildTemplateCase_ = 8;
2023             buildTemplate_ = other.buildTemplate_;
2024             onChanged();
2025             break;
2026           }
2027         case BUILDTEMPLATE_NOT_SET:
2028           {
2029             break;
2030           }
2031       }
2032       this.mergeUnknownFields(other.getUnknownFields());
2033       onChanged();
2034       return this;
2035     }
2036 
2037     @java.lang.Override
isInitialized()2038     public final boolean isInitialized() {
2039       return true;
2040     }
2041 
2042     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2043     public Builder mergeFrom(
2044         com.google.protobuf.CodedInputStream input,
2045         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2046         throws java.io.IOException {
2047       if (extensionRegistry == null) {
2048         throw new java.lang.NullPointerException();
2049       }
2050       try {
2051         boolean done = false;
2052         while (!done) {
2053           int tag = input.readTag();
2054           switch (tag) {
2055             case 0:
2056               done = true;
2057               break;
2058             case 10:
2059               {
2060                 id_ = input.readStringRequireUtf8();
2061                 bitField0_ |= 0x00000002;
2062                 break;
2063               } // case 10
2064             case 34:
2065               {
2066                 input.readMessage(getBuildFieldBuilder().getBuilder(), extensionRegistry);
2067                 buildTemplateCase_ = 4;
2068                 break;
2069               } // case 34
2070             case 42:
2071               {
2072                 input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
2073                 bitField0_ |= 0x00001000;
2074                 break;
2075               } // case 42
2076             case 58:
2077               {
2078                 input.readMessage(getTriggerTemplateFieldBuilder().getBuilder(), extensionRegistry);
2079                 bitField0_ |= 0x00000020;
2080                 break;
2081               } // case 58
2082             case 66:
2083               {
2084                 java.lang.String s = input.readStringRequireUtf8();
2085                 buildTemplateCase_ = 8;
2086                 buildTemplate_ = s;
2087                 break;
2088               } // case 66
2089             case 72:
2090               {
2091                 disabled_ = input.readBool();
2092                 bitField0_ |= 0x00002000;
2093                 break;
2094               } // case 72
2095             case 82:
2096               {
2097                 description_ = input.readStringRequireUtf8();
2098                 bitField0_ |= 0x00000004;
2099                 break;
2100               } // case 82
2101             case 90:
2102               {
2103                 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> substitutions__ =
2104                     input.readMessage(
2105                         SubstitutionsDefaultEntryHolder.defaultEntry.getParserForType(),
2106                         extensionRegistry);
2107                 internalGetMutableSubstitutions()
2108                     .getMutableMap()
2109                     .put(substitutions__.getKey(), substitutions__.getValue());
2110                 bitField0_ |= 0x00004000;
2111                 break;
2112               } // case 90
2113             case 106:
2114               {
2115                 input.readMessage(getGithubFieldBuilder().getBuilder(), extensionRegistry);
2116                 bitField0_ |= 0x00000040;
2117                 break;
2118               } // case 106
2119             case 122:
2120               {
2121                 java.lang.String s = input.readStringRequireUtf8();
2122                 ensureIgnoredFilesIsMutable();
2123                 ignoredFiles_.add(s);
2124                 break;
2125               } // case 122
2126             case 130:
2127               {
2128                 java.lang.String s = input.readStringRequireUtf8();
2129                 ensureIncludedFilesIsMutable();
2130                 includedFiles_.add(s);
2131                 break;
2132               } // case 130
2133             case 144:
2134               {
2135                 buildTemplate_ = input.readBool();
2136                 buildTemplateCase_ = 18;
2137                 break;
2138               } // case 144
2139             case 154:
2140               {
2141                 java.lang.String s = input.readStringRequireUtf8();
2142                 ensureTagsIsMutable();
2143                 tags_.add(s);
2144                 break;
2145               } // case 154
2146             case 170:
2147               {
2148                 name_ = input.readStringRequireUtf8();
2149                 bitField0_ |= 0x00000008;
2150                 break;
2151               } // case 170
2152             case 234:
2153               {
2154                 input.readMessage(getPubsubConfigFieldBuilder().getBuilder(), extensionRegistry);
2155                 bitField0_ |= 0x00000080;
2156                 break;
2157               } // case 234
2158             case 242:
2159               {
2160                 filter_ = input.readStringRequireUtf8();
2161                 bitField0_ |= 0x00020000;
2162                 break;
2163               } // case 242
2164             case 250:
2165               {
2166                 input.readMessage(getWebhookConfigFieldBuilder().getBuilder(), extensionRegistry);
2167                 bitField0_ |= 0x00000100;
2168                 break;
2169               } // case 250
2170             case 266:
2171               {
2172                 serviceAccount_ = input.readStringRequireUtf8();
2173                 bitField0_ |= 0x00040000;
2174                 break;
2175               } // case 266
2176             case 274:
2177               {
2178                 resourceName_ = input.readStringRequireUtf8();
2179                 bitField0_ |= 0x00000001;
2180                 break;
2181               } // case 274
2182             default:
2183               {
2184                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2185                   done = true; // was an endgroup tag
2186                 }
2187                 break;
2188               } // default:
2189           } // switch (tag)
2190         } // while (!done)
2191       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2192         throw e.unwrapIOException();
2193       } finally {
2194         onChanged();
2195       } // finally
2196       return this;
2197     }
2198 
2199     private int buildTemplateCase_ = 0;
2200     private java.lang.Object buildTemplate_;
2201 
getBuildTemplateCase()2202     public BuildTemplateCase getBuildTemplateCase() {
2203       return BuildTemplateCase.forNumber(buildTemplateCase_);
2204     }
2205 
clearBuildTemplate()2206     public Builder clearBuildTemplate() {
2207       buildTemplateCase_ = 0;
2208       buildTemplate_ = null;
2209       onChanged();
2210       return this;
2211     }
2212 
2213     private int bitField0_;
2214 
2215     private java.lang.Object resourceName_ = "";
2216     /**
2217      *
2218      *
2219      * <pre>
2220      * The `Trigger` name with format:
2221      * `projects/{project}/locations/{location}/triggers/{trigger}`, where
2222      * {trigger} is a unique identifier generated by the service.
2223      * </pre>
2224      *
2225      * <code>string resource_name = 34;</code>
2226      *
2227      * @return The resourceName.
2228      */
getResourceName()2229     public java.lang.String getResourceName() {
2230       java.lang.Object ref = resourceName_;
2231       if (!(ref instanceof java.lang.String)) {
2232         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2233         java.lang.String s = bs.toStringUtf8();
2234         resourceName_ = s;
2235         return s;
2236       } else {
2237         return (java.lang.String) ref;
2238       }
2239     }
2240     /**
2241      *
2242      *
2243      * <pre>
2244      * The `Trigger` name with format:
2245      * `projects/{project}/locations/{location}/triggers/{trigger}`, where
2246      * {trigger} is a unique identifier generated by the service.
2247      * </pre>
2248      *
2249      * <code>string resource_name = 34;</code>
2250      *
2251      * @return The bytes for resourceName.
2252      */
getResourceNameBytes()2253     public com.google.protobuf.ByteString getResourceNameBytes() {
2254       java.lang.Object ref = resourceName_;
2255       if (ref instanceof String) {
2256         com.google.protobuf.ByteString b =
2257             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2258         resourceName_ = b;
2259         return b;
2260       } else {
2261         return (com.google.protobuf.ByteString) ref;
2262       }
2263     }
2264     /**
2265      *
2266      *
2267      * <pre>
2268      * The `Trigger` name with format:
2269      * `projects/{project}/locations/{location}/triggers/{trigger}`, where
2270      * {trigger} is a unique identifier generated by the service.
2271      * </pre>
2272      *
2273      * <code>string resource_name = 34;</code>
2274      *
2275      * @param value The resourceName to set.
2276      * @return This builder for chaining.
2277      */
setResourceName(java.lang.String value)2278     public Builder setResourceName(java.lang.String value) {
2279       if (value == null) {
2280         throw new NullPointerException();
2281       }
2282       resourceName_ = value;
2283       bitField0_ |= 0x00000001;
2284       onChanged();
2285       return this;
2286     }
2287     /**
2288      *
2289      *
2290      * <pre>
2291      * The `Trigger` name with format:
2292      * `projects/{project}/locations/{location}/triggers/{trigger}`, where
2293      * {trigger} is a unique identifier generated by the service.
2294      * </pre>
2295      *
2296      * <code>string resource_name = 34;</code>
2297      *
2298      * @return This builder for chaining.
2299      */
clearResourceName()2300     public Builder clearResourceName() {
2301       resourceName_ = getDefaultInstance().getResourceName();
2302       bitField0_ = (bitField0_ & ~0x00000001);
2303       onChanged();
2304       return this;
2305     }
2306     /**
2307      *
2308      *
2309      * <pre>
2310      * The `Trigger` name with format:
2311      * `projects/{project}/locations/{location}/triggers/{trigger}`, where
2312      * {trigger} is a unique identifier generated by the service.
2313      * </pre>
2314      *
2315      * <code>string resource_name = 34;</code>
2316      *
2317      * @param value The bytes for resourceName to set.
2318      * @return This builder for chaining.
2319      */
setResourceNameBytes(com.google.protobuf.ByteString value)2320     public Builder setResourceNameBytes(com.google.protobuf.ByteString value) {
2321       if (value == null) {
2322         throw new NullPointerException();
2323       }
2324       checkByteStringIsUtf8(value);
2325       resourceName_ = value;
2326       bitField0_ |= 0x00000001;
2327       onChanged();
2328       return this;
2329     }
2330 
2331     private java.lang.Object id_ = "";
2332     /**
2333      *
2334      *
2335      * <pre>
2336      * Output only. Unique identifier of the trigger.
2337      * </pre>
2338      *
2339      * <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2340      *
2341      * @return The id.
2342      */
getId()2343     public java.lang.String getId() {
2344       java.lang.Object ref = id_;
2345       if (!(ref instanceof java.lang.String)) {
2346         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2347         java.lang.String s = bs.toStringUtf8();
2348         id_ = s;
2349         return s;
2350       } else {
2351         return (java.lang.String) ref;
2352       }
2353     }
2354     /**
2355      *
2356      *
2357      * <pre>
2358      * Output only. Unique identifier of the trigger.
2359      * </pre>
2360      *
2361      * <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2362      *
2363      * @return The bytes for id.
2364      */
getIdBytes()2365     public com.google.protobuf.ByteString getIdBytes() {
2366       java.lang.Object ref = id_;
2367       if (ref instanceof String) {
2368         com.google.protobuf.ByteString b =
2369             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2370         id_ = b;
2371         return b;
2372       } else {
2373         return (com.google.protobuf.ByteString) ref;
2374       }
2375     }
2376     /**
2377      *
2378      *
2379      * <pre>
2380      * Output only. Unique identifier of the trigger.
2381      * </pre>
2382      *
2383      * <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2384      *
2385      * @param value The id to set.
2386      * @return This builder for chaining.
2387      */
setId(java.lang.String value)2388     public Builder setId(java.lang.String value) {
2389       if (value == null) {
2390         throw new NullPointerException();
2391       }
2392       id_ = value;
2393       bitField0_ |= 0x00000002;
2394       onChanged();
2395       return this;
2396     }
2397     /**
2398      *
2399      *
2400      * <pre>
2401      * Output only. Unique identifier of the trigger.
2402      * </pre>
2403      *
2404      * <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2405      *
2406      * @return This builder for chaining.
2407      */
clearId()2408     public Builder clearId() {
2409       id_ = getDefaultInstance().getId();
2410       bitField0_ = (bitField0_ & ~0x00000002);
2411       onChanged();
2412       return this;
2413     }
2414     /**
2415      *
2416      *
2417      * <pre>
2418      * Output only. Unique identifier of the trigger.
2419      * </pre>
2420      *
2421      * <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2422      *
2423      * @param value The bytes for id to set.
2424      * @return This builder for chaining.
2425      */
setIdBytes(com.google.protobuf.ByteString value)2426     public Builder setIdBytes(com.google.protobuf.ByteString value) {
2427       if (value == null) {
2428         throw new NullPointerException();
2429       }
2430       checkByteStringIsUtf8(value);
2431       id_ = value;
2432       bitField0_ |= 0x00000002;
2433       onChanged();
2434       return this;
2435     }
2436 
2437     private java.lang.Object description_ = "";
2438     /**
2439      *
2440      *
2441      * <pre>
2442      * Human-readable description of this trigger.
2443      * </pre>
2444      *
2445      * <code>string description = 10;</code>
2446      *
2447      * @return The description.
2448      */
getDescription()2449     public java.lang.String getDescription() {
2450       java.lang.Object ref = description_;
2451       if (!(ref instanceof java.lang.String)) {
2452         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2453         java.lang.String s = bs.toStringUtf8();
2454         description_ = s;
2455         return s;
2456       } else {
2457         return (java.lang.String) ref;
2458       }
2459     }
2460     /**
2461      *
2462      *
2463      * <pre>
2464      * Human-readable description of this trigger.
2465      * </pre>
2466      *
2467      * <code>string description = 10;</code>
2468      *
2469      * @return The bytes for description.
2470      */
getDescriptionBytes()2471     public com.google.protobuf.ByteString getDescriptionBytes() {
2472       java.lang.Object ref = description_;
2473       if (ref instanceof String) {
2474         com.google.protobuf.ByteString b =
2475             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2476         description_ = b;
2477         return b;
2478       } else {
2479         return (com.google.protobuf.ByteString) ref;
2480       }
2481     }
2482     /**
2483      *
2484      *
2485      * <pre>
2486      * Human-readable description of this trigger.
2487      * </pre>
2488      *
2489      * <code>string description = 10;</code>
2490      *
2491      * @param value The description to set.
2492      * @return This builder for chaining.
2493      */
setDescription(java.lang.String value)2494     public Builder setDescription(java.lang.String value) {
2495       if (value == null) {
2496         throw new NullPointerException();
2497       }
2498       description_ = value;
2499       bitField0_ |= 0x00000004;
2500       onChanged();
2501       return this;
2502     }
2503     /**
2504      *
2505      *
2506      * <pre>
2507      * Human-readable description of this trigger.
2508      * </pre>
2509      *
2510      * <code>string description = 10;</code>
2511      *
2512      * @return This builder for chaining.
2513      */
clearDescription()2514     public Builder clearDescription() {
2515       description_ = getDefaultInstance().getDescription();
2516       bitField0_ = (bitField0_ & ~0x00000004);
2517       onChanged();
2518       return this;
2519     }
2520     /**
2521      *
2522      *
2523      * <pre>
2524      * Human-readable description of this trigger.
2525      * </pre>
2526      *
2527      * <code>string description = 10;</code>
2528      *
2529      * @param value The bytes for description to set.
2530      * @return This builder for chaining.
2531      */
setDescriptionBytes(com.google.protobuf.ByteString value)2532     public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
2533       if (value == null) {
2534         throw new NullPointerException();
2535       }
2536       checkByteStringIsUtf8(value);
2537       description_ = value;
2538       bitField0_ |= 0x00000004;
2539       onChanged();
2540       return this;
2541     }
2542 
2543     private java.lang.Object name_ = "";
2544     /**
2545      *
2546      *
2547      * <pre>
2548      * User-assigned name of the trigger. Must be unique within the project.
2549      * Trigger names must meet the following requirements:
2550      * + They must contain only alphanumeric characters and dashes.
2551      * + They can be 1-64 characters long.
2552      * + They must begin and end with an alphanumeric character.
2553      * </pre>
2554      *
2555      * <code>string name = 21;</code>
2556      *
2557      * @return The name.
2558      */
getName()2559     public java.lang.String getName() {
2560       java.lang.Object ref = name_;
2561       if (!(ref instanceof java.lang.String)) {
2562         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2563         java.lang.String s = bs.toStringUtf8();
2564         name_ = s;
2565         return s;
2566       } else {
2567         return (java.lang.String) ref;
2568       }
2569     }
2570     /**
2571      *
2572      *
2573      * <pre>
2574      * User-assigned name of the trigger. Must be unique within the project.
2575      * Trigger names must meet the following requirements:
2576      * + They must contain only alphanumeric characters and dashes.
2577      * + They can be 1-64 characters long.
2578      * + They must begin and end with an alphanumeric character.
2579      * </pre>
2580      *
2581      * <code>string name = 21;</code>
2582      *
2583      * @return The bytes for name.
2584      */
getNameBytes()2585     public com.google.protobuf.ByteString getNameBytes() {
2586       java.lang.Object ref = name_;
2587       if (ref instanceof String) {
2588         com.google.protobuf.ByteString b =
2589             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2590         name_ = b;
2591         return b;
2592       } else {
2593         return (com.google.protobuf.ByteString) ref;
2594       }
2595     }
2596     /**
2597      *
2598      *
2599      * <pre>
2600      * User-assigned name of the trigger. Must be unique within the project.
2601      * Trigger names must meet the following requirements:
2602      * + They must contain only alphanumeric characters and dashes.
2603      * + They can be 1-64 characters long.
2604      * + They must begin and end with an alphanumeric character.
2605      * </pre>
2606      *
2607      * <code>string name = 21;</code>
2608      *
2609      * @param value The name to set.
2610      * @return This builder for chaining.
2611      */
setName(java.lang.String value)2612     public Builder setName(java.lang.String value) {
2613       if (value == null) {
2614         throw new NullPointerException();
2615       }
2616       name_ = value;
2617       bitField0_ |= 0x00000008;
2618       onChanged();
2619       return this;
2620     }
2621     /**
2622      *
2623      *
2624      * <pre>
2625      * User-assigned name of the trigger. Must be unique within the project.
2626      * Trigger names must meet the following requirements:
2627      * + They must contain only alphanumeric characters and dashes.
2628      * + They can be 1-64 characters long.
2629      * + They must begin and end with an alphanumeric character.
2630      * </pre>
2631      *
2632      * <code>string name = 21;</code>
2633      *
2634      * @return This builder for chaining.
2635      */
clearName()2636     public Builder clearName() {
2637       name_ = getDefaultInstance().getName();
2638       bitField0_ = (bitField0_ & ~0x00000008);
2639       onChanged();
2640       return this;
2641     }
2642     /**
2643      *
2644      *
2645      * <pre>
2646      * User-assigned name of the trigger. Must be unique within the project.
2647      * Trigger names must meet the following requirements:
2648      * + They must contain only alphanumeric characters and dashes.
2649      * + They can be 1-64 characters long.
2650      * + They must begin and end with an alphanumeric character.
2651      * </pre>
2652      *
2653      * <code>string name = 21;</code>
2654      *
2655      * @param value The bytes for name to set.
2656      * @return This builder for chaining.
2657      */
setNameBytes(com.google.protobuf.ByteString value)2658     public Builder setNameBytes(com.google.protobuf.ByteString value) {
2659       if (value == null) {
2660         throw new NullPointerException();
2661       }
2662       checkByteStringIsUtf8(value);
2663       name_ = value;
2664       bitField0_ |= 0x00000008;
2665       onChanged();
2666       return this;
2667     }
2668 
2669     private com.google.protobuf.LazyStringList tags_ =
2670         com.google.protobuf.LazyStringArrayList.EMPTY;
2671 
ensureTagsIsMutable()2672     private void ensureTagsIsMutable() {
2673       if (!((bitField0_ & 0x00000010) != 0)) {
2674         tags_ = new com.google.protobuf.LazyStringArrayList(tags_);
2675         bitField0_ |= 0x00000010;
2676       }
2677     }
2678     /**
2679      *
2680      *
2681      * <pre>
2682      * Tags for annotation of a `BuildTrigger`
2683      * </pre>
2684      *
2685      * <code>repeated string tags = 19;</code>
2686      *
2687      * @return A list containing the tags.
2688      */
getTagsList()2689     public com.google.protobuf.ProtocolStringList getTagsList() {
2690       return tags_.getUnmodifiableView();
2691     }
2692     /**
2693      *
2694      *
2695      * <pre>
2696      * Tags for annotation of a `BuildTrigger`
2697      * </pre>
2698      *
2699      * <code>repeated string tags = 19;</code>
2700      *
2701      * @return The count of tags.
2702      */
getTagsCount()2703     public int getTagsCount() {
2704       return tags_.size();
2705     }
2706     /**
2707      *
2708      *
2709      * <pre>
2710      * Tags for annotation of a `BuildTrigger`
2711      * </pre>
2712      *
2713      * <code>repeated string tags = 19;</code>
2714      *
2715      * @param index The index of the element to return.
2716      * @return The tags at the given index.
2717      */
getTags(int index)2718     public java.lang.String getTags(int index) {
2719       return tags_.get(index);
2720     }
2721     /**
2722      *
2723      *
2724      * <pre>
2725      * Tags for annotation of a `BuildTrigger`
2726      * </pre>
2727      *
2728      * <code>repeated string tags = 19;</code>
2729      *
2730      * @param index The index of the value to return.
2731      * @return The bytes of the tags at the given index.
2732      */
getTagsBytes(int index)2733     public com.google.protobuf.ByteString getTagsBytes(int index) {
2734       return tags_.getByteString(index);
2735     }
2736     /**
2737      *
2738      *
2739      * <pre>
2740      * Tags for annotation of a `BuildTrigger`
2741      * </pre>
2742      *
2743      * <code>repeated string tags = 19;</code>
2744      *
2745      * @param index The index to set the value at.
2746      * @param value The tags to set.
2747      * @return This builder for chaining.
2748      */
setTags(int index, java.lang.String value)2749     public Builder setTags(int index, java.lang.String value) {
2750       if (value == null) {
2751         throw new NullPointerException();
2752       }
2753       ensureTagsIsMutable();
2754       tags_.set(index, value);
2755       onChanged();
2756       return this;
2757     }
2758     /**
2759      *
2760      *
2761      * <pre>
2762      * Tags for annotation of a `BuildTrigger`
2763      * </pre>
2764      *
2765      * <code>repeated string tags = 19;</code>
2766      *
2767      * @param value The tags to add.
2768      * @return This builder for chaining.
2769      */
addTags(java.lang.String value)2770     public Builder addTags(java.lang.String value) {
2771       if (value == null) {
2772         throw new NullPointerException();
2773       }
2774       ensureTagsIsMutable();
2775       tags_.add(value);
2776       onChanged();
2777       return this;
2778     }
2779     /**
2780      *
2781      *
2782      * <pre>
2783      * Tags for annotation of a `BuildTrigger`
2784      * </pre>
2785      *
2786      * <code>repeated string tags = 19;</code>
2787      *
2788      * @param values The tags to add.
2789      * @return This builder for chaining.
2790      */
addAllTags(java.lang.Iterable<java.lang.String> values)2791     public Builder addAllTags(java.lang.Iterable<java.lang.String> values) {
2792       ensureTagsIsMutable();
2793       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_);
2794       onChanged();
2795       return this;
2796     }
2797     /**
2798      *
2799      *
2800      * <pre>
2801      * Tags for annotation of a `BuildTrigger`
2802      * </pre>
2803      *
2804      * <code>repeated string tags = 19;</code>
2805      *
2806      * @return This builder for chaining.
2807      */
clearTags()2808     public Builder clearTags() {
2809       tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
2810       bitField0_ = (bitField0_ & ~0x00000010);
2811       onChanged();
2812       return this;
2813     }
2814     /**
2815      *
2816      *
2817      * <pre>
2818      * Tags for annotation of a `BuildTrigger`
2819      * </pre>
2820      *
2821      * <code>repeated string tags = 19;</code>
2822      *
2823      * @param value The bytes of the tags to add.
2824      * @return This builder for chaining.
2825      */
addTagsBytes(com.google.protobuf.ByteString value)2826     public Builder addTagsBytes(com.google.protobuf.ByteString value) {
2827       if (value == null) {
2828         throw new NullPointerException();
2829       }
2830       checkByteStringIsUtf8(value);
2831       ensureTagsIsMutable();
2832       tags_.add(value);
2833       onChanged();
2834       return this;
2835     }
2836 
2837     private com.google.cloudbuild.v1.RepoSource triggerTemplate_;
2838     private com.google.protobuf.SingleFieldBuilderV3<
2839             com.google.cloudbuild.v1.RepoSource,
2840             com.google.cloudbuild.v1.RepoSource.Builder,
2841             com.google.cloudbuild.v1.RepoSourceOrBuilder>
2842         triggerTemplateBuilder_;
2843     /**
2844      *
2845      *
2846      * <pre>
2847      * Template describing the types of source changes to trigger a build.
2848      * Branch and tag names in trigger templates are interpreted as regular
2849      * expressions. Any branch or tag change that matches that regular expression
2850      * will trigger a build.
2851      * Mutually exclusive with `github`.
2852      * </pre>
2853      *
2854      * <code>.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;</code>
2855      *
2856      * @return Whether the triggerTemplate field is set.
2857      */
hasTriggerTemplate()2858     public boolean hasTriggerTemplate() {
2859       return ((bitField0_ & 0x00000020) != 0);
2860     }
2861     /**
2862      *
2863      *
2864      * <pre>
2865      * Template describing the types of source changes to trigger a build.
2866      * Branch and tag names in trigger templates are interpreted as regular
2867      * expressions. Any branch or tag change that matches that regular expression
2868      * will trigger a build.
2869      * Mutually exclusive with `github`.
2870      * </pre>
2871      *
2872      * <code>.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;</code>
2873      *
2874      * @return The triggerTemplate.
2875      */
getTriggerTemplate()2876     public com.google.cloudbuild.v1.RepoSource getTriggerTemplate() {
2877       if (triggerTemplateBuilder_ == null) {
2878         return triggerTemplate_ == null
2879             ? com.google.cloudbuild.v1.RepoSource.getDefaultInstance()
2880             : triggerTemplate_;
2881       } else {
2882         return triggerTemplateBuilder_.getMessage();
2883       }
2884     }
2885     /**
2886      *
2887      *
2888      * <pre>
2889      * Template describing the types of source changes to trigger a build.
2890      * Branch and tag names in trigger templates are interpreted as regular
2891      * expressions. Any branch or tag change that matches that regular expression
2892      * will trigger a build.
2893      * Mutually exclusive with `github`.
2894      * </pre>
2895      *
2896      * <code>.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;</code>
2897      */
setTriggerTemplate(com.google.cloudbuild.v1.RepoSource value)2898     public Builder setTriggerTemplate(com.google.cloudbuild.v1.RepoSource value) {
2899       if (triggerTemplateBuilder_ == null) {
2900         if (value == null) {
2901           throw new NullPointerException();
2902         }
2903         triggerTemplate_ = value;
2904       } else {
2905         triggerTemplateBuilder_.setMessage(value);
2906       }
2907       bitField0_ |= 0x00000020;
2908       onChanged();
2909       return this;
2910     }
2911     /**
2912      *
2913      *
2914      * <pre>
2915      * Template describing the types of source changes to trigger a build.
2916      * Branch and tag names in trigger templates are interpreted as regular
2917      * expressions. Any branch or tag change that matches that regular expression
2918      * will trigger a build.
2919      * Mutually exclusive with `github`.
2920      * </pre>
2921      *
2922      * <code>.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;</code>
2923      */
setTriggerTemplate(com.google.cloudbuild.v1.RepoSource.Builder builderForValue)2924     public Builder setTriggerTemplate(com.google.cloudbuild.v1.RepoSource.Builder builderForValue) {
2925       if (triggerTemplateBuilder_ == null) {
2926         triggerTemplate_ = builderForValue.build();
2927       } else {
2928         triggerTemplateBuilder_.setMessage(builderForValue.build());
2929       }
2930       bitField0_ |= 0x00000020;
2931       onChanged();
2932       return this;
2933     }
2934     /**
2935      *
2936      *
2937      * <pre>
2938      * Template describing the types of source changes to trigger a build.
2939      * Branch and tag names in trigger templates are interpreted as regular
2940      * expressions. Any branch or tag change that matches that regular expression
2941      * will trigger a build.
2942      * Mutually exclusive with `github`.
2943      * </pre>
2944      *
2945      * <code>.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;</code>
2946      */
mergeTriggerTemplate(com.google.cloudbuild.v1.RepoSource value)2947     public Builder mergeTriggerTemplate(com.google.cloudbuild.v1.RepoSource value) {
2948       if (triggerTemplateBuilder_ == null) {
2949         if (((bitField0_ & 0x00000020) != 0)
2950             && triggerTemplate_ != null
2951             && triggerTemplate_ != com.google.cloudbuild.v1.RepoSource.getDefaultInstance()) {
2952           getTriggerTemplateBuilder().mergeFrom(value);
2953         } else {
2954           triggerTemplate_ = value;
2955         }
2956       } else {
2957         triggerTemplateBuilder_.mergeFrom(value);
2958       }
2959       bitField0_ |= 0x00000020;
2960       onChanged();
2961       return this;
2962     }
2963     /**
2964      *
2965      *
2966      * <pre>
2967      * Template describing the types of source changes to trigger a build.
2968      * Branch and tag names in trigger templates are interpreted as regular
2969      * expressions. Any branch or tag change that matches that regular expression
2970      * will trigger a build.
2971      * Mutually exclusive with `github`.
2972      * </pre>
2973      *
2974      * <code>.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;</code>
2975      */
clearTriggerTemplate()2976     public Builder clearTriggerTemplate() {
2977       bitField0_ = (bitField0_ & ~0x00000020);
2978       triggerTemplate_ = null;
2979       if (triggerTemplateBuilder_ != null) {
2980         triggerTemplateBuilder_.dispose();
2981         triggerTemplateBuilder_ = null;
2982       }
2983       onChanged();
2984       return this;
2985     }
2986     /**
2987      *
2988      *
2989      * <pre>
2990      * Template describing the types of source changes to trigger a build.
2991      * Branch and tag names in trigger templates are interpreted as regular
2992      * expressions. Any branch or tag change that matches that regular expression
2993      * will trigger a build.
2994      * Mutually exclusive with `github`.
2995      * </pre>
2996      *
2997      * <code>.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;</code>
2998      */
getTriggerTemplateBuilder()2999     public com.google.cloudbuild.v1.RepoSource.Builder getTriggerTemplateBuilder() {
3000       bitField0_ |= 0x00000020;
3001       onChanged();
3002       return getTriggerTemplateFieldBuilder().getBuilder();
3003     }
3004     /**
3005      *
3006      *
3007      * <pre>
3008      * Template describing the types of source changes to trigger a build.
3009      * Branch and tag names in trigger templates are interpreted as regular
3010      * expressions. Any branch or tag change that matches that regular expression
3011      * will trigger a build.
3012      * Mutually exclusive with `github`.
3013      * </pre>
3014      *
3015      * <code>.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;</code>
3016      */
getTriggerTemplateOrBuilder()3017     public com.google.cloudbuild.v1.RepoSourceOrBuilder getTriggerTemplateOrBuilder() {
3018       if (triggerTemplateBuilder_ != null) {
3019         return triggerTemplateBuilder_.getMessageOrBuilder();
3020       } else {
3021         return triggerTemplate_ == null
3022             ? com.google.cloudbuild.v1.RepoSource.getDefaultInstance()
3023             : triggerTemplate_;
3024       }
3025     }
3026     /**
3027      *
3028      *
3029      * <pre>
3030      * Template describing the types of source changes to trigger a build.
3031      * Branch and tag names in trigger templates are interpreted as regular
3032      * expressions. Any branch or tag change that matches that regular expression
3033      * will trigger a build.
3034      * Mutually exclusive with `github`.
3035      * </pre>
3036      *
3037      * <code>.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;</code>
3038      */
3039     private com.google.protobuf.SingleFieldBuilderV3<
3040             com.google.cloudbuild.v1.RepoSource,
3041             com.google.cloudbuild.v1.RepoSource.Builder,
3042             com.google.cloudbuild.v1.RepoSourceOrBuilder>
getTriggerTemplateFieldBuilder()3043         getTriggerTemplateFieldBuilder() {
3044       if (triggerTemplateBuilder_ == null) {
3045         triggerTemplateBuilder_ =
3046             new com.google.protobuf.SingleFieldBuilderV3<
3047                 com.google.cloudbuild.v1.RepoSource,
3048                 com.google.cloudbuild.v1.RepoSource.Builder,
3049                 com.google.cloudbuild.v1.RepoSourceOrBuilder>(
3050                 getTriggerTemplate(), getParentForChildren(), isClean());
3051         triggerTemplate_ = null;
3052       }
3053       return triggerTemplateBuilder_;
3054     }
3055 
3056     private com.google.cloudbuild.v1.GitHubEventsConfig github_;
3057     private com.google.protobuf.SingleFieldBuilderV3<
3058             com.google.cloudbuild.v1.GitHubEventsConfig,
3059             com.google.cloudbuild.v1.GitHubEventsConfig.Builder,
3060             com.google.cloudbuild.v1.GitHubEventsConfigOrBuilder>
3061         githubBuilder_;
3062     /**
3063      *
3064      *
3065      * <pre>
3066      * GitHubEventsConfig describes the configuration of a trigger that creates
3067      * a build whenever a GitHub event is received.
3068      * Mutually exclusive with `trigger_template`.
3069      * </pre>
3070      *
3071      * <code>.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;</code>
3072      *
3073      * @return Whether the github field is set.
3074      */
hasGithub()3075     public boolean hasGithub() {
3076       return ((bitField0_ & 0x00000040) != 0);
3077     }
3078     /**
3079      *
3080      *
3081      * <pre>
3082      * GitHubEventsConfig describes the configuration of a trigger that creates
3083      * a build whenever a GitHub event is received.
3084      * Mutually exclusive with `trigger_template`.
3085      * </pre>
3086      *
3087      * <code>.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;</code>
3088      *
3089      * @return The github.
3090      */
getGithub()3091     public com.google.cloudbuild.v1.GitHubEventsConfig getGithub() {
3092       if (githubBuilder_ == null) {
3093         return github_ == null
3094             ? com.google.cloudbuild.v1.GitHubEventsConfig.getDefaultInstance()
3095             : github_;
3096       } else {
3097         return githubBuilder_.getMessage();
3098       }
3099     }
3100     /**
3101      *
3102      *
3103      * <pre>
3104      * GitHubEventsConfig describes the configuration of a trigger that creates
3105      * a build whenever a GitHub event is received.
3106      * Mutually exclusive with `trigger_template`.
3107      * </pre>
3108      *
3109      * <code>.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;</code>
3110      */
setGithub(com.google.cloudbuild.v1.GitHubEventsConfig value)3111     public Builder setGithub(com.google.cloudbuild.v1.GitHubEventsConfig value) {
3112       if (githubBuilder_ == null) {
3113         if (value == null) {
3114           throw new NullPointerException();
3115         }
3116         github_ = value;
3117       } else {
3118         githubBuilder_.setMessage(value);
3119       }
3120       bitField0_ |= 0x00000040;
3121       onChanged();
3122       return this;
3123     }
3124     /**
3125      *
3126      *
3127      * <pre>
3128      * GitHubEventsConfig describes the configuration of a trigger that creates
3129      * a build whenever a GitHub event is received.
3130      * Mutually exclusive with `trigger_template`.
3131      * </pre>
3132      *
3133      * <code>.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;</code>
3134      */
setGithub(com.google.cloudbuild.v1.GitHubEventsConfig.Builder builderForValue)3135     public Builder setGithub(com.google.cloudbuild.v1.GitHubEventsConfig.Builder builderForValue) {
3136       if (githubBuilder_ == null) {
3137         github_ = builderForValue.build();
3138       } else {
3139         githubBuilder_.setMessage(builderForValue.build());
3140       }
3141       bitField0_ |= 0x00000040;
3142       onChanged();
3143       return this;
3144     }
3145     /**
3146      *
3147      *
3148      * <pre>
3149      * GitHubEventsConfig describes the configuration of a trigger that creates
3150      * a build whenever a GitHub event is received.
3151      * Mutually exclusive with `trigger_template`.
3152      * </pre>
3153      *
3154      * <code>.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;</code>
3155      */
mergeGithub(com.google.cloudbuild.v1.GitHubEventsConfig value)3156     public Builder mergeGithub(com.google.cloudbuild.v1.GitHubEventsConfig value) {
3157       if (githubBuilder_ == null) {
3158         if (((bitField0_ & 0x00000040) != 0)
3159             && github_ != null
3160             && github_ != com.google.cloudbuild.v1.GitHubEventsConfig.getDefaultInstance()) {
3161           getGithubBuilder().mergeFrom(value);
3162         } else {
3163           github_ = value;
3164         }
3165       } else {
3166         githubBuilder_.mergeFrom(value);
3167       }
3168       bitField0_ |= 0x00000040;
3169       onChanged();
3170       return this;
3171     }
3172     /**
3173      *
3174      *
3175      * <pre>
3176      * GitHubEventsConfig describes the configuration of a trigger that creates
3177      * a build whenever a GitHub event is received.
3178      * Mutually exclusive with `trigger_template`.
3179      * </pre>
3180      *
3181      * <code>.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;</code>
3182      */
clearGithub()3183     public Builder clearGithub() {
3184       bitField0_ = (bitField0_ & ~0x00000040);
3185       github_ = null;
3186       if (githubBuilder_ != null) {
3187         githubBuilder_.dispose();
3188         githubBuilder_ = null;
3189       }
3190       onChanged();
3191       return this;
3192     }
3193     /**
3194      *
3195      *
3196      * <pre>
3197      * GitHubEventsConfig describes the configuration of a trigger that creates
3198      * a build whenever a GitHub event is received.
3199      * Mutually exclusive with `trigger_template`.
3200      * </pre>
3201      *
3202      * <code>.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;</code>
3203      */
getGithubBuilder()3204     public com.google.cloudbuild.v1.GitHubEventsConfig.Builder getGithubBuilder() {
3205       bitField0_ |= 0x00000040;
3206       onChanged();
3207       return getGithubFieldBuilder().getBuilder();
3208     }
3209     /**
3210      *
3211      *
3212      * <pre>
3213      * GitHubEventsConfig describes the configuration of a trigger that creates
3214      * a build whenever a GitHub event is received.
3215      * Mutually exclusive with `trigger_template`.
3216      * </pre>
3217      *
3218      * <code>.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;</code>
3219      */
getGithubOrBuilder()3220     public com.google.cloudbuild.v1.GitHubEventsConfigOrBuilder getGithubOrBuilder() {
3221       if (githubBuilder_ != null) {
3222         return githubBuilder_.getMessageOrBuilder();
3223       } else {
3224         return github_ == null
3225             ? com.google.cloudbuild.v1.GitHubEventsConfig.getDefaultInstance()
3226             : github_;
3227       }
3228     }
3229     /**
3230      *
3231      *
3232      * <pre>
3233      * GitHubEventsConfig describes the configuration of a trigger that creates
3234      * a build whenever a GitHub event is received.
3235      * Mutually exclusive with `trigger_template`.
3236      * </pre>
3237      *
3238      * <code>.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;</code>
3239      */
3240     private com.google.protobuf.SingleFieldBuilderV3<
3241             com.google.cloudbuild.v1.GitHubEventsConfig,
3242             com.google.cloudbuild.v1.GitHubEventsConfig.Builder,
3243             com.google.cloudbuild.v1.GitHubEventsConfigOrBuilder>
getGithubFieldBuilder()3244         getGithubFieldBuilder() {
3245       if (githubBuilder_ == null) {
3246         githubBuilder_ =
3247             new com.google.protobuf.SingleFieldBuilderV3<
3248                 com.google.cloudbuild.v1.GitHubEventsConfig,
3249                 com.google.cloudbuild.v1.GitHubEventsConfig.Builder,
3250                 com.google.cloudbuild.v1.GitHubEventsConfigOrBuilder>(
3251                 getGithub(), getParentForChildren(), isClean());
3252         github_ = null;
3253       }
3254       return githubBuilder_;
3255     }
3256 
3257     private com.google.cloudbuild.v1.PubsubConfig pubsubConfig_;
3258     private com.google.protobuf.SingleFieldBuilderV3<
3259             com.google.cloudbuild.v1.PubsubConfig,
3260             com.google.cloudbuild.v1.PubsubConfig.Builder,
3261             com.google.cloudbuild.v1.PubsubConfigOrBuilder>
3262         pubsubConfigBuilder_;
3263     /**
3264      *
3265      *
3266      * <pre>
3267      * PubsubConfig describes the configuration of a trigger that
3268      * creates a build whenever a Pub/Sub message is published.
3269      * </pre>
3270      *
3271      * <code>.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;</code>
3272      *
3273      * @return Whether the pubsubConfig field is set.
3274      */
hasPubsubConfig()3275     public boolean hasPubsubConfig() {
3276       return ((bitField0_ & 0x00000080) != 0);
3277     }
3278     /**
3279      *
3280      *
3281      * <pre>
3282      * PubsubConfig describes the configuration of a trigger that
3283      * creates a build whenever a Pub/Sub message is published.
3284      * </pre>
3285      *
3286      * <code>.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;</code>
3287      *
3288      * @return The pubsubConfig.
3289      */
getPubsubConfig()3290     public com.google.cloudbuild.v1.PubsubConfig getPubsubConfig() {
3291       if (pubsubConfigBuilder_ == null) {
3292         return pubsubConfig_ == null
3293             ? com.google.cloudbuild.v1.PubsubConfig.getDefaultInstance()
3294             : pubsubConfig_;
3295       } else {
3296         return pubsubConfigBuilder_.getMessage();
3297       }
3298     }
3299     /**
3300      *
3301      *
3302      * <pre>
3303      * PubsubConfig describes the configuration of a trigger that
3304      * creates a build whenever a Pub/Sub message is published.
3305      * </pre>
3306      *
3307      * <code>.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;</code>
3308      */
setPubsubConfig(com.google.cloudbuild.v1.PubsubConfig value)3309     public Builder setPubsubConfig(com.google.cloudbuild.v1.PubsubConfig value) {
3310       if (pubsubConfigBuilder_ == null) {
3311         if (value == null) {
3312           throw new NullPointerException();
3313         }
3314         pubsubConfig_ = value;
3315       } else {
3316         pubsubConfigBuilder_.setMessage(value);
3317       }
3318       bitField0_ |= 0x00000080;
3319       onChanged();
3320       return this;
3321     }
3322     /**
3323      *
3324      *
3325      * <pre>
3326      * PubsubConfig describes the configuration of a trigger that
3327      * creates a build whenever a Pub/Sub message is published.
3328      * </pre>
3329      *
3330      * <code>.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;</code>
3331      */
setPubsubConfig(com.google.cloudbuild.v1.PubsubConfig.Builder builderForValue)3332     public Builder setPubsubConfig(com.google.cloudbuild.v1.PubsubConfig.Builder builderForValue) {
3333       if (pubsubConfigBuilder_ == null) {
3334         pubsubConfig_ = builderForValue.build();
3335       } else {
3336         pubsubConfigBuilder_.setMessage(builderForValue.build());
3337       }
3338       bitField0_ |= 0x00000080;
3339       onChanged();
3340       return this;
3341     }
3342     /**
3343      *
3344      *
3345      * <pre>
3346      * PubsubConfig describes the configuration of a trigger that
3347      * creates a build whenever a Pub/Sub message is published.
3348      * </pre>
3349      *
3350      * <code>.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;</code>
3351      */
mergePubsubConfig(com.google.cloudbuild.v1.PubsubConfig value)3352     public Builder mergePubsubConfig(com.google.cloudbuild.v1.PubsubConfig value) {
3353       if (pubsubConfigBuilder_ == null) {
3354         if (((bitField0_ & 0x00000080) != 0)
3355             && pubsubConfig_ != null
3356             && pubsubConfig_ != com.google.cloudbuild.v1.PubsubConfig.getDefaultInstance()) {
3357           getPubsubConfigBuilder().mergeFrom(value);
3358         } else {
3359           pubsubConfig_ = value;
3360         }
3361       } else {
3362         pubsubConfigBuilder_.mergeFrom(value);
3363       }
3364       bitField0_ |= 0x00000080;
3365       onChanged();
3366       return this;
3367     }
3368     /**
3369      *
3370      *
3371      * <pre>
3372      * PubsubConfig describes the configuration of a trigger that
3373      * creates a build whenever a Pub/Sub message is published.
3374      * </pre>
3375      *
3376      * <code>.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;</code>
3377      */
clearPubsubConfig()3378     public Builder clearPubsubConfig() {
3379       bitField0_ = (bitField0_ & ~0x00000080);
3380       pubsubConfig_ = null;
3381       if (pubsubConfigBuilder_ != null) {
3382         pubsubConfigBuilder_.dispose();
3383         pubsubConfigBuilder_ = null;
3384       }
3385       onChanged();
3386       return this;
3387     }
3388     /**
3389      *
3390      *
3391      * <pre>
3392      * PubsubConfig describes the configuration of a trigger that
3393      * creates a build whenever a Pub/Sub message is published.
3394      * </pre>
3395      *
3396      * <code>.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;</code>
3397      */
getPubsubConfigBuilder()3398     public com.google.cloudbuild.v1.PubsubConfig.Builder getPubsubConfigBuilder() {
3399       bitField0_ |= 0x00000080;
3400       onChanged();
3401       return getPubsubConfigFieldBuilder().getBuilder();
3402     }
3403     /**
3404      *
3405      *
3406      * <pre>
3407      * PubsubConfig describes the configuration of a trigger that
3408      * creates a build whenever a Pub/Sub message is published.
3409      * </pre>
3410      *
3411      * <code>.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;</code>
3412      */
getPubsubConfigOrBuilder()3413     public com.google.cloudbuild.v1.PubsubConfigOrBuilder getPubsubConfigOrBuilder() {
3414       if (pubsubConfigBuilder_ != null) {
3415         return pubsubConfigBuilder_.getMessageOrBuilder();
3416       } else {
3417         return pubsubConfig_ == null
3418             ? com.google.cloudbuild.v1.PubsubConfig.getDefaultInstance()
3419             : pubsubConfig_;
3420       }
3421     }
3422     /**
3423      *
3424      *
3425      * <pre>
3426      * PubsubConfig describes the configuration of a trigger that
3427      * creates a build whenever a Pub/Sub message is published.
3428      * </pre>
3429      *
3430      * <code>.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;</code>
3431      */
3432     private com.google.protobuf.SingleFieldBuilderV3<
3433             com.google.cloudbuild.v1.PubsubConfig,
3434             com.google.cloudbuild.v1.PubsubConfig.Builder,
3435             com.google.cloudbuild.v1.PubsubConfigOrBuilder>
getPubsubConfigFieldBuilder()3436         getPubsubConfigFieldBuilder() {
3437       if (pubsubConfigBuilder_ == null) {
3438         pubsubConfigBuilder_ =
3439             new com.google.protobuf.SingleFieldBuilderV3<
3440                 com.google.cloudbuild.v1.PubsubConfig,
3441                 com.google.cloudbuild.v1.PubsubConfig.Builder,
3442                 com.google.cloudbuild.v1.PubsubConfigOrBuilder>(
3443                 getPubsubConfig(), getParentForChildren(), isClean());
3444         pubsubConfig_ = null;
3445       }
3446       return pubsubConfigBuilder_;
3447     }
3448 
3449     private com.google.cloudbuild.v1.WebhookConfig webhookConfig_;
3450     private com.google.protobuf.SingleFieldBuilderV3<
3451             com.google.cloudbuild.v1.WebhookConfig,
3452             com.google.cloudbuild.v1.WebhookConfig.Builder,
3453             com.google.cloudbuild.v1.WebhookConfigOrBuilder>
3454         webhookConfigBuilder_;
3455     /**
3456      *
3457      *
3458      * <pre>
3459      * WebhookConfig describes the configuration of a trigger that
3460      * creates a build whenever a webhook is sent to a trigger's webhook URL.
3461      * </pre>
3462      *
3463      * <code>.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;</code>
3464      *
3465      * @return Whether the webhookConfig field is set.
3466      */
hasWebhookConfig()3467     public boolean hasWebhookConfig() {
3468       return ((bitField0_ & 0x00000100) != 0);
3469     }
3470     /**
3471      *
3472      *
3473      * <pre>
3474      * WebhookConfig describes the configuration of a trigger that
3475      * creates a build whenever a webhook is sent to a trigger's webhook URL.
3476      * </pre>
3477      *
3478      * <code>.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;</code>
3479      *
3480      * @return The webhookConfig.
3481      */
getWebhookConfig()3482     public com.google.cloudbuild.v1.WebhookConfig getWebhookConfig() {
3483       if (webhookConfigBuilder_ == null) {
3484         return webhookConfig_ == null
3485             ? com.google.cloudbuild.v1.WebhookConfig.getDefaultInstance()
3486             : webhookConfig_;
3487       } else {
3488         return webhookConfigBuilder_.getMessage();
3489       }
3490     }
3491     /**
3492      *
3493      *
3494      * <pre>
3495      * WebhookConfig describes the configuration of a trigger that
3496      * creates a build whenever a webhook is sent to a trigger's webhook URL.
3497      * </pre>
3498      *
3499      * <code>.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;</code>
3500      */
setWebhookConfig(com.google.cloudbuild.v1.WebhookConfig value)3501     public Builder setWebhookConfig(com.google.cloudbuild.v1.WebhookConfig value) {
3502       if (webhookConfigBuilder_ == null) {
3503         if (value == null) {
3504           throw new NullPointerException();
3505         }
3506         webhookConfig_ = value;
3507       } else {
3508         webhookConfigBuilder_.setMessage(value);
3509       }
3510       bitField0_ |= 0x00000100;
3511       onChanged();
3512       return this;
3513     }
3514     /**
3515      *
3516      *
3517      * <pre>
3518      * WebhookConfig describes the configuration of a trigger that
3519      * creates a build whenever a webhook is sent to a trigger's webhook URL.
3520      * </pre>
3521      *
3522      * <code>.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;</code>
3523      */
setWebhookConfig( com.google.cloudbuild.v1.WebhookConfig.Builder builderForValue)3524     public Builder setWebhookConfig(
3525         com.google.cloudbuild.v1.WebhookConfig.Builder builderForValue) {
3526       if (webhookConfigBuilder_ == null) {
3527         webhookConfig_ = builderForValue.build();
3528       } else {
3529         webhookConfigBuilder_.setMessage(builderForValue.build());
3530       }
3531       bitField0_ |= 0x00000100;
3532       onChanged();
3533       return this;
3534     }
3535     /**
3536      *
3537      *
3538      * <pre>
3539      * WebhookConfig describes the configuration of a trigger that
3540      * creates a build whenever a webhook is sent to a trigger's webhook URL.
3541      * </pre>
3542      *
3543      * <code>.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;</code>
3544      */
mergeWebhookConfig(com.google.cloudbuild.v1.WebhookConfig value)3545     public Builder mergeWebhookConfig(com.google.cloudbuild.v1.WebhookConfig value) {
3546       if (webhookConfigBuilder_ == null) {
3547         if (((bitField0_ & 0x00000100) != 0)
3548             && webhookConfig_ != null
3549             && webhookConfig_ != com.google.cloudbuild.v1.WebhookConfig.getDefaultInstance()) {
3550           getWebhookConfigBuilder().mergeFrom(value);
3551         } else {
3552           webhookConfig_ = value;
3553         }
3554       } else {
3555         webhookConfigBuilder_.mergeFrom(value);
3556       }
3557       bitField0_ |= 0x00000100;
3558       onChanged();
3559       return this;
3560     }
3561     /**
3562      *
3563      *
3564      * <pre>
3565      * WebhookConfig describes the configuration of a trigger that
3566      * creates a build whenever a webhook is sent to a trigger's webhook URL.
3567      * </pre>
3568      *
3569      * <code>.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;</code>
3570      */
clearWebhookConfig()3571     public Builder clearWebhookConfig() {
3572       bitField0_ = (bitField0_ & ~0x00000100);
3573       webhookConfig_ = null;
3574       if (webhookConfigBuilder_ != null) {
3575         webhookConfigBuilder_.dispose();
3576         webhookConfigBuilder_ = null;
3577       }
3578       onChanged();
3579       return this;
3580     }
3581     /**
3582      *
3583      *
3584      * <pre>
3585      * WebhookConfig describes the configuration of a trigger that
3586      * creates a build whenever a webhook is sent to a trigger's webhook URL.
3587      * </pre>
3588      *
3589      * <code>.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;</code>
3590      */
getWebhookConfigBuilder()3591     public com.google.cloudbuild.v1.WebhookConfig.Builder getWebhookConfigBuilder() {
3592       bitField0_ |= 0x00000100;
3593       onChanged();
3594       return getWebhookConfigFieldBuilder().getBuilder();
3595     }
3596     /**
3597      *
3598      *
3599      * <pre>
3600      * WebhookConfig describes the configuration of a trigger that
3601      * creates a build whenever a webhook is sent to a trigger's webhook URL.
3602      * </pre>
3603      *
3604      * <code>.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;</code>
3605      */
getWebhookConfigOrBuilder()3606     public com.google.cloudbuild.v1.WebhookConfigOrBuilder getWebhookConfigOrBuilder() {
3607       if (webhookConfigBuilder_ != null) {
3608         return webhookConfigBuilder_.getMessageOrBuilder();
3609       } else {
3610         return webhookConfig_ == null
3611             ? com.google.cloudbuild.v1.WebhookConfig.getDefaultInstance()
3612             : webhookConfig_;
3613       }
3614     }
3615     /**
3616      *
3617      *
3618      * <pre>
3619      * WebhookConfig describes the configuration of a trigger that
3620      * creates a build whenever a webhook is sent to a trigger's webhook URL.
3621      * </pre>
3622      *
3623      * <code>.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;</code>
3624      */
3625     private com.google.protobuf.SingleFieldBuilderV3<
3626             com.google.cloudbuild.v1.WebhookConfig,
3627             com.google.cloudbuild.v1.WebhookConfig.Builder,
3628             com.google.cloudbuild.v1.WebhookConfigOrBuilder>
getWebhookConfigFieldBuilder()3629         getWebhookConfigFieldBuilder() {
3630       if (webhookConfigBuilder_ == null) {
3631         webhookConfigBuilder_ =
3632             new com.google.protobuf.SingleFieldBuilderV3<
3633                 com.google.cloudbuild.v1.WebhookConfig,
3634                 com.google.cloudbuild.v1.WebhookConfig.Builder,
3635                 com.google.cloudbuild.v1.WebhookConfigOrBuilder>(
3636                 getWebhookConfig(), getParentForChildren(), isClean());
3637         webhookConfig_ = null;
3638       }
3639       return webhookConfigBuilder_;
3640     }
3641 
3642     /**
3643      *
3644      *
3645      * <pre>
3646      * Autodetect build configuration.  The following precedence is used (case
3647      * insensitive):
3648      * 1. cloudbuild.yaml
3649      * 2. cloudbuild.yml
3650      * 3. cloudbuild.json
3651      * 4. Dockerfile
3652      * Currently only available for GitHub App Triggers.
3653      * </pre>
3654      *
3655      * <code>bool autodetect = 18;</code>
3656      *
3657      * @return Whether the autodetect field is set.
3658      */
hasAutodetect()3659     public boolean hasAutodetect() {
3660       return buildTemplateCase_ == 18;
3661     }
3662     /**
3663      *
3664      *
3665      * <pre>
3666      * Autodetect build configuration.  The following precedence is used (case
3667      * insensitive):
3668      * 1. cloudbuild.yaml
3669      * 2. cloudbuild.yml
3670      * 3. cloudbuild.json
3671      * 4. Dockerfile
3672      * Currently only available for GitHub App Triggers.
3673      * </pre>
3674      *
3675      * <code>bool autodetect = 18;</code>
3676      *
3677      * @return The autodetect.
3678      */
getAutodetect()3679     public boolean getAutodetect() {
3680       if (buildTemplateCase_ == 18) {
3681         return (java.lang.Boolean) buildTemplate_;
3682       }
3683       return false;
3684     }
3685     /**
3686      *
3687      *
3688      * <pre>
3689      * Autodetect build configuration.  The following precedence is used (case
3690      * insensitive):
3691      * 1. cloudbuild.yaml
3692      * 2. cloudbuild.yml
3693      * 3. cloudbuild.json
3694      * 4. Dockerfile
3695      * Currently only available for GitHub App Triggers.
3696      * </pre>
3697      *
3698      * <code>bool autodetect = 18;</code>
3699      *
3700      * @param value The autodetect to set.
3701      * @return This builder for chaining.
3702      */
setAutodetect(boolean value)3703     public Builder setAutodetect(boolean value) {
3704 
3705       buildTemplateCase_ = 18;
3706       buildTemplate_ = value;
3707       onChanged();
3708       return this;
3709     }
3710     /**
3711      *
3712      *
3713      * <pre>
3714      * Autodetect build configuration.  The following precedence is used (case
3715      * insensitive):
3716      * 1. cloudbuild.yaml
3717      * 2. cloudbuild.yml
3718      * 3. cloudbuild.json
3719      * 4. Dockerfile
3720      * Currently only available for GitHub App Triggers.
3721      * </pre>
3722      *
3723      * <code>bool autodetect = 18;</code>
3724      *
3725      * @return This builder for chaining.
3726      */
clearAutodetect()3727     public Builder clearAutodetect() {
3728       if (buildTemplateCase_ == 18) {
3729         buildTemplateCase_ = 0;
3730         buildTemplate_ = null;
3731         onChanged();
3732       }
3733       return this;
3734     }
3735 
3736     private com.google.protobuf.SingleFieldBuilderV3<
3737             com.google.cloudbuild.v1.Build,
3738             com.google.cloudbuild.v1.Build.Builder,
3739             com.google.cloudbuild.v1.BuildOrBuilder>
3740         buildBuilder_;
3741     /**
3742      *
3743      *
3744      * <pre>
3745      * Contents of the build template.
3746      * </pre>
3747      *
3748      * <code>.google.devtools.cloudbuild.v1.Build build = 4;</code>
3749      *
3750      * @return Whether the build field is set.
3751      */
3752     @java.lang.Override
hasBuild()3753     public boolean hasBuild() {
3754       return buildTemplateCase_ == 4;
3755     }
3756     /**
3757      *
3758      *
3759      * <pre>
3760      * Contents of the build template.
3761      * </pre>
3762      *
3763      * <code>.google.devtools.cloudbuild.v1.Build build = 4;</code>
3764      *
3765      * @return The build.
3766      */
3767     @java.lang.Override
getBuild()3768     public com.google.cloudbuild.v1.Build getBuild() {
3769       if (buildBuilder_ == null) {
3770         if (buildTemplateCase_ == 4) {
3771           return (com.google.cloudbuild.v1.Build) buildTemplate_;
3772         }
3773         return com.google.cloudbuild.v1.Build.getDefaultInstance();
3774       } else {
3775         if (buildTemplateCase_ == 4) {
3776           return buildBuilder_.getMessage();
3777         }
3778         return com.google.cloudbuild.v1.Build.getDefaultInstance();
3779       }
3780     }
3781     /**
3782      *
3783      *
3784      * <pre>
3785      * Contents of the build template.
3786      * </pre>
3787      *
3788      * <code>.google.devtools.cloudbuild.v1.Build build = 4;</code>
3789      */
setBuild(com.google.cloudbuild.v1.Build value)3790     public Builder setBuild(com.google.cloudbuild.v1.Build value) {
3791       if (buildBuilder_ == null) {
3792         if (value == null) {
3793           throw new NullPointerException();
3794         }
3795         buildTemplate_ = value;
3796         onChanged();
3797       } else {
3798         buildBuilder_.setMessage(value);
3799       }
3800       buildTemplateCase_ = 4;
3801       return this;
3802     }
3803     /**
3804      *
3805      *
3806      * <pre>
3807      * Contents of the build template.
3808      * </pre>
3809      *
3810      * <code>.google.devtools.cloudbuild.v1.Build build = 4;</code>
3811      */
setBuild(com.google.cloudbuild.v1.Build.Builder builderForValue)3812     public Builder setBuild(com.google.cloudbuild.v1.Build.Builder builderForValue) {
3813       if (buildBuilder_ == null) {
3814         buildTemplate_ = builderForValue.build();
3815         onChanged();
3816       } else {
3817         buildBuilder_.setMessage(builderForValue.build());
3818       }
3819       buildTemplateCase_ = 4;
3820       return this;
3821     }
3822     /**
3823      *
3824      *
3825      * <pre>
3826      * Contents of the build template.
3827      * </pre>
3828      *
3829      * <code>.google.devtools.cloudbuild.v1.Build build = 4;</code>
3830      */
mergeBuild(com.google.cloudbuild.v1.Build value)3831     public Builder mergeBuild(com.google.cloudbuild.v1.Build value) {
3832       if (buildBuilder_ == null) {
3833         if (buildTemplateCase_ == 4
3834             && buildTemplate_ != com.google.cloudbuild.v1.Build.getDefaultInstance()) {
3835           buildTemplate_ =
3836               com.google.cloudbuild.v1.Build.newBuilder(
3837                       (com.google.cloudbuild.v1.Build) buildTemplate_)
3838                   .mergeFrom(value)
3839                   .buildPartial();
3840         } else {
3841           buildTemplate_ = value;
3842         }
3843         onChanged();
3844       } else {
3845         if (buildTemplateCase_ == 4) {
3846           buildBuilder_.mergeFrom(value);
3847         } else {
3848           buildBuilder_.setMessage(value);
3849         }
3850       }
3851       buildTemplateCase_ = 4;
3852       return this;
3853     }
3854     /**
3855      *
3856      *
3857      * <pre>
3858      * Contents of the build template.
3859      * </pre>
3860      *
3861      * <code>.google.devtools.cloudbuild.v1.Build build = 4;</code>
3862      */
clearBuild()3863     public Builder clearBuild() {
3864       if (buildBuilder_ == null) {
3865         if (buildTemplateCase_ == 4) {
3866           buildTemplateCase_ = 0;
3867           buildTemplate_ = null;
3868           onChanged();
3869         }
3870       } else {
3871         if (buildTemplateCase_ == 4) {
3872           buildTemplateCase_ = 0;
3873           buildTemplate_ = null;
3874         }
3875         buildBuilder_.clear();
3876       }
3877       return this;
3878     }
3879     /**
3880      *
3881      *
3882      * <pre>
3883      * Contents of the build template.
3884      * </pre>
3885      *
3886      * <code>.google.devtools.cloudbuild.v1.Build build = 4;</code>
3887      */
getBuildBuilder()3888     public com.google.cloudbuild.v1.Build.Builder getBuildBuilder() {
3889       return getBuildFieldBuilder().getBuilder();
3890     }
3891     /**
3892      *
3893      *
3894      * <pre>
3895      * Contents of the build template.
3896      * </pre>
3897      *
3898      * <code>.google.devtools.cloudbuild.v1.Build build = 4;</code>
3899      */
3900     @java.lang.Override
getBuildOrBuilder()3901     public com.google.cloudbuild.v1.BuildOrBuilder getBuildOrBuilder() {
3902       if ((buildTemplateCase_ == 4) && (buildBuilder_ != null)) {
3903         return buildBuilder_.getMessageOrBuilder();
3904       } else {
3905         if (buildTemplateCase_ == 4) {
3906           return (com.google.cloudbuild.v1.Build) buildTemplate_;
3907         }
3908         return com.google.cloudbuild.v1.Build.getDefaultInstance();
3909       }
3910     }
3911     /**
3912      *
3913      *
3914      * <pre>
3915      * Contents of the build template.
3916      * </pre>
3917      *
3918      * <code>.google.devtools.cloudbuild.v1.Build build = 4;</code>
3919      */
3920     private com.google.protobuf.SingleFieldBuilderV3<
3921             com.google.cloudbuild.v1.Build,
3922             com.google.cloudbuild.v1.Build.Builder,
3923             com.google.cloudbuild.v1.BuildOrBuilder>
getBuildFieldBuilder()3924         getBuildFieldBuilder() {
3925       if (buildBuilder_ == null) {
3926         if (!(buildTemplateCase_ == 4)) {
3927           buildTemplate_ = com.google.cloudbuild.v1.Build.getDefaultInstance();
3928         }
3929         buildBuilder_ =
3930             new com.google.protobuf.SingleFieldBuilderV3<
3931                 com.google.cloudbuild.v1.Build,
3932                 com.google.cloudbuild.v1.Build.Builder,
3933                 com.google.cloudbuild.v1.BuildOrBuilder>(
3934                 (com.google.cloudbuild.v1.Build) buildTemplate_, getParentForChildren(), isClean());
3935         buildTemplate_ = null;
3936       }
3937       buildTemplateCase_ = 4;
3938       onChanged();
3939       return buildBuilder_;
3940     }
3941 
3942     /**
3943      *
3944      *
3945      * <pre>
3946      * Path, from the source root, to the build configuration file
3947      * (i.e. cloudbuild.yaml).
3948      * </pre>
3949      *
3950      * <code>string filename = 8;</code>
3951      *
3952      * @return Whether the filename field is set.
3953      */
3954     @java.lang.Override
hasFilename()3955     public boolean hasFilename() {
3956       return buildTemplateCase_ == 8;
3957     }
3958     /**
3959      *
3960      *
3961      * <pre>
3962      * Path, from the source root, to the build configuration file
3963      * (i.e. cloudbuild.yaml).
3964      * </pre>
3965      *
3966      * <code>string filename = 8;</code>
3967      *
3968      * @return The filename.
3969      */
3970     @java.lang.Override
getFilename()3971     public java.lang.String getFilename() {
3972       java.lang.Object ref = "";
3973       if (buildTemplateCase_ == 8) {
3974         ref = buildTemplate_;
3975       }
3976       if (!(ref instanceof java.lang.String)) {
3977         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3978         java.lang.String s = bs.toStringUtf8();
3979         if (buildTemplateCase_ == 8) {
3980           buildTemplate_ = s;
3981         }
3982         return s;
3983       } else {
3984         return (java.lang.String) ref;
3985       }
3986     }
3987     /**
3988      *
3989      *
3990      * <pre>
3991      * Path, from the source root, to the build configuration file
3992      * (i.e. cloudbuild.yaml).
3993      * </pre>
3994      *
3995      * <code>string filename = 8;</code>
3996      *
3997      * @return The bytes for filename.
3998      */
3999     @java.lang.Override
getFilenameBytes()4000     public com.google.protobuf.ByteString getFilenameBytes() {
4001       java.lang.Object ref = "";
4002       if (buildTemplateCase_ == 8) {
4003         ref = buildTemplate_;
4004       }
4005       if (ref instanceof String) {
4006         com.google.protobuf.ByteString b =
4007             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4008         if (buildTemplateCase_ == 8) {
4009           buildTemplate_ = b;
4010         }
4011         return b;
4012       } else {
4013         return (com.google.protobuf.ByteString) ref;
4014       }
4015     }
4016     /**
4017      *
4018      *
4019      * <pre>
4020      * Path, from the source root, to the build configuration file
4021      * (i.e. cloudbuild.yaml).
4022      * </pre>
4023      *
4024      * <code>string filename = 8;</code>
4025      *
4026      * @param value The filename to set.
4027      * @return This builder for chaining.
4028      */
setFilename(java.lang.String value)4029     public Builder setFilename(java.lang.String value) {
4030       if (value == null) {
4031         throw new NullPointerException();
4032       }
4033       buildTemplateCase_ = 8;
4034       buildTemplate_ = value;
4035       onChanged();
4036       return this;
4037     }
4038     /**
4039      *
4040      *
4041      * <pre>
4042      * Path, from the source root, to the build configuration file
4043      * (i.e. cloudbuild.yaml).
4044      * </pre>
4045      *
4046      * <code>string filename = 8;</code>
4047      *
4048      * @return This builder for chaining.
4049      */
clearFilename()4050     public Builder clearFilename() {
4051       if (buildTemplateCase_ == 8) {
4052         buildTemplateCase_ = 0;
4053         buildTemplate_ = null;
4054         onChanged();
4055       }
4056       return this;
4057     }
4058     /**
4059      *
4060      *
4061      * <pre>
4062      * Path, from the source root, to the build configuration file
4063      * (i.e. cloudbuild.yaml).
4064      * </pre>
4065      *
4066      * <code>string filename = 8;</code>
4067      *
4068      * @param value The bytes for filename to set.
4069      * @return This builder for chaining.
4070      */
setFilenameBytes(com.google.protobuf.ByteString value)4071     public Builder setFilenameBytes(com.google.protobuf.ByteString value) {
4072       if (value == null) {
4073         throw new NullPointerException();
4074       }
4075       checkByteStringIsUtf8(value);
4076       buildTemplateCase_ = 8;
4077       buildTemplate_ = value;
4078       onChanged();
4079       return this;
4080     }
4081 
4082     private com.google.protobuf.Timestamp createTime_;
4083     private com.google.protobuf.SingleFieldBuilderV3<
4084             com.google.protobuf.Timestamp,
4085             com.google.protobuf.Timestamp.Builder,
4086             com.google.protobuf.TimestampOrBuilder>
4087         createTimeBuilder_;
4088     /**
4089      *
4090      *
4091      * <pre>
4092      * Output only. Time when the trigger was created.
4093      * </pre>
4094      *
4095      * <code>
4096      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4097      * </code>
4098      *
4099      * @return Whether the createTime field is set.
4100      */
hasCreateTime()4101     public boolean hasCreateTime() {
4102       return ((bitField0_ & 0x00001000) != 0);
4103     }
4104     /**
4105      *
4106      *
4107      * <pre>
4108      * Output only. Time when the trigger was created.
4109      * </pre>
4110      *
4111      * <code>
4112      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4113      * </code>
4114      *
4115      * @return The createTime.
4116      */
getCreateTime()4117     public com.google.protobuf.Timestamp getCreateTime() {
4118       if (createTimeBuilder_ == null) {
4119         return createTime_ == null
4120             ? com.google.protobuf.Timestamp.getDefaultInstance()
4121             : createTime_;
4122       } else {
4123         return createTimeBuilder_.getMessage();
4124       }
4125     }
4126     /**
4127      *
4128      *
4129      * <pre>
4130      * Output only. Time when the trigger was created.
4131      * </pre>
4132      *
4133      * <code>
4134      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4135      * </code>
4136      */
setCreateTime(com.google.protobuf.Timestamp value)4137     public Builder setCreateTime(com.google.protobuf.Timestamp value) {
4138       if (createTimeBuilder_ == null) {
4139         if (value == null) {
4140           throw new NullPointerException();
4141         }
4142         createTime_ = value;
4143       } else {
4144         createTimeBuilder_.setMessage(value);
4145       }
4146       bitField0_ |= 0x00001000;
4147       onChanged();
4148       return this;
4149     }
4150     /**
4151      *
4152      *
4153      * <pre>
4154      * Output only. Time when the trigger was created.
4155      * </pre>
4156      *
4157      * <code>
4158      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4159      * </code>
4160      */
setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)4161     public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
4162       if (createTimeBuilder_ == null) {
4163         createTime_ = builderForValue.build();
4164       } else {
4165         createTimeBuilder_.setMessage(builderForValue.build());
4166       }
4167       bitField0_ |= 0x00001000;
4168       onChanged();
4169       return this;
4170     }
4171     /**
4172      *
4173      *
4174      * <pre>
4175      * Output only. Time when the trigger was created.
4176      * </pre>
4177      *
4178      * <code>
4179      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4180      * </code>
4181      */
mergeCreateTime(com.google.protobuf.Timestamp value)4182     public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
4183       if (createTimeBuilder_ == null) {
4184         if (((bitField0_ & 0x00001000) != 0)
4185             && createTime_ != null
4186             && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
4187           getCreateTimeBuilder().mergeFrom(value);
4188         } else {
4189           createTime_ = value;
4190         }
4191       } else {
4192         createTimeBuilder_.mergeFrom(value);
4193       }
4194       bitField0_ |= 0x00001000;
4195       onChanged();
4196       return this;
4197     }
4198     /**
4199      *
4200      *
4201      * <pre>
4202      * Output only. Time when the trigger was created.
4203      * </pre>
4204      *
4205      * <code>
4206      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4207      * </code>
4208      */
clearCreateTime()4209     public Builder clearCreateTime() {
4210       bitField0_ = (bitField0_ & ~0x00001000);
4211       createTime_ = null;
4212       if (createTimeBuilder_ != null) {
4213         createTimeBuilder_.dispose();
4214         createTimeBuilder_ = null;
4215       }
4216       onChanged();
4217       return this;
4218     }
4219     /**
4220      *
4221      *
4222      * <pre>
4223      * Output only. Time when the trigger was created.
4224      * </pre>
4225      *
4226      * <code>
4227      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4228      * </code>
4229      */
getCreateTimeBuilder()4230     public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
4231       bitField0_ |= 0x00001000;
4232       onChanged();
4233       return getCreateTimeFieldBuilder().getBuilder();
4234     }
4235     /**
4236      *
4237      *
4238      * <pre>
4239      * Output only. Time when the trigger was created.
4240      * </pre>
4241      *
4242      * <code>
4243      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4244      * </code>
4245      */
getCreateTimeOrBuilder()4246     public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
4247       if (createTimeBuilder_ != null) {
4248         return createTimeBuilder_.getMessageOrBuilder();
4249       } else {
4250         return createTime_ == null
4251             ? com.google.protobuf.Timestamp.getDefaultInstance()
4252             : createTime_;
4253       }
4254     }
4255     /**
4256      *
4257      *
4258      * <pre>
4259      * Output only. Time when the trigger was created.
4260      * </pre>
4261      *
4262      * <code>
4263      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4264      * </code>
4265      */
4266     private com.google.protobuf.SingleFieldBuilderV3<
4267             com.google.protobuf.Timestamp,
4268             com.google.protobuf.Timestamp.Builder,
4269             com.google.protobuf.TimestampOrBuilder>
getCreateTimeFieldBuilder()4270         getCreateTimeFieldBuilder() {
4271       if (createTimeBuilder_ == null) {
4272         createTimeBuilder_ =
4273             new com.google.protobuf.SingleFieldBuilderV3<
4274                 com.google.protobuf.Timestamp,
4275                 com.google.protobuf.Timestamp.Builder,
4276                 com.google.protobuf.TimestampOrBuilder>(
4277                 getCreateTime(), getParentForChildren(), isClean());
4278         createTime_ = null;
4279       }
4280       return createTimeBuilder_;
4281     }
4282 
4283     private boolean disabled_;
4284     /**
4285      *
4286      *
4287      * <pre>
4288      * If true, the trigger will never automatically execute a build.
4289      * </pre>
4290      *
4291      * <code>bool disabled = 9;</code>
4292      *
4293      * @return The disabled.
4294      */
4295     @java.lang.Override
getDisabled()4296     public boolean getDisabled() {
4297       return disabled_;
4298     }
4299     /**
4300      *
4301      *
4302      * <pre>
4303      * If true, the trigger will never automatically execute a build.
4304      * </pre>
4305      *
4306      * <code>bool disabled = 9;</code>
4307      *
4308      * @param value The disabled to set.
4309      * @return This builder for chaining.
4310      */
setDisabled(boolean value)4311     public Builder setDisabled(boolean value) {
4312 
4313       disabled_ = value;
4314       bitField0_ |= 0x00002000;
4315       onChanged();
4316       return this;
4317     }
4318     /**
4319      *
4320      *
4321      * <pre>
4322      * If true, the trigger will never automatically execute a build.
4323      * </pre>
4324      *
4325      * <code>bool disabled = 9;</code>
4326      *
4327      * @return This builder for chaining.
4328      */
clearDisabled()4329     public Builder clearDisabled() {
4330       bitField0_ = (bitField0_ & ~0x00002000);
4331       disabled_ = false;
4332       onChanged();
4333       return this;
4334     }
4335 
4336     private com.google.protobuf.MapField<java.lang.String, java.lang.String> substitutions_;
4337 
4338     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetSubstitutions()4339         internalGetSubstitutions() {
4340       if (substitutions_ == null) {
4341         return com.google.protobuf.MapField.emptyMapField(
4342             SubstitutionsDefaultEntryHolder.defaultEntry);
4343       }
4344       return substitutions_;
4345     }
4346 
4347     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableSubstitutions()4348         internalGetMutableSubstitutions() {
4349       if (substitutions_ == null) {
4350         substitutions_ =
4351             com.google.protobuf.MapField.newMapField(SubstitutionsDefaultEntryHolder.defaultEntry);
4352       }
4353       if (!substitutions_.isMutable()) {
4354         substitutions_ = substitutions_.copy();
4355       }
4356       bitField0_ |= 0x00004000;
4357       onChanged();
4358       return substitutions_;
4359     }
4360 
getSubstitutionsCount()4361     public int getSubstitutionsCount() {
4362       return internalGetSubstitutions().getMap().size();
4363     }
4364     /**
4365      *
4366      *
4367      * <pre>
4368      * Substitutions for Build resource. The keys must match the following
4369      * regular expression: `^_[A-Z0-9_]+$`.
4370      * </pre>
4371      *
4372      * <code>map&lt;string, string&gt; substitutions = 11;</code>
4373      */
4374     @java.lang.Override
containsSubstitutions(java.lang.String key)4375     public boolean containsSubstitutions(java.lang.String key) {
4376       if (key == null) {
4377         throw new NullPointerException("map key");
4378       }
4379       return internalGetSubstitutions().getMap().containsKey(key);
4380     }
4381     /** Use {@link #getSubstitutionsMap()} instead. */
4382     @java.lang.Override
4383     @java.lang.Deprecated
getSubstitutions()4384     public java.util.Map<java.lang.String, java.lang.String> getSubstitutions() {
4385       return getSubstitutionsMap();
4386     }
4387     /**
4388      *
4389      *
4390      * <pre>
4391      * Substitutions for Build resource. The keys must match the following
4392      * regular expression: `^_[A-Z0-9_]+$`.
4393      * </pre>
4394      *
4395      * <code>map&lt;string, string&gt; substitutions = 11;</code>
4396      */
4397     @java.lang.Override
getSubstitutionsMap()4398     public java.util.Map<java.lang.String, java.lang.String> getSubstitutionsMap() {
4399       return internalGetSubstitutions().getMap();
4400     }
4401     /**
4402      *
4403      *
4404      * <pre>
4405      * Substitutions for Build resource. The keys must match the following
4406      * regular expression: `^_[A-Z0-9_]+$`.
4407      * </pre>
4408      *
4409      * <code>map&lt;string, string&gt; substitutions = 11;</code>
4410      */
4411     @java.lang.Override
getSubstitutionsOrDefault( java.lang.String key, java.lang.String defaultValue)4412     public /* nullable */ java.lang.String getSubstitutionsOrDefault(
4413         java.lang.String key,
4414         /* nullable */
4415         java.lang.String defaultValue) {
4416       if (key == null) {
4417         throw new NullPointerException("map key");
4418       }
4419       java.util.Map<java.lang.String, java.lang.String> map = internalGetSubstitutions().getMap();
4420       return map.containsKey(key) ? map.get(key) : defaultValue;
4421     }
4422     /**
4423      *
4424      *
4425      * <pre>
4426      * Substitutions for Build resource. The keys must match the following
4427      * regular expression: `^_[A-Z0-9_]+$`.
4428      * </pre>
4429      *
4430      * <code>map&lt;string, string&gt; substitutions = 11;</code>
4431      */
4432     @java.lang.Override
getSubstitutionsOrThrow(java.lang.String key)4433     public java.lang.String getSubstitutionsOrThrow(java.lang.String key) {
4434       if (key == null) {
4435         throw new NullPointerException("map key");
4436       }
4437       java.util.Map<java.lang.String, java.lang.String> map = internalGetSubstitutions().getMap();
4438       if (!map.containsKey(key)) {
4439         throw new java.lang.IllegalArgumentException();
4440       }
4441       return map.get(key);
4442     }
4443 
clearSubstitutions()4444     public Builder clearSubstitutions() {
4445       bitField0_ = (bitField0_ & ~0x00004000);
4446       internalGetMutableSubstitutions().getMutableMap().clear();
4447       return this;
4448     }
4449     /**
4450      *
4451      *
4452      * <pre>
4453      * Substitutions for Build resource. The keys must match the following
4454      * regular expression: `^_[A-Z0-9_]+$`.
4455      * </pre>
4456      *
4457      * <code>map&lt;string, string&gt; substitutions = 11;</code>
4458      */
removeSubstitutions(java.lang.String key)4459     public Builder removeSubstitutions(java.lang.String key) {
4460       if (key == null) {
4461         throw new NullPointerException("map key");
4462       }
4463       internalGetMutableSubstitutions().getMutableMap().remove(key);
4464       return this;
4465     }
4466     /** Use alternate mutation accessors instead. */
4467     @java.lang.Deprecated
getMutableSubstitutions()4468     public java.util.Map<java.lang.String, java.lang.String> getMutableSubstitutions() {
4469       bitField0_ |= 0x00004000;
4470       return internalGetMutableSubstitutions().getMutableMap();
4471     }
4472     /**
4473      *
4474      *
4475      * <pre>
4476      * Substitutions for Build resource. The keys must match the following
4477      * regular expression: `^_[A-Z0-9_]+$`.
4478      * </pre>
4479      *
4480      * <code>map&lt;string, string&gt; substitutions = 11;</code>
4481      */
putSubstitutions(java.lang.String key, java.lang.String value)4482     public Builder putSubstitutions(java.lang.String key, java.lang.String value) {
4483       if (key == null) {
4484         throw new NullPointerException("map key");
4485       }
4486       if (value == null) {
4487         throw new NullPointerException("map value");
4488       }
4489       internalGetMutableSubstitutions().getMutableMap().put(key, value);
4490       bitField0_ |= 0x00004000;
4491       return this;
4492     }
4493     /**
4494      *
4495      *
4496      * <pre>
4497      * Substitutions for Build resource. The keys must match the following
4498      * regular expression: `^_[A-Z0-9_]+$`.
4499      * </pre>
4500      *
4501      * <code>map&lt;string, string&gt; substitutions = 11;</code>
4502      */
putAllSubstitutions(java.util.Map<java.lang.String, java.lang.String> values)4503     public Builder putAllSubstitutions(java.util.Map<java.lang.String, java.lang.String> values) {
4504       internalGetMutableSubstitutions().getMutableMap().putAll(values);
4505       bitField0_ |= 0x00004000;
4506       return this;
4507     }
4508 
4509     private com.google.protobuf.LazyStringList ignoredFiles_ =
4510         com.google.protobuf.LazyStringArrayList.EMPTY;
4511 
ensureIgnoredFilesIsMutable()4512     private void ensureIgnoredFilesIsMutable() {
4513       if (!((bitField0_ & 0x00008000) != 0)) {
4514         ignoredFiles_ = new com.google.protobuf.LazyStringArrayList(ignoredFiles_);
4515         bitField0_ |= 0x00008000;
4516       }
4517     }
4518     /**
4519      *
4520      *
4521      * <pre>
4522      * ignored_files and included_files are file glob matches using
4523      * https://golang.org/pkg/path/filepath/#Match extended with support for "**".
4524      * If ignored_files and changed files are both empty, then they are
4525      * not used to determine whether or not to trigger a build.
4526      * If ignored_files is not empty, then we ignore any files that match
4527      * any of the ignored_file globs. If the change has no files that are
4528      * outside of the ignored_files globs, then we do not trigger a build.
4529      * </pre>
4530      *
4531      * <code>repeated string ignored_files = 15;</code>
4532      *
4533      * @return A list containing the ignoredFiles.
4534      */
getIgnoredFilesList()4535     public com.google.protobuf.ProtocolStringList getIgnoredFilesList() {
4536       return ignoredFiles_.getUnmodifiableView();
4537     }
4538     /**
4539      *
4540      *
4541      * <pre>
4542      * ignored_files and included_files are file glob matches using
4543      * https://golang.org/pkg/path/filepath/#Match extended with support for "**".
4544      * If ignored_files and changed files are both empty, then they are
4545      * not used to determine whether or not to trigger a build.
4546      * If ignored_files is not empty, then we ignore any files that match
4547      * any of the ignored_file globs. If the change has no files that are
4548      * outside of the ignored_files globs, then we do not trigger a build.
4549      * </pre>
4550      *
4551      * <code>repeated string ignored_files = 15;</code>
4552      *
4553      * @return The count of ignoredFiles.
4554      */
getIgnoredFilesCount()4555     public int getIgnoredFilesCount() {
4556       return ignoredFiles_.size();
4557     }
4558     /**
4559      *
4560      *
4561      * <pre>
4562      * ignored_files and included_files are file glob matches using
4563      * https://golang.org/pkg/path/filepath/#Match extended with support for "**".
4564      * If ignored_files and changed files are both empty, then they are
4565      * not used to determine whether or not to trigger a build.
4566      * If ignored_files is not empty, then we ignore any files that match
4567      * any of the ignored_file globs. If the change has no files that are
4568      * outside of the ignored_files globs, then we do not trigger a build.
4569      * </pre>
4570      *
4571      * <code>repeated string ignored_files = 15;</code>
4572      *
4573      * @param index The index of the element to return.
4574      * @return The ignoredFiles at the given index.
4575      */
getIgnoredFiles(int index)4576     public java.lang.String getIgnoredFiles(int index) {
4577       return ignoredFiles_.get(index);
4578     }
4579     /**
4580      *
4581      *
4582      * <pre>
4583      * ignored_files and included_files are file glob matches using
4584      * https://golang.org/pkg/path/filepath/#Match extended with support for "**".
4585      * If ignored_files and changed files are both empty, then they are
4586      * not used to determine whether or not to trigger a build.
4587      * If ignored_files is not empty, then we ignore any files that match
4588      * any of the ignored_file globs. If the change has no files that are
4589      * outside of the ignored_files globs, then we do not trigger a build.
4590      * </pre>
4591      *
4592      * <code>repeated string ignored_files = 15;</code>
4593      *
4594      * @param index The index of the value to return.
4595      * @return The bytes of the ignoredFiles at the given index.
4596      */
getIgnoredFilesBytes(int index)4597     public com.google.protobuf.ByteString getIgnoredFilesBytes(int index) {
4598       return ignoredFiles_.getByteString(index);
4599     }
4600     /**
4601      *
4602      *
4603      * <pre>
4604      * ignored_files and included_files are file glob matches using
4605      * https://golang.org/pkg/path/filepath/#Match extended with support for "**".
4606      * If ignored_files and changed files are both empty, then they are
4607      * not used to determine whether or not to trigger a build.
4608      * If ignored_files is not empty, then we ignore any files that match
4609      * any of the ignored_file globs. If the change has no files that are
4610      * outside of the ignored_files globs, then we do not trigger a build.
4611      * </pre>
4612      *
4613      * <code>repeated string ignored_files = 15;</code>
4614      *
4615      * @param index The index to set the value at.
4616      * @param value The ignoredFiles to set.
4617      * @return This builder for chaining.
4618      */
setIgnoredFiles(int index, java.lang.String value)4619     public Builder setIgnoredFiles(int index, java.lang.String value) {
4620       if (value == null) {
4621         throw new NullPointerException();
4622       }
4623       ensureIgnoredFilesIsMutable();
4624       ignoredFiles_.set(index, value);
4625       onChanged();
4626       return this;
4627     }
4628     /**
4629      *
4630      *
4631      * <pre>
4632      * ignored_files and included_files are file glob matches using
4633      * https://golang.org/pkg/path/filepath/#Match extended with support for "**".
4634      * If ignored_files and changed files are both empty, then they are
4635      * not used to determine whether or not to trigger a build.
4636      * If ignored_files is not empty, then we ignore any files that match
4637      * any of the ignored_file globs. If the change has no files that are
4638      * outside of the ignored_files globs, then we do not trigger a build.
4639      * </pre>
4640      *
4641      * <code>repeated string ignored_files = 15;</code>
4642      *
4643      * @param value The ignoredFiles to add.
4644      * @return This builder for chaining.
4645      */
addIgnoredFiles(java.lang.String value)4646     public Builder addIgnoredFiles(java.lang.String value) {
4647       if (value == null) {
4648         throw new NullPointerException();
4649       }
4650       ensureIgnoredFilesIsMutable();
4651       ignoredFiles_.add(value);
4652       onChanged();
4653       return this;
4654     }
4655     /**
4656      *
4657      *
4658      * <pre>
4659      * ignored_files and included_files are file glob matches using
4660      * https://golang.org/pkg/path/filepath/#Match extended with support for "**".
4661      * If ignored_files and changed files are both empty, then they are
4662      * not used to determine whether or not to trigger a build.
4663      * If ignored_files is not empty, then we ignore any files that match
4664      * any of the ignored_file globs. If the change has no files that are
4665      * outside of the ignored_files globs, then we do not trigger a build.
4666      * </pre>
4667      *
4668      * <code>repeated string ignored_files = 15;</code>
4669      *
4670      * @param values The ignoredFiles to add.
4671      * @return This builder for chaining.
4672      */
addAllIgnoredFiles(java.lang.Iterable<java.lang.String> values)4673     public Builder addAllIgnoredFiles(java.lang.Iterable<java.lang.String> values) {
4674       ensureIgnoredFilesIsMutable();
4675       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ignoredFiles_);
4676       onChanged();
4677       return this;
4678     }
4679     /**
4680      *
4681      *
4682      * <pre>
4683      * ignored_files and included_files are file glob matches using
4684      * https://golang.org/pkg/path/filepath/#Match extended with support for "**".
4685      * If ignored_files and changed files are both empty, then they are
4686      * not used to determine whether or not to trigger a build.
4687      * If ignored_files is not empty, then we ignore any files that match
4688      * any of the ignored_file globs. If the change has no files that are
4689      * outside of the ignored_files globs, then we do not trigger a build.
4690      * </pre>
4691      *
4692      * <code>repeated string ignored_files = 15;</code>
4693      *
4694      * @return This builder for chaining.
4695      */
clearIgnoredFiles()4696     public Builder clearIgnoredFiles() {
4697       ignoredFiles_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4698       bitField0_ = (bitField0_ & ~0x00008000);
4699       onChanged();
4700       return this;
4701     }
4702     /**
4703      *
4704      *
4705      * <pre>
4706      * ignored_files and included_files are file glob matches using
4707      * https://golang.org/pkg/path/filepath/#Match extended with support for "**".
4708      * If ignored_files and changed files are both empty, then they are
4709      * not used to determine whether or not to trigger a build.
4710      * If ignored_files is not empty, then we ignore any files that match
4711      * any of the ignored_file globs. If the change has no files that are
4712      * outside of the ignored_files globs, then we do not trigger a build.
4713      * </pre>
4714      *
4715      * <code>repeated string ignored_files = 15;</code>
4716      *
4717      * @param value The bytes of the ignoredFiles to add.
4718      * @return This builder for chaining.
4719      */
addIgnoredFilesBytes(com.google.protobuf.ByteString value)4720     public Builder addIgnoredFilesBytes(com.google.protobuf.ByteString value) {
4721       if (value == null) {
4722         throw new NullPointerException();
4723       }
4724       checkByteStringIsUtf8(value);
4725       ensureIgnoredFilesIsMutable();
4726       ignoredFiles_.add(value);
4727       onChanged();
4728       return this;
4729     }
4730 
4731     private com.google.protobuf.LazyStringList includedFiles_ =
4732         com.google.protobuf.LazyStringArrayList.EMPTY;
4733 
ensureIncludedFilesIsMutable()4734     private void ensureIncludedFilesIsMutable() {
4735       if (!((bitField0_ & 0x00010000) != 0)) {
4736         includedFiles_ = new com.google.protobuf.LazyStringArrayList(includedFiles_);
4737         bitField0_ |= 0x00010000;
4738       }
4739     }
4740     /**
4741      *
4742      *
4743      * <pre>
4744      * If any of the files altered in the commit pass the ignored_files
4745      * filter and included_files is empty, then as far as this filter is
4746      * concerned, we should trigger the build.
4747      * If any of the files altered in the commit pass the ignored_files
4748      * filter and included_files is not empty, then we make sure that at
4749      * least one of those files matches a included_files glob. If not,
4750      * then we do not trigger a build.
4751      * </pre>
4752      *
4753      * <code>repeated string included_files = 16;</code>
4754      *
4755      * @return A list containing the includedFiles.
4756      */
getIncludedFilesList()4757     public com.google.protobuf.ProtocolStringList getIncludedFilesList() {
4758       return includedFiles_.getUnmodifiableView();
4759     }
4760     /**
4761      *
4762      *
4763      * <pre>
4764      * If any of the files altered in the commit pass the ignored_files
4765      * filter and included_files is empty, then as far as this filter is
4766      * concerned, we should trigger the build.
4767      * If any of the files altered in the commit pass the ignored_files
4768      * filter and included_files is not empty, then we make sure that at
4769      * least one of those files matches a included_files glob. If not,
4770      * then we do not trigger a build.
4771      * </pre>
4772      *
4773      * <code>repeated string included_files = 16;</code>
4774      *
4775      * @return The count of includedFiles.
4776      */
getIncludedFilesCount()4777     public int getIncludedFilesCount() {
4778       return includedFiles_.size();
4779     }
4780     /**
4781      *
4782      *
4783      * <pre>
4784      * If any of the files altered in the commit pass the ignored_files
4785      * filter and included_files is empty, then as far as this filter is
4786      * concerned, we should trigger the build.
4787      * If any of the files altered in the commit pass the ignored_files
4788      * filter and included_files is not empty, then we make sure that at
4789      * least one of those files matches a included_files glob. If not,
4790      * then we do not trigger a build.
4791      * </pre>
4792      *
4793      * <code>repeated string included_files = 16;</code>
4794      *
4795      * @param index The index of the element to return.
4796      * @return The includedFiles at the given index.
4797      */
getIncludedFiles(int index)4798     public java.lang.String getIncludedFiles(int index) {
4799       return includedFiles_.get(index);
4800     }
4801     /**
4802      *
4803      *
4804      * <pre>
4805      * If any of the files altered in the commit pass the ignored_files
4806      * filter and included_files is empty, then as far as this filter is
4807      * concerned, we should trigger the build.
4808      * If any of the files altered in the commit pass the ignored_files
4809      * filter and included_files is not empty, then we make sure that at
4810      * least one of those files matches a included_files glob. If not,
4811      * then we do not trigger a build.
4812      * </pre>
4813      *
4814      * <code>repeated string included_files = 16;</code>
4815      *
4816      * @param index The index of the value to return.
4817      * @return The bytes of the includedFiles at the given index.
4818      */
getIncludedFilesBytes(int index)4819     public com.google.protobuf.ByteString getIncludedFilesBytes(int index) {
4820       return includedFiles_.getByteString(index);
4821     }
4822     /**
4823      *
4824      *
4825      * <pre>
4826      * If any of the files altered in the commit pass the ignored_files
4827      * filter and included_files is empty, then as far as this filter is
4828      * concerned, we should trigger the build.
4829      * If any of the files altered in the commit pass the ignored_files
4830      * filter and included_files is not empty, then we make sure that at
4831      * least one of those files matches a included_files glob. If not,
4832      * then we do not trigger a build.
4833      * </pre>
4834      *
4835      * <code>repeated string included_files = 16;</code>
4836      *
4837      * @param index The index to set the value at.
4838      * @param value The includedFiles to set.
4839      * @return This builder for chaining.
4840      */
setIncludedFiles(int index, java.lang.String value)4841     public Builder setIncludedFiles(int index, java.lang.String value) {
4842       if (value == null) {
4843         throw new NullPointerException();
4844       }
4845       ensureIncludedFilesIsMutable();
4846       includedFiles_.set(index, value);
4847       onChanged();
4848       return this;
4849     }
4850     /**
4851      *
4852      *
4853      * <pre>
4854      * If any of the files altered in the commit pass the ignored_files
4855      * filter and included_files is empty, then as far as this filter is
4856      * concerned, we should trigger the build.
4857      * If any of the files altered in the commit pass the ignored_files
4858      * filter and included_files is not empty, then we make sure that at
4859      * least one of those files matches a included_files glob. If not,
4860      * then we do not trigger a build.
4861      * </pre>
4862      *
4863      * <code>repeated string included_files = 16;</code>
4864      *
4865      * @param value The includedFiles to add.
4866      * @return This builder for chaining.
4867      */
addIncludedFiles(java.lang.String value)4868     public Builder addIncludedFiles(java.lang.String value) {
4869       if (value == null) {
4870         throw new NullPointerException();
4871       }
4872       ensureIncludedFilesIsMutable();
4873       includedFiles_.add(value);
4874       onChanged();
4875       return this;
4876     }
4877     /**
4878      *
4879      *
4880      * <pre>
4881      * If any of the files altered in the commit pass the ignored_files
4882      * filter and included_files is empty, then as far as this filter is
4883      * concerned, we should trigger the build.
4884      * If any of the files altered in the commit pass the ignored_files
4885      * filter and included_files is not empty, then we make sure that at
4886      * least one of those files matches a included_files glob. If not,
4887      * then we do not trigger a build.
4888      * </pre>
4889      *
4890      * <code>repeated string included_files = 16;</code>
4891      *
4892      * @param values The includedFiles to add.
4893      * @return This builder for chaining.
4894      */
addAllIncludedFiles(java.lang.Iterable<java.lang.String> values)4895     public Builder addAllIncludedFiles(java.lang.Iterable<java.lang.String> values) {
4896       ensureIncludedFilesIsMutable();
4897       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, includedFiles_);
4898       onChanged();
4899       return this;
4900     }
4901     /**
4902      *
4903      *
4904      * <pre>
4905      * If any of the files altered in the commit pass the ignored_files
4906      * filter and included_files is empty, then as far as this filter is
4907      * concerned, we should trigger the build.
4908      * If any of the files altered in the commit pass the ignored_files
4909      * filter and included_files is not empty, then we make sure that at
4910      * least one of those files matches a included_files glob. If not,
4911      * then we do not trigger a build.
4912      * </pre>
4913      *
4914      * <code>repeated string included_files = 16;</code>
4915      *
4916      * @return This builder for chaining.
4917      */
clearIncludedFiles()4918     public Builder clearIncludedFiles() {
4919       includedFiles_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4920       bitField0_ = (bitField0_ & ~0x00010000);
4921       onChanged();
4922       return this;
4923     }
4924     /**
4925      *
4926      *
4927      * <pre>
4928      * If any of the files altered in the commit pass the ignored_files
4929      * filter and included_files is empty, then as far as this filter is
4930      * concerned, we should trigger the build.
4931      * If any of the files altered in the commit pass the ignored_files
4932      * filter and included_files is not empty, then we make sure that at
4933      * least one of those files matches a included_files glob. If not,
4934      * then we do not trigger a build.
4935      * </pre>
4936      *
4937      * <code>repeated string included_files = 16;</code>
4938      *
4939      * @param value The bytes of the includedFiles to add.
4940      * @return This builder for chaining.
4941      */
addIncludedFilesBytes(com.google.protobuf.ByteString value)4942     public Builder addIncludedFilesBytes(com.google.protobuf.ByteString value) {
4943       if (value == null) {
4944         throw new NullPointerException();
4945       }
4946       checkByteStringIsUtf8(value);
4947       ensureIncludedFilesIsMutable();
4948       includedFiles_.add(value);
4949       onChanged();
4950       return this;
4951     }
4952 
4953     private java.lang.Object filter_ = "";
4954     /**
4955      *
4956      *
4957      * <pre>
4958      * Optional. A Common Expression Language string.
4959      * </pre>
4960      *
4961      * <code>string filter = 30 [(.google.api.field_behavior) = OPTIONAL];</code>
4962      *
4963      * @return The filter.
4964      */
getFilter()4965     public java.lang.String getFilter() {
4966       java.lang.Object ref = filter_;
4967       if (!(ref instanceof java.lang.String)) {
4968         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4969         java.lang.String s = bs.toStringUtf8();
4970         filter_ = s;
4971         return s;
4972       } else {
4973         return (java.lang.String) ref;
4974       }
4975     }
4976     /**
4977      *
4978      *
4979      * <pre>
4980      * Optional. A Common Expression Language string.
4981      * </pre>
4982      *
4983      * <code>string filter = 30 [(.google.api.field_behavior) = OPTIONAL];</code>
4984      *
4985      * @return The bytes for filter.
4986      */
getFilterBytes()4987     public com.google.protobuf.ByteString getFilterBytes() {
4988       java.lang.Object ref = filter_;
4989       if (ref instanceof String) {
4990         com.google.protobuf.ByteString b =
4991             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4992         filter_ = b;
4993         return b;
4994       } else {
4995         return (com.google.protobuf.ByteString) ref;
4996       }
4997     }
4998     /**
4999      *
5000      *
5001      * <pre>
5002      * Optional. A Common Expression Language string.
5003      * </pre>
5004      *
5005      * <code>string filter = 30 [(.google.api.field_behavior) = OPTIONAL];</code>
5006      *
5007      * @param value The filter to set.
5008      * @return This builder for chaining.
5009      */
setFilter(java.lang.String value)5010     public Builder setFilter(java.lang.String value) {
5011       if (value == null) {
5012         throw new NullPointerException();
5013       }
5014       filter_ = value;
5015       bitField0_ |= 0x00020000;
5016       onChanged();
5017       return this;
5018     }
5019     /**
5020      *
5021      *
5022      * <pre>
5023      * Optional. A Common Expression Language string.
5024      * </pre>
5025      *
5026      * <code>string filter = 30 [(.google.api.field_behavior) = OPTIONAL];</code>
5027      *
5028      * @return This builder for chaining.
5029      */
clearFilter()5030     public Builder clearFilter() {
5031       filter_ = getDefaultInstance().getFilter();
5032       bitField0_ = (bitField0_ & ~0x00020000);
5033       onChanged();
5034       return this;
5035     }
5036     /**
5037      *
5038      *
5039      * <pre>
5040      * Optional. A Common Expression Language string.
5041      * </pre>
5042      *
5043      * <code>string filter = 30 [(.google.api.field_behavior) = OPTIONAL];</code>
5044      *
5045      * @param value The bytes for filter to set.
5046      * @return This builder for chaining.
5047      */
setFilterBytes(com.google.protobuf.ByteString value)5048     public Builder setFilterBytes(com.google.protobuf.ByteString value) {
5049       if (value == null) {
5050         throw new NullPointerException();
5051       }
5052       checkByteStringIsUtf8(value);
5053       filter_ = value;
5054       bitField0_ |= 0x00020000;
5055       onChanged();
5056       return this;
5057     }
5058 
5059     private java.lang.Object serviceAccount_ = "";
5060     /**
5061      *
5062      *
5063      * <pre>
5064      * The service account used for all user-controlled operations including
5065      * UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
5066      * If no service account is set, then the standard Cloud Build service account
5067      * ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
5068      * Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
5069      * </pre>
5070      *
5071      * <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
5072      *
5073      * @return The serviceAccount.
5074      */
getServiceAccount()5075     public java.lang.String getServiceAccount() {
5076       java.lang.Object ref = serviceAccount_;
5077       if (!(ref instanceof java.lang.String)) {
5078         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
5079         java.lang.String s = bs.toStringUtf8();
5080         serviceAccount_ = s;
5081         return s;
5082       } else {
5083         return (java.lang.String) ref;
5084       }
5085     }
5086     /**
5087      *
5088      *
5089      * <pre>
5090      * The service account used for all user-controlled operations including
5091      * UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
5092      * If no service account is set, then the standard Cloud Build service account
5093      * ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
5094      * Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
5095      * </pre>
5096      *
5097      * <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
5098      *
5099      * @return The bytes for serviceAccount.
5100      */
getServiceAccountBytes()5101     public com.google.protobuf.ByteString getServiceAccountBytes() {
5102       java.lang.Object ref = serviceAccount_;
5103       if (ref instanceof String) {
5104         com.google.protobuf.ByteString b =
5105             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
5106         serviceAccount_ = b;
5107         return b;
5108       } else {
5109         return (com.google.protobuf.ByteString) ref;
5110       }
5111     }
5112     /**
5113      *
5114      *
5115      * <pre>
5116      * The service account used for all user-controlled operations including
5117      * UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
5118      * If no service account is set, then the standard Cloud Build service account
5119      * ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
5120      * Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
5121      * </pre>
5122      *
5123      * <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
5124      *
5125      * @param value The serviceAccount to set.
5126      * @return This builder for chaining.
5127      */
setServiceAccount(java.lang.String value)5128     public Builder setServiceAccount(java.lang.String value) {
5129       if (value == null) {
5130         throw new NullPointerException();
5131       }
5132       serviceAccount_ = value;
5133       bitField0_ |= 0x00040000;
5134       onChanged();
5135       return this;
5136     }
5137     /**
5138      *
5139      *
5140      * <pre>
5141      * The service account used for all user-controlled operations including
5142      * UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
5143      * If no service account is set, then the standard Cloud Build service account
5144      * ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
5145      * Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
5146      * </pre>
5147      *
5148      * <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
5149      *
5150      * @return This builder for chaining.
5151      */
clearServiceAccount()5152     public Builder clearServiceAccount() {
5153       serviceAccount_ = getDefaultInstance().getServiceAccount();
5154       bitField0_ = (bitField0_ & ~0x00040000);
5155       onChanged();
5156       return this;
5157     }
5158     /**
5159      *
5160      *
5161      * <pre>
5162      * The service account used for all user-controlled operations including
5163      * UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
5164      * If no service account is set, then the standard Cloud Build service account
5165      * ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
5166      * Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
5167      * </pre>
5168      *
5169      * <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
5170      *
5171      * @param value The bytes for serviceAccount to set.
5172      * @return This builder for chaining.
5173      */
setServiceAccountBytes(com.google.protobuf.ByteString value)5174     public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) {
5175       if (value == null) {
5176         throw new NullPointerException();
5177       }
5178       checkByteStringIsUtf8(value);
5179       serviceAccount_ = value;
5180       bitField0_ |= 0x00040000;
5181       onChanged();
5182       return this;
5183     }
5184 
5185     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)5186     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
5187       return super.setUnknownFields(unknownFields);
5188     }
5189 
5190     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)5191     public final Builder mergeUnknownFields(
5192         final com.google.protobuf.UnknownFieldSet unknownFields) {
5193       return super.mergeUnknownFields(unknownFields);
5194     }
5195 
5196     // @@protoc_insertion_point(builder_scope:google.devtools.cloudbuild.v1.BuildTrigger)
5197   }
5198 
5199   // @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.BuildTrigger)
5200   private static final com.google.cloudbuild.v1.BuildTrigger DEFAULT_INSTANCE;
5201 
5202   static {
5203     DEFAULT_INSTANCE = new com.google.cloudbuild.v1.BuildTrigger();
5204   }
5205 
getDefaultInstance()5206   public static com.google.cloudbuild.v1.BuildTrigger getDefaultInstance() {
5207     return DEFAULT_INSTANCE;
5208   }
5209 
5210   private static final com.google.protobuf.Parser<BuildTrigger> PARSER =
5211       new com.google.protobuf.AbstractParser<BuildTrigger>() {
5212         @java.lang.Override
5213         public BuildTrigger parsePartialFrom(
5214             com.google.protobuf.CodedInputStream input,
5215             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5216             throws com.google.protobuf.InvalidProtocolBufferException {
5217           Builder builder = newBuilder();
5218           try {
5219             builder.mergeFrom(input, extensionRegistry);
5220           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5221             throw e.setUnfinishedMessage(builder.buildPartial());
5222           } catch (com.google.protobuf.UninitializedMessageException e) {
5223             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
5224           } catch (java.io.IOException e) {
5225             throw new com.google.protobuf.InvalidProtocolBufferException(e)
5226                 .setUnfinishedMessage(builder.buildPartial());
5227           }
5228           return builder.buildPartial();
5229         }
5230       };
5231 
parser()5232   public static com.google.protobuf.Parser<BuildTrigger> parser() {
5233     return PARSER;
5234   }
5235 
5236   @java.lang.Override
getParserForType()5237   public com.google.protobuf.Parser<BuildTrigger> getParserForType() {
5238     return PARSER;
5239   }
5240 
5241   @java.lang.Override
getDefaultInstanceForType()5242   public com.google.cloudbuild.v1.BuildTrigger getDefaultInstanceForType() {
5243     return DEFAULT_INSTANCE;
5244   }
5245 }
5246