• 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/cloud/workflows/v1/workflows.proto
18 
19 package com.google.cloud.workflows.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Workflow program to be executed by Workflows.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.workflows.v1.Workflow}
29  */
30 public final class Workflow extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1.Workflow)
33     WorkflowOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use Workflow.newBuilder() to construct.
Workflow(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private Workflow(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
Workflow()40   private Workflow() {
41     name_ = "";
42     description_ = "";
43     state_ = 0;
44     revisionId_ = "";
45     serviceAccount_ = "";
46   }
47 
48   @java.lang.Override
49   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)50   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
51     return new Workflow();
52   }
53 
54   @java.lang.Override
getUnknownFields()55   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
56     return this.unknownFields;
57   }
58 
getDescriptor()59   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
60     return com.google.cloud.workflows.v1.WorkflowsProto
61         .internal_static_google_cloud_workflows_v1_Workflow_descriptor;
62   }
63 
64   @SuppressWarnings({"rawtypes"})
65   @java.lang.Override
internalGetMapField(int number)66   protected com.google.protobuf.MapField internalGetMapField(int number) {
67     switch (number) {
68       case 8:
69         return internalGetLabels();
70       default:
71         throw new RuntimeException("Invalid map field number: " + number);
72     }
73   }
74 
75   @java.lang.Override
76   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()77       internalGetFieldAccessorTable() {
78     return com.google.cloud.workflows.v1.WorkflowsProto
79         .internal_static_google_cloud_workflows_v1_Workflow_fieldAccessorTable
80         .ensureFieldAccessorsInitialized(
81             com.google.cloud.workflows.v1.Workflow.class,
82             com.google.cloud.workflows.v1.Workflow.Builder.class);
83   }
84 
85   /**
86    *
87    *
88    * <pre>
89    * Describes the current state of workflow deployment. More states may be
90    * added in the future.
91    * </pre>
92    *
93    * Protobuf enum {@code google.cloud.workflows.v1.Workflow.State}
94    */
95   public enum State implements com.google.protobuf.ProtocolMessageEnum {
96     /**
97      *
98      *
99      * <pre>
100      * Invalid state.
101      * </pre>
102      *
103      * <code>STATE_UNSPECIFIED = 0;</code>
104      */
105     STATE_UNSPECIFIED(0),
106     /**
107      *
108      *
109      * <pre>
110      * The workflow has been deployed successfully and is serving.
111      * </pre>
112      *
113      * <code>ACTIVE = 1;</code>
114      */
115     ACTIVE(1),
116     UNRECOGNIZED(-1),
117     ;
118 
119     /**
120      *
121      *
122      * <pre>
123      * Invalid state.
124      * </pre>
125      *
126      * <code>STATE_UNSPECIFIED = 0;</code>
127      */
128     public static final int STATE_UNSPECIFIED_VALUE = 0;
129     /**
130      *
131      *
132      * <pre>
133      * The workflow has been deployed successfully and is serving.
134      * </pre>
135      *
136      * <code>ACTIVE = 1;</code>
137      */
138     public static final int ACTIVE_VALUE = 1;
139 
getNumber()140     public final int getNumber() {
141       if (this == UNRECOGNIZED) {
142         throw new java.lang.IllegalArgumentException(
143             "Can't get the number of an unknown enum value.");
144       }
145       return value;
146     }
147 
148     /**
149      * @param value The numeric wire value of the corresponding enum entry.
150      * @return The enum associated with the given numeric wire value.
151      * @deprecated Use {@link #forNumber(int)} instead.
152      */
153     @java.lang.Deprecated
valueOf(int value)154     public static State valueOf(int value) {
155       return forNumber(value);
156     }
157 
158     /**
159      * @param value The numeric wire value of the corresponding enum entry.
160      * @return The enum associated with the given numeric wire value.
161      */
forNumber(int value)162     public static State forNumber(int value) {
163       switch (value) {
164         case 0:
165           return STATE_UNSPECIFIED;
166         case 1:
167           return ACTIVE;
168         default:
169           return null;
170       }
171     }
172 
internalGetValueMap()173     public static com.google.protobuf.Internal.EnumLiteMap<State> internalGetValueMap() {
174       return internalValueMap;
175     }
176 
177     private static final com.google.protobuf.Internal.EnumLiteMap<State> internalValueMap =
178         new com.google.protobuf.Internal.EnumLiteMap<State>() {
179           public State findValueByNumber(int number) {
180             return State.forNumber(number);
181           }
182         };
183 
getValueDescriptor()184     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
185       if (this == UNRECOGNIZED) {
186         throw new java.lang.IllegalStateException(
187             "Can't get the descriptor of an unrecognized enum value.");
188       }
189       return getDescriptor().getValues().get(ordinal());
190     }
191 
getDescriptorForType()192     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
193       return getDescriptor();
194     }
195 
getDescriptor()196     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
197       return com.google.cloud.workflows.v1.Workflow.getDescriptor().getEnumTypes().get(0);
198     }
199 
200     private static final State[] VALUES = values();
201 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)202     public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
203       if (desc.getType() != getDescriptor()) {
204         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
205       }
206       if (desc.getIndex() == -1) {
207         return UNRECOGNIZED;
208       }
209       return VALUES[desc.getIndex()];
210     }
211 
212     private final int value;
213 
State(int value)214     private State(int value) {
215       this.value = value;
216     }
217 
218     // @@protoc_insertion_point(enum_scope:google.cloud.workflows.v1.Workflow.State)
219   }
220 
221   private int sourceCodeCase_ = 0;
222   private java.lang.Object sourceCode_;
223 
224   public enum SourceCodeCase
225       implements
226           com.google.protobuf.Internal.EnumLite,
227           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
228     SOURCE_CONTENTS(10),
229     SOURCECODE_NOT_SET(0);
230     private final int value;
231 
SourceCodeCase(int value)232     private SourceCodeCase(int value) {
233       this.value = value;
234     }
235     /**
236      * @param value The number of the enum to look for.
237      * @return The enum associated with the given number.
238      * @deprecated Use {@link #forNumber(int)} instead.
239      */
240     @java.lang.Deprecated
valueOf(int value)241     public static SourceCodeCase valueOf(int value) {
242       return forNumber(value);
243     }
244 
forNumber(int value)245     public static SourceCodeCase forNumber(int value) {
246       switch (value) {
247         case 10:
248           return SOURCE_CONTENTS;
249         case 0:
250           return SOURCECODE_NOT_SET;
251         default:
252           return null;
253       }
254     }
255 
getNumber()256     public int getNumber() {
257       return this.value;
258     }
259   };
260 
getSourceCodeCase()261   public SourceCodeCase getSourceCodeCase() {
262     return SourceCodeCase.forNumber(sourceCodeCase_);
263   }
264 
265   public static final int NAME_FIELD_NUMBER = 1;
266 
267   @SuppressWarnings("serial")
268   private volatile java.lang.Object name_ = "";
269   /**
270    *
271    *
272    * <pre>
273    * The resource name of the workflow.
274    * Format: projects/{project}/locations/{location}/workflows/{workflow}
275    * </pre>
276    *
277    * <code>string name = 1;</code>
278    *
279    * @return The name.
280    */
281   @java.lang.Override
getName()282   public java.lang.String getName() {
283     java.lang.Object ref = name_;
284     if (ref instanceof java.lang.String) {
285       return (java.lang.String) ref;
286     } else {
287       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
288       java.lang.String s = bs.toStringUtf8();
289       name_ = s;
290       return s;
291     }
292   }
293   /**
294    *
295    *
296    * <pre>
297    * The resource name of the workflow.
298    * Format: projects/{project}/locations/{location}/workflows/{workflow}
299    * </pre>
300    *
301    * <code>string name = 1;</code>
302    *
303    * @return The bytes for name.
304    */
305   @java.lang.Override
getNameBytes()306   public com.google.protobuf.ByteString getNameBytes() {
307     java.lang.Object ref = name_;
308     if (ref instanceof java.lang.String) {
309       com.google.protobuf.ByteString b =
310           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
311       name_ = b;
312       return b;
313     } else {
314       return (com.google.protobuf.ByteString) ref;
315     }
316   }
317 
318   public static final int DESCRIPTION_FIELD_NUMBER = 2;
319 
320   @SuppressWarnings("serial")
321   private volatile java.lang.Object description_ = "";
322   /**
323    *
324    *
325    * <pre>
326    * Description of the workflow provided by the user.
327    * Must be at most 1000 unicode characters long.
328    * </pre>
329    *
330    * <code>string description = 2;</code>
331    *
332    * @return The description.
333    */
334   @java.lang.Override
getDescription()335   public java.lang.String getDescription() {
336     java.lang.Object ref = description_;
337     if (ref instanceof java.lang.String) {
338       return (java.lang.String) ref;
339     } else {
340       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
341       java.lang.String s = bs.toStringUtf8();
342       description_ = s;
343       return s;
344     }
345   }
346   /**
347    *
348    *
349    * <pre>
350    * Description of the workflow provided by the user.
351    * Must be at most 1000 unicode characters long.
352    * </pre>
353    *
354    * <code>string description = 2;</code>
355    *
356    * @return The bytes for description.
357    */
358   @java.lang.Override
getDescriptionBytes()359   public com.google.protobuf.ByteString getDescriptionBytes() {
360     java.lang.Object ref = description_;
361     if (ref instanceof java.lang.String) {
362       com.google.protobuf.ByteString b =
363           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
364       description_ = b;
365       return b;
366     } else {
367       return (com.google.protobuf.ByteString) ref;
368     }
369   }
370 
371   public static final int STATE_FIELD_NUMBER = 3;
372   private int state_ = 0;
373   /**
374    *
375    *
376    * <pre>
377    * Output only. State of the workflow deployment.
378    * </pre>
379    *
380    * <code>
381    * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
382    * </code>
383    *
384    * @return The enum numeric value on the wire for state.
385    */
386   @java.lang.Override
getStateValue()387   public int getStateValue() {
388     return state_;
389   }
390   /**
391    *
392    *
393    * <pre>
394    * Output only. State of the workflow deployment.
395    * </pre>
396    *
397    * <code>
398    * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
399    * </code>
400    *
401    * @return The state.
402    */
403   @java.lang.Override
getState()404   public com.google.cloud.workflows.v1.Workflow.State getState() {
405     com.google.cloud.workflows.v1.Workflow.State result =
406         com.google.cloud.workflows.v1.Workflow.State.forNumber(state_);
407     return result == null ? com.google.cloud.workflows.v1.Workflow.State.UNRECOGNIZED : result;
408   }
409 
410   public static final int REVISION_ID_FIELD_NUMBER = 4;
411 
412   @SuppressWarnings("serial")
413   private volatile java.lang.Object revisionId_ = "";
414   /**
415    *
416    *
417    * <pre>
418    * Output only. The revision of the workflow.
419    * A new revision of a workflow is created as a result of updating the
420    * following properties of a workflow:
421    * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
422    * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
423    * The format is "000001-a4d", where the first 6 characters define
424    * the zero-padded revision ordinal number. They are followed by a hyphen and
425    * 3 hexadecimal random characters.
426    * </pre>
427    *
428    * <code>string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
429    *
430    * @return The revisionId.
431    */
432   @java.lang.Override
getRevisionId()433   public java.lang.String getRevisionId() {
434     java.lang.Object ref = revisionId_;
435     if (ref instanceof java.lang.String) {
436       return (java.lang.String) ref;
437     } else {
438       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
439       java.lang.String s = bs.toStringUtf8();
440       revisionId_ = s;
441       return s;
442     }
443   }
444   /**
445    *
446    *
447    * <pre>
448    * Output only. The revision of the workflow.
449    * A new revision of a workflow is created as a result of updating the
450    * following properties of a workflow:
451    * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
452    * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
453    * The format is "000001-a4d", where the first 6 characters define
454    * the zero-padded revision ordinal number. They are followed by a hyphen and
455    * 3 hexadecimal random characters.
456    * </pre>
457    *
458    * <code>string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
459    *
460    * @return The bytes for revisionId.
461    */
462   @java.lang.Override
getRevisionIdBytes()463   public com.google.protobuf.ByteString getRevisionIdBytes() {
464     java.lang.Object ref = revisionId_;
465     if (ref instanceof java.lang.String) {
466       com.google.protobuf.ByteString b =
467           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
468       revisionId_ = b;
469       return b;
470     } else {
471       return (com.google.protobuf.ByteString) ref;
472     }
473   }
474 
475   public static final int CREATE_TIME_FIELD_NUMBER = 5;
476   private com.google.protobuf.Timestamp createTime_;
477   /**
478    *
479    *
480    * <pre>
481    * Output only. The timestamp of when the workflow was created.
482    * </pre>
483    *
484    * <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
485    * </code>
486    *
487    * @return Whether the createTime field is set.
488    */
489   @java.lang.Override
hasCreateTime()490   public boolean hasCreateTime() {
491     return createTime_ != null;
492   }
493   /**
494    *
495    *
496    * <pre>
497    * Output only. The timestamp of when the workflow was created.
498    * </pre>
499    *
500    * <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
501    * </code>
502    *
503    * @return The createTime.
504    */
505   @java.lang.Override
getCreateTime()506   public com.google.protobuf.Timestamp getCreateTime() {
507     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
508   }
509   /**
510    *
511    *
512    * <pre>
513    * Output only. The timestamp of when the workflow was created.
514    * </pre>
515    *
516    * <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
517    * </code>
518    */
519   @java.lang.Override
getCreateTimeOrBuilder()520   public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
521     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
522   }
523 
524   public static final int UPDATE_TIME_FIELD_NUMBER = 6;
525   private com.google.protobuf.Timestamp updateTime_;
526   /**
527    *
528    *
529    * <pre>
530    * Output only. The last update timestamp of the workflow.
531    * </pre>
532    *
533    * <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
534    * </code>
535    *
536    * @return Whether the updateTime field is set.
537    */
538   @java.lang.Override
hasUpdateTime()539   public boolean hasUpdateTime() {
540     return updateTime_ != null;
541   }
542   /**
543    *
544    *
545    * <pre>
546    * Output only. The last update timestamp of the workflow.
547    * </pre>
548    *
549    * <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
550    * </code>
551    *
552    * @return The updateTime.
553    */
554   @java.lang.Override
getUpdateTime()555   public com.google.protobuf.Timestamp getUpdateTime() {
556     return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
557   }
558   /**
559    *
560    *
561    * <pre>
562    * Output only. The last update timestamp of the workflow.
563    * </pre>
564    *
565    * <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
566    * </code>
567    */
568   @java.lang.Override
getUpdateTimeOrBuilder()569   public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
570     return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
571   }
572 
573   public static final int REVISION_CREATE_TIME_FIELD_NUMBER = 7;
574   private com.google.protobuf.Timestamp revisionCreateTime_;
575   /**
576    *
577    *
578    * <pre>
579    * Output only. The timestamp that the latest revision of the workflow
580    * was created.
581    * </pre>
582    *
583    * <code>
584    * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
585    * </code>
586    *
587    * @return Whether the revisionCreateTime field is set.
588    */
589   @java.lang.Override
hasRevisionCreateTime()590   public boolean hasRevisionCreateTime() {
591     return revisionCreateTime_ != null;
592   }
593   /**
594    *
595    *
596    * <pre>
597    * Output only. The timestamp that the latest revision of the workflow
598    * was created.
599    * </pre>
600    *
601    * <code>
602    * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
603    * </code>
604    *
605    * @return The revisionCreateTime.
606    */
607   @java.lang.Override
getRevisionCreateTime()608   public com.google.protobuf.Timestamp getRevisionCreateTime() {
609     return revisionCreateTime_ == null
610         ? com.google.protobuf.Timestamp.getDefaultInstance()
611         : revisionCreateTime_;
612   }
613   /**
614    *
615    *
616    * <pre>
617    * Output only. The timestamp that the latest revision of the workflow
618    * was created.
619    * </pre>
620    *
621    * <code>
622    * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
623    * </code>
624    */
625   @java.lang.Override
getRevisionCreateTimeOrBuilder()626   public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() {
627     return revisionCreateTime_ == null
628         ? com.google.protobuf.Timestamp.getDefaultInstance()
629         : revisionCreateTime_;
630   }
631 
632   public static final int LABELS_FIELD_NUMBER = 8;
633 
634   private static final class LabelsDefaultEntryHolder {
635     static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
636         com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
637             com.google.cloud.workflows.v1.WorkflowsProto
638                 .internal_static_google_cloud_workflows_v1_Workflow_LabelsEntry_descriptor,
639             com.google.protobuf.WireFormat.FieldType.STRING,
640             "",
641             com.google.protobuf.WireFormat.FieldType.STRING,
642             "");
643   }
644 
645   @SuppressWarnings("serial")
646   private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;
647 
internalGetLabels()648   private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
649     if (labels_ == null) {
650       return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
651     }
652     return labels_;
653   }
654 
getLabelsCount()655   public int getLabelsCount() {
656     return internalGetLabels().getMap().size();
657   }
658   /**
659    *
660    *
661    * <pre>
662    * Labels associated with this workflow.
663    * Labels can contain at most 64 entries. Keys and values can be no longer
664    * than 63 characters and can only contain lowercase letters, numeric
665    * characters, underscores and dashes. Label keys must start with a letter.
666    * International characters are allowed.
667    * </pre>
668    *
669    * <code>map&lt;string, string&gt; labels = 8;</code>
670    */
671   @java.lang.Override
containsLabels(java.lang.String key)672   public boolean containsLabels(java.lang.String key) {
673     if (key == null) {
674       throw new NullPointerException("map key");
675     }
676     return internalGetLabels().getMap().containsKey(key);
677   }
678   /** Use {@link #getLabelsMap()} instead. */
679   @java.lang.Override
680   @java.lang.Deprecated
getLabels()681   public java.util.Map<java.lang.String, java.lang.String> getLabels() {
682     return getLabelsMap();
683   }
684   /**
685    *
686    *
687    * <pre>
688    * Labels associated with this workflow.
689    * Labels can contain at most 64 entries. Keys and values can be no longer
690    * than 63 characters and can only contain lowercase letters, numeric
691    * characters, underscores and dashes. Label keys must start with a letter.
692    * International characters are allowed.
693    * </pre>
694    *
695    * <code>map&lt;string, string&gt; labels = 8;</code>
696    */
697   @java.lang.Override
getLabelsMap()698   public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
699     return internalGetLabels().getMap();
700   }
701   /**
702    *
703    *
704    * <pre>
705    * Labels associated with this workflow.
706    * Labels can contain at most 64 entries. Keys and values can be no longer
707    * than 63 characters and can only contain lowercase letters, numeric
708    * characters, underscores and dashes. Label keys must start with a letter.
709    * International characters are allowed.
710    * </pre>
711    *
712    * <code>map&lt;string, string&gt; labels = 8;</code>
713    */
714   @java.lang.Override
getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)715   public /* nullable */ java.lang.String getLabelsOrDefault(
716       java.lang.String key,
717       /* nullable */
718       java.lang.String defaultValue) {
719     if (key == null) {
720       throw new NullPointerException("map key");
721     }
722     java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
723     return map.containsKey(key) ? map.get(key) : defaultValue;
724   }
725   /**
726    *
727    *
728    * <pre>
729    * Labels associated with this workflow.
730    * Labels can contain at most 64 entries. Keys and values can be no longer
731    * than 63 characters and can only contain lowercase letters, numeric
732    * characters, underscores and dashes. Label keys must start with a letter.
733    * International characters are allowed.
734    * </pre>
735    *
736    * <code>map&lt;string, string&gt; labels = 8;</code>
737    */
738   @java.lang.Override
getLabelsOrThrow(java.lang.String key)739   public java.lang.String getLabelsOrThrow(java.lang.String key) {
740     if (key == null) {
741       throw new NullPointerException("map key");
742     }
743     java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
744     if (!map.containsKey(key)) {
745       throw new java.lang.IllegalArgumentException();
746     }
747     return map.get(key);
748   }
749 
750   public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 9;
751 
752   @SuppressWarnings("serial")
753   private volatile java.lang.Object serviceAccount_ = "";
754   /**
755    *
756    *
757    * <pre>
758    * The service account associated with the latest workflow version.
759    * This service account represents the identity of the workflow and determines
760    * what permissions the workflow has.
761    * Format: projects/{project}/serviceAccounts/{account} or {account}
762    * Using `-` as a wildcard for the `{project}` or not providing one at all
763    * will infer the project from the account. The `{account}` value can be the
764    * `email` address or the `unique_id` of the service account.
765    * If not provided, workflow will use the project's default service account.
766    * Modifying this field for an existing workflow results in a new workflow
767    * revision.
768    * </pre>
769    *
770    * <code>string service_account = 9;</code>
771    *
772    * @return The serviceAccount.
773    */
774   @java.lang.Override
getServiceAccount()775   public java.lang.String getServiceAccount() {
776     java.lang.Object ref = serviceAccount_;
777     if (ref instanceof java.lang.String) {
778       return (java.lang.String) ref;
779     } else {
780       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
781       java.lang.String s = bs.toStringUtf8();
782       serviceAccount_ = s;
783       return s;
784     }
785   }
786   /**
787    *
788    *
789    * <pre>
790    * The service account associated with the latest workflow version.
791    * This service account represents the identity of the workflow and determines
792    * what permissions the workflow has.
793    * Format: projects/{project}/serviceAccounts/{account} or {account}
794    * Using `-` as a wildcard for the `{project}` or not providing one at all
795    * will infer the project from the account. The `{account}` value can be the
796    * `email` address or the `unique_id` of the service account.
797    * If not provided, workflow will use the project's default service account.
798    * Modifying this field for an existing workflow results in a new workflow
799    * revision.
800    * </pre>
801    *
802    * <code>string service_account = 9;</code>
803    *
804    * @return The bytes for serviceAccount.
805    */
806   @java.lang.Override
getServiceAccountBytes()807   public com.google.protobuf.ByteString getServiceAccountBytes() {
808     java.lang.Object ref = serviceAccount_;
809     if (ref instanceof java.lang.String) {
810       com.google.protobuf.ByteString b =
811           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
812       serviceAccount_ = b;
813       return b;
814     } else {
815       return (com.google.protobuf.ByteString) ref;
816     }
817   }
818 
819   public static final int SOURCE_CONTENTS_FIELD_NUMBER = 10;
820   /**
821    *
822    *
823    * <pre>
824    * Workflow code to be executed. The size limit is 128KB.
825    * </pre>
826    *
827    * <code>string source_contents = 10;</code>
828    *
829    * @return Whether the sourceContents field is set.
830    */
hasSourceContents()831   public boolean hasSourceContents() {
832     return sourceCodeCase_ == 10;
833   }
834   /**
835    *
836    *
837    * <pre>
838    * Workflow code to be executed. The size limit is 128KB.
839    * </pre>
840    *
841    * <code>string source_contents = 10;</code>
842    *
843    * @return The sourceContents.
844    */
getSourceContents()845   public java.lang.String getSourceContents() {
846     java.lang.Object ref = "";
847     if (sourceCodeCase_ == 10) {
848       ref = sourceCode_;
849     }
850     if (ref instanceof java.lang.String) {
851       return (java.lang.String) ref;
852     } else {
853       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
854       java.lang.String s = bs.toStringUtf8();
855       if (sourceCodeCase_ == 10) {
856         sourceCode_ = s;
857       }
858       return s;
859     }
860   }
861   /**
862    *
863    *
864    * <pre>
865    * Workflow code to be executed. The size limit is 128KB.
866    * </pre>
867    *
868    * <code>string source_contents = 10;</code>
869    *
870    * @return The bytes for sourceContents.
871    */
getSourceContentsBytes()872   public com.google.protobuf.ByteString getSourceContentsBytes() {
873     java.lang.Object ref = "";
874     if (sourceCodeCase_ == 10) {
875       ref = sourceCode_;
876     }
877     if (ref instanceof java.lang.String) {
878       com.google.protobuf.ByteString b =
879           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
880       if (sourceCodeCase_ == 10) {
881         sourceCode_ = b;
882       }
883       return b;
884     } else {
885       return (com.google.protobuf.ByteString) ref;
886     }
887   }
888 
889   private byte memoizedIsInitialized = -1;
890 
891   @java.lang.Override
isInitialized()892   public final boolean isInitialized() {
893     byte isInitialized = memoizedIsInitialized;
894     if (isInitialized == 1) return true;
895     if (isInitialized == 0) return false;
896 
897     memoizedIsInitialized = 1;
898     return true;
899   }
900 
901   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)902   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
903     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
904       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
905     }
906     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
907       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
908     }
909     if (state_ != com.google.cloud.workflows.v1.Workflow.State.STATE_UNSPECIFIED.getNumber()) {
910       output.writeEnum(3, state_);
911     }
912     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) {
913       com.google.protobuf.GeneratedMessageV3.writeString(output, 4, revisionId_);
914     }
915     if (createTime_ != null) {
916       output.writeMessage(5, getCreateTime());
917     }
918     if (updateTime_ != null) {
919       output.writeMessage(6, getUpdateTime());
920     }
921     if (revisionCreateTime_ != null) {
922       output.writeMessage(7, getRevisionCreateTime());
923     }
924     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
925         output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8);
926     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) {
927       com.google.protobuf.GeneratedMessageV3.writeString(output, 9, serviceAccount_);
928     }
929     if (sourceCodeCase_ == 10) {
930       com.google.protobuf.GeneratedMessageV3.writeString(output, 10, sourceCode_);
931     }
932     getUnknownFields().writeTo(output);
933   }
934 
935   @java.lang.Override
getSerializedSize()936   public int getSerializedSize() {
937     int size = memoizedSize;
938     if (size != -1) return size;
939 
940     size = 0;
941     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
942       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
943     }
944     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
945       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
946     }
947     if (state_ != com.google.cloud.workflows.v1.Workflow.State.STATE_UNSPECIFIED.getNumber()) {
948       size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_);
949     }
950     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) {
951       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, revisionId_);
952     }
953     if (createTime_ != null) {
954       size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime());
955     }
956     if (updateTime_ != null) {
957       size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime());
958     }
959     if (revisionCreateTime_ != null) {
960       size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getRevisionCreateTime());
961     }
962     for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
963         internalGetLabels().getMap().entrySet()) {
964       com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
965           LabelsDefaultEntryHolder.defaultEntry
966               .newBuilderForType()
967               .setKey(entry.getKey())
968               .setValue(entry.getValue())
969               .build();
970       size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, labels__);
971     }
972     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) {
973       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, serviceAccount_);
974     }
975     if (sourceCodeCase_ == 10) {
976       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, sourceCode_);
977     }
978     size += getUnknownFields().getSerializedSize();
979     memoizedSize = size;
980     return size;
981   }
982 
983   @java.lang.Override
equals(final java.lang.Object obj)984   public boolean equals(final java.lang.Object obj) {
985     if (obj == this) {
986       return true;
987     }
988     if (!(obj instanceof com.google.cloud.workflows.v1.Workflow)) {
989       return super.equals(obj);
990     }
991     com.google.cloud.workflows.v1.Workflow other = (com.google.cloud.workflows.v1.Workflow) obj;
992 
993     if (!getName().equals(other.getName())) return false;
994     if (!getDescription().equals(other.getDescription())) return false;
995     if (state_ != other.state_) return false;
996     if (!getRevisionId().equals(other.getRevisionId())) return false;
997     if (hasCreateTime() != other.hasCreateTime()) return false;
998     if (hasCreateTime()) {
999       if (!getCreateTime().equals(other.getCreateTime())) return false;
1000     }
1001     if (hasUpdateTime() != other.hasUpdateTime()) return false;
1002     if (hasUpdateTime()) {
1003       if (!getUpdateTime().equals(other.getUpdateTime())) return false;
1004     }
1005     if (hasRevisionCreateTime() != other.hasRevisionCreateTime()) return false;
1006     if (hasRevisionCreateTime()) {
1007       if (!getRevisionCreateTime().equals(other.getRevisionCreateTime())) return false;
1008     }
1009     if (!internalGetLabels().equals(other.internalGetLabels())) return false;
1010     if (!getServiceAccount().equals(other.getServiceAccount())) return false;
1011     if (!getSourceCodeCase().equals(other.getSourceCodeCase())) return false;
1012     switch (sourceCodeCase_) {
1013       case 10:
1014         if (!getSourceContents().equals(other.getSourceContents())) return false;
1015         break;
1016       case 0:
1017       default:
1018     }
1019     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1020     return true;
1021   }
1022 
1023   @java.lang.Override
hashCode()1024   public int hashCode() {
1025     if (memoizedHashCode != 0) {
1026       return memoizedHashCode;
1027     }
1028     int hash = 41;
1029     hash = (19 * hash) + getDescriptor().hashCode();
1030     hash = (37 * hash) + NAME_FIELD_NUMBER;
1031     hash = (53 * hash) + getName().hashCode();
1032     hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
1033     hash = (53 * hash) + getDescription().hashCode();
1034     hash = (37 * hash) + STATE_FIELD_NUMBER;
1035     hash = (53 * hash) + state_;
1036     hash = (37 * hash) + REVISION_ID_FIELD_NUMBER;
1037     hash = (53 * hash) + getRevisionId().hashCode();
1038     if (hasCreateTime()) {
1039       hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
1040       hash = (53 * hash) + getCreateTime().hashCode();
1041     }
1042     if (hasUpdateTime()) {
1043       hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
1044       hash = (53 * hash) + getUpdateTime().hashCode();
1045     }
1046     if (hasRevisionCreateTime()) {
1047       hash = (37 * hash) + REVISION_CREATE_TIME_FIELD_NUMBER;
1048       hash = (53 * hash) + getRevisionCreateTime().hashCode();
1049     }
1050     if (!internalGetLabels().getMap().isEmpty()) {
1051       hash = (37 * hash) + LABELS_FIELD_NUMBER;
1052       hash = (53 * hash) + internalGetLabels().hashCode();
1053     }
1054     hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER;
1055     hash = (53 * hash) + getServiceAccount().hashCode();
1056     switch (sourceCodeCase_) {
1057       case 10:
1058         hash = (37 * hash) + SOURCE_CONTENTS_FIELD_NUMBER;
1059         hash = (53 * hash) + getSourceContents().hashCode();
1060         break;
1061       case 0:
1062       default:
1063     }
1064     hash = (29 * hash) + getUnknownFields().hashCode();
1065     memoizedHashCode = hash;
1066     return hash;
1067   }
1068 
parseFrom(java.nio.ByteBuffer data)1069   public static com.google.cloud.workflows.v1.Workflow parseFrom(java.nio.ByteBuffer data)
1070       throws com.google.protobuf.InvalidProtocolBufferException {
1071     return PARSER.parseFrom(data);
1072   }
1073 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1074   public static com.google.cloud.workflows.v1.Workflow parseFrom(
1075       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1076       throws com.google.protobuf.InvalidProtocolBufferException {
1077     return PARSER.parseFrom(data, extensionRegistry);
1078   }
1079 
parseFrom( com.google.protobuf.ByteString data)1080   public static com.google.cloud.workflows.v1.Workflow parseFrom(
1081       com.google.protobuf.ByteString data)
1082       throws com.google.protobuf.InvalidProtocolBufferException {
1083     return PARSER.parseFrom(data);
1084   }
1085 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1086   public static com.google.cloud.workflows.v1.Workflow parseFrom(
1087       com.google.protobuf.ByteString data,
1088       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1089       throws com.google.protobuf.InvalidProtocolBufferException {
1090     return PARSER.parseFrom(data, extensionRegistry);
1091   }
1092 
parseFrom(byte[] data)1093   public static com.google.cloud.workflows.v1.Workflow parseFrom(byte[] data)
1094       throws com.google.protobuf.InvalidProtocolBufferException {
1095     return PARSER.parseFrom(data);
1096   }
1097 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1098   public static com.google.cloud.workflows.v1.Workflow parseFrom(
1099       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1100       throws com.google.protobuf.InvalidProtocolBufferException {
1101     return PARSER.parseFrom(data, extensionRegistry);
1102   }
1103 
parseFrom(java.io.InputStream input)1104   public static com.google.cloud.workflows.v1.Workflow parseFrom(java.io.InputStream input)
1105       throws java.io.IOException {
1106     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1107   }
1108 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1109   public static com.google.cloud.workflows.v1.Workflow parseFrom(
1110       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1111       throws java.io.IOException {
1112     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1113         PARSER, input, extensionRegistry);
1114   }
1115 
parseDelimitedFrom(java.io.InputStream input)1116   public static com.google.cloud.workflows.v1.Workflow parseDelimitedFrom(java.io.InputStream input)
1117       throws java.io.IOException {
1118     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1119   }
1120 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1121   public static com.google.cloud.workflows.v1.Workflow parseDelimitedFrom(
1122       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1123       throws java.io.IOException {
1124     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1125         PARSER, input, extensionRegistry);
1126   }
1127 
parseFrom( com.google.protobuf.CodedInputStream input)1128   public static com.google.cloud.workflows.v1.Workflow parseFrom(
1129       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1130     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1131   }
1132 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1133   public static com.google.cloud.workflows.v1.Workflow parseFrom(
1134       com.google.protobuf.CodedInputStream input,
1135       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1136       throws java.io.IOException {
1137     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1138         PARSER, input, extensionRegistry);
1139   }
1140 
1141   @java.lang.Override
newBuilderForType()1142   public Builder newBuilderForType() {
1143     return newBuilder();
1144   }
1145 
newBuilder()1146   public static Builder newBuilder() {
1147     return DEFAULT_INSTANCE.toBuilder();
1148   }
1149 
newBuilder(com.google.cloud.workflows.v1.Workflow prototype)1150   public static Builder newBuilder(com.google.cloud.workflows.v1.Workflow prototype) {
1151     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1152   }
1153 
1154   @java.lang.Override
toBuilder()1155   public Builder toBuilder() {
1156     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1157   }
1158 
1159   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1160   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1161     Builder builder = new Builder(parent);
1162     return builder;
1163   }
1164   /**
1165    *
1166    *
1167    * <pre>
1168    * Workflow program to be executed by Workflows.
1169    * </pre>
1170    *
1171    * Protobuf type {@code google.cloud.workflows.v1.Workflow}
1172    */
1173   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1174       implements
1175       // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1.Workflow)
1176       com.google.cloud.workflows.v1.WorkflowOrBuilder {
getDescriptor()1177     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1178       return com.google.cloud.workflows.v1.WorkflowsProto
1179           .internal_static_google_cloud_workflows_v1_Workflow_descriptor;
1180     }
1181 
1182     @SuppressWarnings({"rawtypes"})
internalGetMapField(int number)1183     protected com.google.protobuf.MapField internalGetMapField(int number) {
1184       switch (number) {
1185         case 8:
1186           return internalGetLabels();
1187         default:
1188           throw new RuntimeException("Invalid map field number: " + number);
1189       }
1190     }
1191 
1192     @SuppressWarnings({"rawtypes"})
internalGetMutableMapField(int number)1193     protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
1194       switch (number) {
1195         case 8:
1196           return internalGetMutableLabels();
1197         default:
1198           throw new RuntimeException("Invalid map field number: " + number);
1199       }
1200     }
1201 
1202     @java.lang.Override
1203     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1204         internalGetFieldAccessorTable() {
1205       return com.google.cloud.workflows.v1.WorkflowsProto
1206           .internal_static_google_cloud_workflows_v1_Workflow_fieldAccessorTable
1207           .ensureFieldAccessorsInitialized(
1208               com.google.cloud.workflows.v1.Workflow.class,
1209               com.google.cloud.workflows.v1.Workflow.Builder.class);
1210     }
1211 
1212     // Construct using com.google.cloud.workflows.v1.Workflow.newBuilder()
Builder()1213     private Builder() {}
1214 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1215     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1216       super(parent);
1217     }
1218 
1219     @java.lang.Override
clear()1220     public Builder clear() {
1221       super.clear();
1222       bitField0_ = 0;
1223       name_ = "";
1224       description_ = "";
1225       state_ = 0;
1226       revisionId_ = "";
1227       createTime_ = null;
1228       if (createTimeBuilder_ != null) {
1229         createTimeBuilder_.dispose();
1230         createTimeBuilder_ = null;
1231       }
1232       updateTime_ = null;
1233       if (updateTimeBuilder_ != null) {
1234         updateTimeBuilder_.dispose();
1235         updateTimeBuilder_ = null;
1236       }
1237       revisionCreateTime_ = null;
1238       if (revisionCreateTimeBuilder_ != null) {
1239         revisionCreateTimeBuilder_.dispose();
1240         revisionCreateTimeBuilder_ = null;
1241       }
1242       internalGetMutableLabels().clear();
1243       serviceAccount_ = "";
1244       sourceCodeCase_ = 0;
1245       sourceCode_ = null;
1246       return this;
1247     }
1248 
1249     @java.lang.Override
getDescriptorForType()1250     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1251       return com.google.cloud.workflows.v1.WorkflowsProto
1252           .internal_static_google_cloud_workflows_v1_Workflow_descriptor;
1253     }
1254 
1255     @java.lang.Override
getDefaultInstanceForType()1256     public com.google.cloud.workflows.v1.Workflow getDefaultInstanceForType() {
1257       return com.google.cloud.workflows.v1.Workflow.getDefaultInstance();
1258     }
1259 
1260     @java.lang.Override
build()1261     public com.google.cloud.workflows.v1.Workflow build() {
1262       com.google.cloud.workflows.v1.Workflow result = buildPartial();
1263       if (!result.isInitialized()) {
1264         throw newUninitializedMessageException(result);
1265       }
1266       return result;
1267     }
1268 
1269     @java.lang.Override
buildPartial()1270     public com.google.cloud.workflows.v1.Workflow buildPartial() {
1271       com.google.cloud.workflows.v1.Workflow result =
1272           new com.google.cloud.workflows.v1.Workflow(this);
1273       if (bitField0_ != 0) {
1274         buildPartial0(result);
1275       }
1276       buildPartialOneofs(result);
1277       onBuilt();
1278       return result;
1279     }
1280 
buildPartial0(com.google.cloud.workflows.v1.Workflow result)1281     private void buildPartial0(com.google.cloud.workflows.v1.Workflow result) {
1282       int from_bitField0_ = bitField0_;
1283       if (((from_bitField0_ & 0x00000001) != 0)) {
1284         result.name_ = name_;
1285       }
1286       if (((from_bitField0_ & 0x00000002) != 0)) {
1287         result.description_ = description_;
1288       }
1289       if (((from_bitField0_ & 0x00000004) != 0)) {
1290         result.state_ = state_;
1291       }
1292       if (((from_bitField0_ & 0x00000008) != 0)) {
1293         result.revisionId_ = revisionId_;
1294       }
1295       if (((from_bitField0_ & 0x00000010) != 0)) {
1296         result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
1297       }
1298       if (((from_bitField0_ & 0x00000020) != 0)) {
1299         result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
1300       }
1301       if (((from_bitField0_ & 0x00000040) != 0)) {
1302         result.revisionCreateTime_ =
1303             revisionCreateTimeBuilder_ == null
1304                 ? revisionCreateTime_
1305                 : revisionCreateTimeBuilder_.build();
1306       }
1307       if (((from_bitField0_ & 0x00000080) != 0)) {
1308         result.labels_ = internalGetLabels();
1309         result.labels_.makeImmutable();
1310       }
1311       if (((from_bitField0_ & 0x00000100) != 0)) {
1312         result.serviceAccount_ = serviceAccount_;
1313       }
1314     }
1315 
buildPartialOneofs(com.google.cloud.workflows.v1.Workflow result)1316     private void buildPartialOneofs(com.google.cloud.workflows.v1.Workflow result) {
1317       result.sourceCodeCase_ = sourceCodeCase_;
1318       result.sourceCode_ = this.sourceCode_;
1319     }
1320 
1321     @java.lang.Override
clone()1322     public Builder clone() {
1323       return super.clone();
1324     }
1325 
1326     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1327     public Builder setField(
1328         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1329       return super.setField(field, value);
1330     }
1331 
1332     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1333     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1334       return super.clearField(field);
1335     }
1336 
1337     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1338     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1339       return super.clearOneof(oneof);
1340     }
1341 
1342     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1343     public Builder setRepeatedField(
1344         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1345       return super.setRepeatedField(field, index, value);
1346     }
1347 
1348     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1349     public Builder addRepeatedField(
1350         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1351       return super.addRepeatedField(field, value);
1352     }
1353 
1354     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1355     public Builder mergeFrom(com.google.protobuf.Message other) {
1356       if (other instanceof com.google.cloud.workflows.v1.Workflow) {
1357         return mergeFrom((com.google.cloud.workflows.v1.Workflow) other);
1358       } else {
1359         super.mergeFrom(other);
1360         return this;
1361       }
1362     }
1363 
mergeFrom(com.google.cloud.workflows.v1.Workflow other)1364     public Builder mergeFrom(com.google.cloud.workflows.v1.Workflow other) {
1365       if (other == com.google.cloud.workflows.v1.Workflow.getDefaultInstance()) return this;
1366       if (!other.getName().isEmpty()) {
1367         name_ = other.name_;
1368         bitField0_ |= 0x00000001;
1369         onChanged();
1370       }
1371       if (!other.getDescription().isEmpty()) {
1372         description_ = other.description_;
1373         bitField0_ |= 0x00000002;
1374         onChanged();
1375       }
1376       if (other.state_ != 0) {
1377         setStateValue(other.getStateValue());
1378       }
1379       if (!other.getRevisionId().isEmpty()) {
1380         revisionId_ = other.revisionId_;
1381         bitField0_ |= 0x00000008;
1382         onChanged();
1383       }
1384       if (other.hasCreateTime()) {
1385         mergeCreateTime(other.getCreateTime());
1386       }
1387       if (other.hasUpdateTime()) {
1388         mergeUpdateTime(other.getUpdateTime());
1389       }
1390       if (other.hasRevisionCreateTime()) {
1391         mergeRevisionCreateTime(other.getRevisionCreateTime());
1392       }
1393       internalGetMutableLabels().mergeFrom(other.internalGetLabels());
1394       bitField0_ |= 0x00000080;
1395       if (!other.getServiceAccount().isEmpty()) {
1396         serviceAccount_ = other.serviceAccount_;
1397         bitField0_ |= 0x00000100;
1398         onChanged();
1399       }
1400       switch (other.getSourceCodeCase()) {
1401         case SOURCE_CONTENTS:
1402           {
1403             sourceCodeCase_ = 10;
1404             sourceCode_ = other.sourceCode_;
1405             onChanged();
1406             break;
1407           }
1408         case SOURCECODE_NOT_SET:
1409           {
1410             break;
1411           }
1412       }
1413       this.mergeUnknownFields(other.getUnknownFields());
1414       onChanged();
1415       return this;
1416     }
1417 
1418     @java.lang.Override
isInitialized()1419     public final boolean isInitialized() {
1420       return true;
1421     }
1422 
1423     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1424     public Builder mergeFrom(
1425         com.google.protobuf.CodedInputStream input,
1426         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1427         throws java.io.IOException {
1428       if (extensionRegistry == null) {
1429         throw new java.lang.NullPointerException();
1430       }
1431       try {
1432         boolean done = false;
1433         while (!done) {
1434           int tag = input.readTag();
1435           switch (tag) {
1436             case 0:
1437               done = true;
1438               break;
1439             case 10:
1440               {
1441                 name_ = input.readStringRequireUtf8();
1442                 bitField0_ |= 0x00000001;
1443                 break;
1444               } // case 10
1445             case 18:
1446               {
1447                 description_ = input.readStringRequireUtf8();
1448                 bitField0_ |= 0x00000002;
1449                 break;
1450               } // case 18
1451             case 24:
1452               {
1453                 state_ = input.readEnum();
1454                 bitField0_ |= 0x00000004;
1455                 break;
1456               } // case 24
1457             case 34:
1458               {
1459                 revisionId_ = input.readStringRequireUtf8();
1460                 bitField0_ |= 0x00000008;
1461                 break;
1462               } // case 34
1463             case 42:
1464               {
1465                 input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
1466                 bitField0_ |= 0x00000010;
1467                 break;
1468               } // case 42
1469             case 50:
1470               {
1471                 input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
1472                 bitField0_ |= 0x00000020;
1473                 break;
1474               } // case 50
1475             case 58:
1476               {
1477                 input.readMessage(
1478                     getRevisionCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
1479                 bitField0_ |= 0x00000040;
1480                 break;
1481               } // case 58
1482             case 66:
1483               {
1484                 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
1485                     input.readMessage(
1486                         LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
1487                         extensionRegistry);
1488                 internalGetMutableLabels()
1489                     .getMutableMap()
1490                     .put(labels__.getKey(), labels__.getValue());
1491                 bitField0_ |= 0x00000080;
1492                 break;
1493               } // case 66
1494             case 74:
1495               {
1496                 serviceAccount_ = input.readStringRequireUtf8();
1497                 bitField0_ |= 0x00000100;
1498                 break;
1499               } // case 74
1500             case 82:
1501               {
1502                 java.lang.String s = input.readStringRequireUtf8();
1503                 sourceCodeCase_ = 10;
1504                 sourceCode_ = s;
1505                 break;
1506               } // case 82
1507             default:
1508               {
1509                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1510                   done = true; // was an endgroup tag
1511                 }
1512                 break;
1513               } // default:
1514           } // switch (tag)
1515         } // while (!done)
1516       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1517         throw e.unwrapIOException();
1518       } finally {
1519         onChanged();
1520       } // finally
1521       return this;
1522     }
1523 
1524     private int sourceCodeCase_ = 0;
1525     private java.lang.Object sourceCode_;
1526 
getSourceCodeCase()1527     public SourceCodeCase getSourceCodeCase() {
1528       return SourceCodeCase.forNumber(sourceCodeCase_);
1529     }
1530 
clearSourceCode()1531     public Builder clearSourceCode() {
1532       sourceCodeCase_ = 0;
1533       sourceCode_ = null;
1534       onChanged();
1535       return this;
1536     }
1537 
1538     private int bitField0_;
1539 
1540     private java.lang.Object name_ = "";
1541     /**
1542      *
1543      *
1544      * <pre>
1545      * The resource name of the workflow.
1546      * Format: projects/{project}/locations/{location}/workflows/{workflow}
1547      * </pre>
1548      *
1549      * <code>string name = 1;</code>
1550      *
1551      * @return The name.
1552      */
getName()1553     public java.lang.String getName() {
1554       java.lang.Object ref = name_;
1555       if (!(ref instanceof java.lang.String)) {
1556         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1557         java.lang.String s = bs.toStringUtf8();
1558         name_ = s;
1559         return s;
1560       } else {
1561         return (java.lang.String) ref;
1562       }
1563     }
1564     /**
1565      *
1566      *
1567      * <pre>
1568      * The resource name of the workflow.
1569      * Format: projects/{project}/locations/{location}/workflows/{workflow}
1570      * </pre>
1571      *
1572      * <code>string name = 1;</code>
1573      *
1574      * @return The bytes for name.
1575      */
getNameBytes()1576     public com.google.protobuf.ByteString getNameBytes() {
1577       java.lang.Object ref = name_;
1578       if (ref instanceof String) {
1579         com.google.protobuf.ByteString b =
1580             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1581         name_ = b;
1582         return b;
1583       } else {
1584         return (com.google.protobuf.ByteString) ref;
1585       }
1586     }
1587     /**
1588      *
1589      *
1590      * <pre>
1591      * The resource name of the workflow.
1592      * Format: projects/{project}/locations/{location}/workflows/{workflow}
1593      * </pre>
1594      *
1595      * <code>string name = 1;</code>
1596      *
1597      * @param value The name to set.
1598      * @return This builder for chaining.
1599      */
setName(java.lang.String value)1600     public Builder setName(java.lang.String value) {
1601       if (value == null) {
1602         throw new NullPointerException();
1603       }
1604       name_ = value;
1605       bitField0_ |= 0x00000001;
1606       onChanged();
1607       return this;
1608     }
1609     /**
1610      *
1611      *
1612      * <pre>
1613      * The resource name of the workflow.
1614      * Format: projects/{project}/locations/{location}/workflows/{workflow}
1615      * </pre>
1616      *
1617      * <code>string name = 1;</code>
1618      *
1619      * @return This builder for chaining.
1620      */
clearName()1621     public Builder clearName() {
1622       name_ = getDefaultInstance().getName();
1623       bitField0_ = (bitField0_ & ~0x00000001);
1624       onChanged();
1625       return this;
1626     }
1627     /**
1628      *
1629      *
1630      * <pre>
1631      * The resource name of the workflow.
1632      * Format: projects/{project}/locations/{location}/workflows/{workflow}
1633      * </pre>
1634      *
1635      * <code>string name = 1;</code>
1636      *
1637      * @param value The bytes for name to set.
1638      * @return This builder for chaining.
1639      */
setNameBytes(com.google.protobuf.ByteString value)1640     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1641       if (value == null) {
1642         throw new NullPointerException();
1643       }
1644       checkByteStringIsUtf8(value);
1645       name_ = value;
1646       bitField0_ |= 0x00000001;
1647       onChanged();
1648       return this;
1649     }
1650 
1651     private java.lang.Object description_ = "";
1652     /**
1653      *
1654      *
1655      * <pre>
1656      * Description of the workflow provided by the user.
1657      * Must be at most 1000 unicode characters long.
1658      * </pre>
1659      *
1660      * <code>string description = 2;</code>
1661      *
1662      * @return The description.
1663      */
getDescription()1664     public java.lang.String getDescription() {
1665       java.lang.Object ref = description_;
1666       if (!(ref instanceof java.lang.String)) {
1667         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1668         java.lang.String s = bs.toStringUtf8();
1669         description_ = s;
1670         return s;
1671       } else {
1672         return (java.lang.String) ref;
1673       }
1674     }
1675     /**
1676      *
1677      *
1678      * <pre>
1679      * Description of the workflow provided by the user.
1680      * Must be at most 1000 unicode characters long.
1681      * </pre>
1682      *
1683      * <code>string description = 2;</code>
1684      *
1685      * @return The bytes for description.
1686      */
getDescriptionBytes()1687     public com.google.protobuf.ByteString getDescriptionBytes() {
1688       java.lang.Object ref = description_;
1689       if (ref instanceof String) {
1690         com.google.protobuf.ByteString b =
1691             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1692         description_ = b;
1693         return b;
1694       } else {
1695         return (com.google.protobuf.ByteString) ref;
1696       }
1697     }
1698     /**
1699      *
1700      *
1701      * <pre>
1702      * Description of the workflow provided by the user.
1703      * Must be at most 1000 unicode characters long.
1704      * </pre>
1705      *
1706      * <code>string description = 2;</code>
1707      *
1708      * @param value The description to set.
1709      * @return This builder for chaining.
1710      */
setDescription(java.lang.String value)1711     public Builder setDescription(java.lang.String value) {
1712       if (value == null) {
1713         throw new NullPointerException();
1714       }
1715       description_ = value;
1716       bitField0_ |= 0x00000002;
1717       onChanged();
1718       return this;
1719     }
1720     /**
1721      *
1722      *
1723      * <pre>
1724      * Description of the workflow provided by the user.
1725      * Must be at most 1000 unicode characters long.
1726      * </pre>
1727      *
1728      * <code>string description = 2;</code>
1729      *
1730      * @return This builder for chaining.
1731      */
clearDescription()1732     public Builder clearDescription() {
1733       description_ = getDefaultInstance().getDescription();
1734       bitField0_ = (bitField0_ & ~0x00000002);
1735       onChanged();
1736       return this;
1737     }
1738     /**
1739      *
1740      *
1741      * <pre>
1742      * Description of the workflow provided by the user.
1743      * Must be at most 1000 unicode characters long.
1744      * </pre>
1745      *
1746      * <code>string description = 2;</code>
1747      *
1748      * @param value The bytes for description to set.
1749      * @return This builder for chaining.
1750      */
setDescriptionBytes(com.google.protobuf.ByteString value)1751     public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
1752       if (value == null) {
1753         throw new NullPointerException();
1754       }
1755       checkByteStringIsUtf8(value);
1756       description_ = value;
1757       bitField0_ |= 0x00000002;
1758       onChanged();
1759       return this;
1760     }
1761 
1762     private int state_ = 0;
1763     /**
1764      *
1765      *
1766      * <pre>
1767      * Output only. State of the workflow deployment.
1768      * </pre>
1769      *
1770      * <code>
1771      * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
1772      * </code>
1773      *
1774      * @return The enum numeric value on the wire for state.
1775      */
1776     @java.lang.Override
getStateValue()1777     public int getStateValue() {
1778       return state_;
1779     }
1780     /**
1781      *
1782      *
1783      * <pre>
1784      * Output only. State of the workflow deployment.
1785      * </pre>
1786      *
1787      * <code>
1788      * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
1789      * </code>
1790      *
1791      * @param value The enum numeric value on the wire for state to set.
1792      * @return This builder for chaining.
1793      */
setStateValue(int value)1794     public Builder setStateValue(int value) {
1795       state_ = value;
1796       bitField0_ |= 0x00000004;
1797       onChanged();
1798       return this;
1799     }
1800     /**
1801      *
1802      *
1803      * <pre>
1804      * Output only. State of the workflow deployment.
1805      * </pre>
1806      *
1807      * <code>
1808      * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
1809      * </code>
1810      *
1811      * @return The state.
1812      */
1813     @java.lang.Override
getState()1814     public com.google.cloud.workflows.v1.Workflow.State getState() {
1815       com.google.cloud.workflows.v1.Workflow.State result =
1816           com.google.cloud.workflows.v1.Workflow.State.forNumber(state_);
1817       return result == null ? com.google.cloud.workflows.v1.Workflow.State.UNRECOGNIZED : result;
1818     }
1819     /**
1820      *
1821      *
1822      * <pre>
1823      * Output only. State of the workflow deployment.
1824      * </pre>
1825      *
1826      * <code>
1827      * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
1828      * </code>
1829      *
1830      * @param value The state to set.
1831      * @return This builder for chaining.
1832      */
setState(com.google.cloud.workflows.v1.Workflow.State value)1833     public Builder setState(com.google.cloud.workflows.v1.Workflow.State value) {
1834       if (value == null) {
1835         throw new NullPointerException();
1836       }
1837       bitField0_ |= 0x00000004;
1838       state_ = value.getNumber();
1839       onChanged();
1840       return this;
1841     }
1842     /**
1843      *
1844      *
1845      * <pre>
1846      * Output only. State of the workflow deployment.
1847      * </pre>
1848      *
1849      * <code>
1850      * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
1851      * </code>
1852      *
1853      * @return This builder for chaining.
1854      */
clearState()1855     public Builder clearState() {
1856       bitField0_ = (bitField0_ & ~0x00000004);
1857       state_ = 0;
1858       onChanged();
1859       return this;
1860     }
1861 
1862     private java.lang.Object revisionId_ = "";
1863     /**
1864      *
1865      *
1866      * <pre>
1867      * Output only. The revision of the workflow.
1868      * A new revision of a workflow is created as a result of updating the
1869      * following properties of a workflow:
1870      * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
1871      * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
1872      * The format is "000001-a4d", where the first 6 characters define
1873      * the zero-padded revision ordinal number. They are followed by a hyphen and
1874      * 3 hexadecimal random characters.
1875      * </pre>
1876      *
1877      * <code>string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1878      *
1879      * @return The revisionId.
1880      */
getRevisionId()1881     public java.lang.String getRevisionId() {
1882       java.lang.Object ref = revisionId_;
1883       if (!(ref instanceof java.lang.String)) {
1884         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1885         java.lang.String s = bs.toStringUtf8();
1886         revisionId_ = s;
1887         return s;
1888       } else {
1889         return (java.lang.String) ref;
1890       }
1891     }
1892     /**
1893      *
1894      *
1895      * <pre>
1896      * Output only. The revision of the workflow.
1897      * A new revision of a workflow is created as a result of updating the
1898      * following properties of a workflow:
1899      * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
1900      * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
1901      * The format is "000001-a4d", where the first 6 characters define
1902      * the zero-padded revision ordinal number. They are followed by a hyphen and
1903      * 3 hexadecimal random characters.
1904      * </pre>
1905      *
1906      * <code>string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1907      *
1908      * @return The bytes for revisionId.
1909      */
getRevisionIdBytes()1910     public com.google.protobuf.ByteString getRevisionIdBytes() {
1911       java.lang.Object ref = revisionId_;
1912       if (ref instanceof String) {
1913         com.google.protobuf.ByteString b =
1914             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1915         revisionId_ = b;
1916         return b;
1917       } else {
1918         return (com.google.protobuf.ByteString) ref;
1919       }
1920     }
1921     /**
1922      *
1923      *
1924      * <pre>
1925      * Output only. The revision of the workflow.
1926      * A new revision of a workflow is created as a result of updating the
1927      * following properties of a workflow:
1928      * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
1929      * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
1930      * The format is "000001-a4d", where the first 6 characters define
1931      * the zero-padded revision ordinal number. They are followed by a hyphen and
1932      * 3 hexadecimal random characters.
1933      * </pre>
1934      *
1935      * <code>string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1936      *
1937      * @param value The revisionId to set.
1938      * @return This builder for chaining.
1939      */
setRevisionId(java.lang.String value)1940     public Builder setRevisionId(java.lang.String value) {
1941       if (value == null) {
1942         throw new NullPointerException();
1943       }
1944       revisionId_ = value;
1945       bitField0_ |= 0x00000008;
1946       onChanged();
1947       return this;
1948     }
1949     /**
1950      *
1951      *
1952      * <pre>
1953      * Output only. The revision of the workflow.
1954      * A new revision of a workflow is created as a result of updating the
1955      * following properties of a workflow:
1956      * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
1957      * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
1958      * The format is "000001-a4d", where the first 6 characters define
1959      * the zero-padded revision ordinal number. They are followed by a hyphen and
1960      * 3 hexadecimal random characters.
1961      * </pre>
1962      *
1963      * <code>string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1964      *
1965      * @return This builder for chaining.
1966      */
clearRevisionId()1967     public Builder clearRevisionId() {
1968       revisionId_ = getDefaultInstance().getRevisionId();
1969       bitField0_ = (bitField0_ & ~0x00000008);
1970       onChanged();
1971       return this;
1972     }
1973     /**
1974      *
1975      *
1976      * <pre>
1977      * Output only. The revision of the workflow.
1978      * A new revision of a workflow is created as a result of updating the
1979      * following properties of a workflow:
1980      * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
1981      * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
1982      * The format is "000001-a4d", where the first 6 characters define
1983      * the zero-padded revision ordinal number. They are followed by a hyphen and
1984      * 3 hexadecimal random characters.
1985      * </pre>
1986      *
1987      * <code>string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1988      *
1989      * @param value The bytes for revisionId to set.
1990      * @return This builder for chaining.
1991      */
setRevisionIdBytes(com.google.protobuf.ByteString value)1992     public Builder setRevisionIdBytes(com.google.protobuf.ByteString value) {
1993       if (value == null) {
1994         throw new NullPointerException();
1995       }
1996       checkByteStringIsUtf8(value);
1997       revisionId_ = value;
1998       bitField0_ |= 0x00000008;
1999       onChanged();
2000       return this;
2001     }
2002 
2003     private com.google.protobuf.Timestamp createTime_;
2004     private com.google.protobuf.SingleFieldBuilderV3<
2005             com.google.protobuf.Timestamp,
2006             com.google.protobuf.Timestamp.Builder,
2007             com.google.protobuf.TimestampOrBuilder>
2008         createTimeBuilder_;
2009     /**
2010      *
2011      *
2012      * <pre>
2013      * Output only. The timestamp of when the workflow was created.
2014      * </pre>
2015      *
2016      * <code>
2017      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2018      * </code>
2019      *
2020      * @return Whether the createTime field is set.
2021      */
hasCreateTime()2022     public boolean hasCreateTime() {
2023       return ((bitField0_ & 0x00000010) != 0);
2024     }
2025     /**
2026      *
2027      *
2028      * <pre>
2029      * Output only. The timestamp of when the workflow was created.
2030      * </pre>
2031      *
2032      * <code>
2033      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2034      * </code>
2035      *
2036      * @return The createTime.
2037      */
getCreateTime()2038     public com.google.protobuf.Timestamp getCreateTime() {
2039       if (createTimeBuilder_ == null) {
2040         return createTime_ == null
2041             ? com.google.protobuf.Timestamp.getDefaultInstance()
2042             : createTime_;
2043       } else {
2044         return createTimeBuilder_.getMessage();
2045       }
2046     }
2047     /**
2048      *
2049      *
2050      * <pre>
2051      * Output only. The timestamp of when the workflow was created.
2052      * </pre>
2053      *
2054      * <code>
2055      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2056      * </code>
2057      */
setCreateTime(com.google.protobuf.Timestamp value)2058     public Builder setCreateTime(com.google.protobuf.Timestamp value) {
2059       if (createTimeBuilder_ == null) {
2060         if (value == null) {
2061           throw new NullPointerException();
2062         }
2063         createTime_ = value;
2064       } else {
2065         createTimeBuilder_.setMessage(value);
2066       }
2067       bitField0_ |= 0x00000010;
2068       onChanged();
2069       return this;
2070     }
2071     /**
2072      *
2073      *
2074      * <pre>
2075      * Output only. The timestamp of when the workflow was created.
2076      * </pre>
2077      *
2078      * <code>
2079      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2080      * </code>
2081      */
setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)2082     public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
2083       if (createTimeBuilder_ == null) {
2084         createTime_ = builderForValue.build();
2085       } else {
2086         createTimeBuilder_.setMessage(builderForValue.build());
2087       }
2088       bitField0_ |= 0x00000010;
2089       onChanged();
2090       return this;
2091     }
2092     /**
2093      *
2094      *
2095      * <pre>
2096      * Output only. The timestamp of when the workflow was created.
2097      * </pre>
2098      *
2099      * <code>
2100      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2101      * </code>
2102      */
mergeCreateTime(com.google.protobuf.Timestamp value)2103     public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
2104       if (createTimeBuilder_ == null) {
2105         if (((bitField0_ & 0x00000010) != 0)
2106             && createTime_ != null
2107             && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
2108           getCreateTimeBuilder().mergeFrom(value);
2109         } else {
2110           createTime_ = value;
2111         }
2112       } else {
2113         createTimeBuilder_.mergeFrom(value);
2114       }
2115       bitField0_ |= 0x00000010;
2116       onChanged();
2117       return this;
2118     }
2119     /**
2120      *
2121      *
2122      * <pre>
2123      * Output only. The timestamp of when the workflow was created.
2124      * </pre>
2125      *
2126      * <code>
2127      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2128      * </code>
2129      */
clearCreateTime()2130     public Builder clearCreateTime() {
2131       bitField0_ = (bitField0_ & ~0x00000010);
2132       createTime_ = null;
2133       if (createTimeBuilder_ != null) {
2134         createTimeBuilder_.dispose();
2135         createTimeBuilder_ = null;
2136       }
2137       onChanged();
2138       return this;
2139     }
2140     /**
2141      *
2142      *
2143      * <pre>
2144      * Output only. The timestamp of when the workflow was created.
2145      * </pre>
2146      *
2147      * <code>
2148      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2149      * </code>
2150      */
getCreateTimeBuilder()2151     public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
2152       bitField0_ |= 0x00000010;
2153       onChanged();
2154       return getCreateTimeFieldBuilder().getBuilder();
2155     }
2156     /**
2157      *
2158      *
2159      * <pre>
2160      * Output only. The timestamp of when the workflow was created.
2161      * </pre>
2162      *
2163      * <code>
2164      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2165      * </code>
2166      */
getCreateTimeOrBuilder()2167     public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
2168       if (createTimeBuilder_ != null) {
2169         return createTimeBuilder_.getMessageOrBuilder();
2170       } else {
2171         return createTime_ == null
2172             ? com.google.protobuf.Timestamp.getDefaultInstance()
2173             : createTime_;
2174       }
2175     }
2176     /**
2177      *
2178      *
2179      * <pre>
2180      * Output only. The timestamp of when the workflow was created.
2181      * </pre>
2182      *
2183      * <code>
2184      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2185      * </code>
2186      */
2187     private com.google.protobuf.SingleFieldBuilderV3<
2188             com.google.protobuf.Timestamp,
2189             com.google.protobuf.Timestamp.Builder,
2190             com.google.protobuf.TimestampOrBuilder>
getCreateTimeFieldBuilder()2191         getCreateTimeFieldBuilder() {
2192       if (createTimeBuilder_ == null) {
2193         createTimeBuilder_ =
2194             new com.google.protobuf.SingleFieldBuilderV3<
2195                 com.google.protobuf.Timestamp,
2196                 com.google.protobuf.Timestamp.Builder,
2197                 com.google.protobuf.TimestampOrBuilder>(
2198                 getCreateTime(), getParentForChildren(), isClean());
2199         createTime_ = null;
2200       }
2201       return createTimeBuilder_;
2202     }
2203 
2204     private com.google.protobuf.Timestamp updateTime_;
2205     private com.google.protobuf.SingleFieldBuilderV3<
2206             com.google.protobuf.Timestamp,
2207             com.google.protobuf.Timestamp.Builder,
2208             com.google.protobuf.TimestampOrBuilder>
2209         updateTimeBuilder_;
2210     /**
2211      *
2212      *
2213      * <pre>
2214      * Output only. The last update timestamp of the workflow.
2215      * </pre>
2216      *
2217      * <code>
2218      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2219      * </code>
2220      *
2221      * @return Whether the updateTime field is set.
2222      */
hasUpdateTime()2223     public boolean hasUpdateTime() {
2224       return ((bitField0_ & 0x00000020) != 0);
2225     }
2226     /**
2227      *
2228      *
2229      * <pre>
2230      * Output only. The last update timestamp of the workflow.
2231      * </pre>
2232      *
2233      * <code>
2234      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2235      * </code>
2236      *
2237      * @return The updateTime.
2238      */
getUpdateTime()2239     public com.google.protobuf.Timestamp getUpdateTime() {
2240       if (updateTimeBuilder_ == null) {
2241         return updateTime_ == null
2242             ? com.google.protobuf.Timestamp.getDefaultInstance()
2243             : updateTime_;
2244       } else {
2245         return updateTimeBuilder_.getMessage();
2246       }
2247     }
2248     /**
2249      *
2250      *
2251      * <pre>
2252      * Output only. The last update timestamp of the workflow.
2253      * </pre>
2254      *
2255      * <code>
2256      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2257      * </code>
2258      */
setUpdateTime(com.google.protobuf.Timestamp value)2259     public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
2260       if (updateTimeBuilder_ == null) {
2261         if (value == null) {
2262           throw new NullPointerException();
2263         }
2264         updateTime_ = value;
2265       } else {
2266         updateTimeBuilder_.setMessage(value);
2267       }
2268       bitField0_ |= 0x00000020;
2269       onChanged();
2270       return this;
2271     }
2272     /**
2273      *
2274      *
2275      * <pre>
2276      * Output only. The last update timestamp of the workflow.
2277      * </pre>
2278      *
2279      * <code>
2280      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2281      * </code>
2282      */
setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)2283     public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
2284       if (updateTimeBuilder_ == null) {
2285         updateTime_ = builderForValue.build();
2286       } else {
2287         updateTimeBuilder_.setMessage(builderForValue.build());
2288       }
2289       bitField0_ |= 0x00000020;
2290       onChanged();
2291       return this;
2292     }
2293     /**
2294      *
2295      *
2296      * <pre>
2297      * Output only. The last update timestamp of the workflow.
2298      * </pre>
2299      *
2300      * <code>
2301      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2302      * </code>
2303      */
mergeUpdateTime(com.google.protobuf.Timestamp value)2304     public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
2305       if (updateTimeBuilder_ == null) {
2306         if (((bitField0_ & 0x00000020) != 0)
2307             && updateTime_ != null
2308             && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
2309           getUpdateTimeBuilder().mergeFrom(value);
2310         } else {
2311           updateTime_ = value;
2312         }
2313       } else {
2314         updateTimeBuilder_.mergeFrom(value);
2315       }
2316       bitField0_ |= 0x00000020;
2317       onChanged();
2318       return this;
2319     }
2320     /**
2321      *
2322      *
2323      * <pre>
2324      * Output only. The last update timestamp of the workflow.
2325      * </pre>
2326      *
2327      * <code>
2328      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2329      * </code>
2330      */
clearUpdateTime()2331     public Builder clearUpdateTime() {
2332       bitField0_ = (bitField0_ & ~0x00000020);
2333       updateTime_ = null;
2334       if (updateTimeBuilder_ != null) {
2335         updateTimeBuilder_.dispose();
2336         updateTimeBuilder_ = null;
2337       }
2338       onChanged();
2339       return this;
2340     }
2341     /**
2342      *
2343      *
2344      * <pre>
2345      * Output only. The last update timestamp of the workflow.
2346      * </pre>
2347      *
2348      * <code>
2349      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2350      * </code>
2351      */
getUpdateTimeBuilder()2352     public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
2353       bitField0_ |= 0x00000020;
2354       onChanged();
2355       return getUpdateTimeFieldBuilder().getBuilder();
2356     }
2357     /**
2358      *
2359      *
2360      * <pre>
2361      * Output only. The last update timestamp of the workflow.
2362      * </pre>
2363      *
2364      * <code>
2365      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2366      * </code>
2367      */
getUpdateTimeOrBuilder()2368     public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
2369       if (updateTimeBuilder_ != null) {
2370         return updateTimeBuilder_.getMessageOrBuilder();
2371       } else {
2372         return updateTime_ == null
2373             ? com.google.protobuf.Timestamp.getDefaultInstance()
2374             : updateTime_;
2375       }
2376     }
2377     /**
2378      *
2379      *
2380      * <pre>
2381      * Output only. The last update timestamp of the workflow.
2382      * </pre>
2383      *
2384      * <code>
2385      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2386      * </code>
2387      */
2388     private com.google.protobuf.SingleFieldBuilderV3<
2389             com.google.protobuf.Timestamp,
2390             com.google.protobuf.Timestamp.Builder,
2391             com.google.protobuf.TimestampOrBuilder>
getUpdateTimeFieldBuilder()2392         getUpdateTimeFieldBuilder() {
2393       if (updateTimeBuilder_ == null) {
2394         updateTimeBuilder_ =
2395             new com.google.protobuf.SingleFieldBuilderV3<
2396                 com.google.protobuf.Timestamp,
2397                 com.google.protobuf.Timestamp.Builder,
2398                 com.google.protobuf.TimestampOrBuilder>(
2399                 getUpdateTime(), getParentForChildren(), isClean());
2400         updateTime_ = null;
2401       }
2402       return updateTimeBuilder_;
2403     }
2404 
2405     private com.google.protobuf.Timestamp revisionCreateTime_;
2406     private com.google.protobuf.SingleFieldBuilderV3<
2407             com.google.protobuf.Timestamp,
2408             com.google.protobuf.Timestamp.Builder,
2409             com.google.protobuf.TimestampOrBuilder>
2410         revisionCreateTimeBuilder_;
2411     /**
2412      *
2413      *
2414      * <pre>
2415      * Output only. The timestamp that the latest revision of the workflow
2416      * was created.
2417      * </pre>
2418      *
2419      * <code>
2420      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2421      * </code>
2422      *
2423      * @return Whether the revisionCreateTime field is set.
2424      */
hasRevisionCreateTime()2425     public boolean hasRevisionCreateTime() {
2426       return ((bitField0_ & 0x00000040) != 0);
2427     }
2428     /**
2429      *
2430      *
2431      * <pre>
2432      * Output only. The timestamp that the latest revision of the workflow
2433      * was created.
2434      * </pre>
2435      *
2436      * <code>
2437      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2438      * </code>
2439      *
2440      * @return The revisionCreateTime.
2441      */
getRevisionCreateTime()2442     public com.google.protobuf.Timestamp getRevisionCreateTime() {
2443       if (revisionCreateTimeBuilder_ == null) {
2444         return revisionCreateTime_ == null
2445             ? com.google.protobuf.Timestamp.getDefaultInstance()
2446             : revisionCreateTime_;
2447       } else {
2448         return revisionCreateTimeBuilder_.getMessage();
2449       }
2450     }
2451     /**
2452      *
2453      *
2454      * <pre>
2455      * Output only. The timestamp that the latest revision of the workflow
2456      * was created.
2457      * </pre>
2458      *
2459      * <code>
2460      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2461      * </code>
2462      */
setRevisionCreateTime(com.google.protobuf.Timestamp value)2463     public Builder setRevisionCreateTime(com.google.protobuf.Timestamp value) {
2464       if (revisionCreateTimeBuilder_ == null) {
2465         if (value == null) {
2466           throw new NullPointerException();
2467         }
2468         revisionCreateTime_ = value;
2469       } else {
2470         revisionCreateTimeBuilder_.setMessage(value);
2471       }
2472       bitField0_ |= 0x00000040;
2473       onChanged();
2474       return this;
2475     }
2476     /**
2477      *
2478      *
2479      * <pre>
2480      * Output only. The timestamp that the latest revision of the workflow
2481      * was created.
2482      * </pre>
2483      *
2484      * <code>
2485      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2486      * </code>
2487      */
setRevisionCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)2488     public Builder setRevisionCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
2489       if (revisionCreateTimeBuilder_ == null) {
2490         revisionCreateTime_ = builderForValue.build();
2491       } else {
2492         revisionCreateTimeBuilder_.setMessage(builderForValue.build());
2493       }
2494       bitField0_ |= 0x00000040;
2495       onChanged();
2496       return this;
2497     }
2498     /**
2499      *
2500      *
2501      * <pre>
2502      * Output only. The timestamp that the latest revision of the workflow
2503      * was created.
2504      * </pre>
2505      *
2506      * <code>
2507      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2508      * </code>
2509      */
mergeRevisionCreateTime(com.google.protobuf.Timestamp value)2510     public Builder mergeRevisionCreateTime(com.google.protobuf.Timestamp value) {
2511       if (revisionCreateTimeBuilder_ == null) {
2512         if (((bitField0_ & 0x00000040) != 0)
2513             && revisionCreateTime_ != null
2514             && revisionCreateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
2515           getRevisionCreateTimeBuilder().mergeFrom(value);
2516         } else {
2517           revisionCreateTime_ = value;
2518         }
2519       } else {
2520         revisionCreateTimeBuilder_.mergeFrom(value);
2521       }
2522       bitField0_ |= 0x00000040;
2523       onChanged();
2524       return this;
2525     }
2526     /**
2527      *
2528      *
2529      * <pre>
2530      * Output only. The timestamp that the latest revision of the workflow
2531      * was created.
2532      * </pre>
2533      *
2534      * <code>
2535      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2536      * </code>
2537      */
clearRevisionCreateTime()2538     public Builder clearRevisionCreateTime() {
2539       bitField0_ = (bitField0_ & ~0x00000040);
2540       revisionCreateTime_ = null;
2541       if (revisionCreateTimeBuilder_ != null) {
2542         revisionCreateTimeBuilder_.dispose();
2543         revisionCreateTimeBuilder_ = null;
2544       }
2545       onChanged();
2546       return this;
2547     }
2548     /**
2549      *
2550      *
2551      * <pre>
2552      * Output only. The timestamp that the latest revision of the workflow
2553      * was created.
2554      * </pre>
2555      *
2556      * <code>
2557      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2558      * </code>
2559      */
getRevisionCreateTimeBuilder()2560     public com.google.protobuf.Timestamp.Builder getRevisionCreateTimeBuilder() {
2561       bitField0_ |= 0x00000040;
2562       onChanged();
2563       return getRevisionCreateTimeFieldBuilder().getBuilder();
2564     }
2565     /**
2566      *
2567      *
2568      * <pre>
2569      * Output only. The timestamp that the latest revision of the workflow
2570      * was created.
2571      * </pre>
2572      *
2573      * <code>
2574      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2575      * </code>
2576      */
getRevisionCreateTimeOrBuilder()2577     public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() {
2578       if (revisionCreateTimeBuilder_ != null) {
2579         return revisionCreateTimeBuilder_.getMessageOrBuilder();
2580       } else {
2581         return revisionCreateTime_ == null
2582             ? com.google.protobuf.Timestamp.getDefaultInstance()
2583             : revisionCreateTime_;
2584       }
2585     }
2586     /**
2587      *
2588      *
2589      * <pre>
2590      * Output only. The timestamp that the latest revision of the workflow
2591      * was created.
2592      * </pre>
2593      *
2594      * <code>
2595      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2596      * </code>
2597      */
2598     private com.google.protobuf.SingleFieldBuilderV3<
2599             com.google.protobuf.Timestamp,
2600             com.google.protobuf.Timestamp.Builder,
2601             com.google.protobuf.TimestampOrBuilder>
getRevisionCreateTimeFieldBuilder()2602         getRevisionCreateTimeFieldBuilder() {
2603       if (revisionCreateTimeBuilder_ == null) {
2604         revisionCreateTimeBuilder_ =
2605             new com.google.protobuf.SingleFieldBuilderV3<
2606                 com.google.protobuf.Timestamp,
2607                 com.google.protobuf.Timestamp.Builder,
2608                 com.google.protobuf.TimestampOrBuilder>(
2609                 getRevisionCreateTime(), getParentForChildren(), isClean());
2610         revisionCreateTime_ = null;
2611       }
2612       return revisionCreateTimeBuilder_;
2613     }
2614 
2615     private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;
2616 
internalGetLabels()2617     private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
2618       if (labels_ == null) {
2619         return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
2620       }
2621       return labels_;
2622     }
2623 
2624     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableLabels()2625         internalGetMutableLabels() {
2626       if (labels_ == null) {
2627         labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
2628       }
2629       if (!labels_.isMutable()) {
2630         labels_ = labels_.copy();
2631       }
2632       bitField0_ |= 0x00000080;
2633       onChanged();
2634       return labels_;
2635     }
2636 
getLabelsCount()2637     public int getLabelsCount() {
2638       return internalGetLabels().getMap().size();
2639     }
2640     /**
2641      *
2642      *
2643      * <pre>
2644      * Labels associated with this workflow.
2645      * Labels can contain at most 64 entries. Keys and values can be no longer
2646      * than 63 characters and can only contain lowercase letters, numeric
2647      * characters, underscores and dashes. Label keys must start with a letter.
2648      * International characters are allowed.
2649      * </pre>
2650      *
2651      * <code>map&lt;string, string&gt; labels = 8;</code>
2652      */
2653     @java.lang.Override
containsLabels(java.lang.String key)2654     public boolean containsLabels(java.lang.String key) {
2655       if (key == null) {
2656         throw new NullPointerException("map key");
2657       }
2658       return internalGetLabels().getMap().containsKey(key);
2659     }
2660     /** Use {@link #getLabelsMap()} instead. */
2661     @java.lang.Override
2662     @java.lang.Deprecated
getLabels()2663     public java.util.Map<java.lang.String, java.lang.String> getLabels() {
2664       return getLabelsMap();
2665     }
2666     /**
2667      *
2668      *
2669      * <pre>
2670      * Labels associated with this workflow.
2671      * Labels can contain at most 64 entries. Keys and values can be no longer
2672      * than 63 characters and can only contain lowercase letters, numeric
2673      * characters, underscores and dashes. Label keys must start with a letter.
2674      * International characters are allowed.
2675      * </pre>
2676      *
2677      * <code>map&lt;string, string&gt; labels = 8;</code>
2678      */
2679     @java.lang.Override
getLabelsMap()2680     public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
2681       return internalGetLabels().getMap();
2682     }
2683     /**
2684      *
2685      *
2686      * <pre>
2687      * Labels associated with this workflow.
2688      * Labels can contain at most 64 entries. Keys and values can be no longer
2689      * than 63 characters and can only contain lowercase letters, numeric
2690      * characters, underscores and dashes. Label keys must start with a letter.
2691      * International characters are allowed.
2692      * </pre>
2693      *
2694      * <code>map&lt;string, string&gt; labels = 8;</code>
2695      */
2696     @java.lang.Override
getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)2697     public /* nullable */ java.lang.String getLabelsOrDefault(
2698         java.lang.String key,
2699         /* nullable */
2700         java.lang.String defaultValue) {
2701       if (key == null) {
2702         throw new NullPointerException("map key");
2703       }
2704       java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
2705       return map.containsKey(key) ? map.get(key) : defaultValue;
2706     }
2707     /**
2708      *
2709      *
2710      * <pre>
2711      * Labels associated with this workflow.
2712      * Labels can contain at most 64 entries. Keys and values can be no longer
2713      * than 63 characters and can only contain lowercase letters, numeric
2714      * characters, underscores and dashes. Label keys must start with a letter.
2715      * International characters are allowed.
2716      * </pre>
2717      *
2718      * <code>map&lt;string, string&gt; labels = 8;</code>
2719      */
2720     @java.lang.Override
getLabelsOrThrow(java.lang.String key)2721     public java.lang.String getLabelsOrThrow(java.lang.String key) {
2722       if (key == null) {
2723         throw new NullPointerException("map key");
2724       }
2725       java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
2726       if (!map.containsKey(key)) {
2727         throw new java.lang.IllegalArgumentException();
2728       }
2729       return map.get(key);
2730     }
2731 
clearLabels()2732     public Builder clearLabels() {
2733       bitField0_ = (bitField0_ & ~0x00000080);
2734       internalGetMutableLabels().getMutableMap().clear();
2735       return this;
2736     }
2737     /**
2738      *
2739      *
2740      * <pre>
2741      * Labels associated with this workflow.
2742      * Labels can contain at most 64 entries. Keys and values can be no longer
2743      * than 63 characters and can only contain lowercase letters, numeric
2744      * characters, underscores and dashes. Label keys must start with a letter.
2745      * International characters are allowed.
2746      * </pre>
2747      *
2748      * <code>map&lt;string, string&gt; labels = 8;</code>
2749      */
removeLabels(java.lang.String key)2750     public Builder removeLabels(java.lang.String key) {
2751       if (key == null) {
2752         throw new NullPointerException("map key");
2753       }
2754       internalGetMutableLabels().getMutableMap().remove(key);
2755       return this;
2756     }
2757     /** Use alternate mutation accessors instead. */
2758     @java.lang.Deprecated
getMutableLabels()2759     public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() {
2760       bitField0_ |= 0x00000080;
2761       return internalGetMutableLabels().getMutableMap();
2762     }
2763     /**
2764      *
2765      *
2766      * <pre>
2767      * Labels associated with this workflow.
2768      * Labels can contain at most 64 entries. Keys and values can be no longer
2769      * than 63 characters and can only contain lowercase letters, numeric
2770      * characters, underscores and dashes. Label keys must start with a letter.
2771      * International characters are allowed.
2772      * </pre>
2773      *
2774      * <code>map&lt;string, string&gt; labels = 8;</code>
2775      */
putLabels(java.lang.String key, java.lang.String value)2776     public Builder putLabels(java.lang.String key, java.lang.String value) {
2777       if (key == null) {
2778         throw new NullPointerException("map key");
2779       }
2780       if (value == null) {
2781         throw new NullPointerException("map value");
2782       }
2783       internalGetMutableLabels().getMutableMap().put(key, value);
2784       bitField0_ |= 0x00000080;
2785       return this;
2786     }
2787     /**
2788      *
2789      *
2790      * <pre>
2791      * Labels associated with this workflow.
2792      * Labels can contain at most 64 entries. Keys and values can be no longer
2793      * than 63 characters and can only contain lowercase letters, numeric
2794      * characters, underscores and dashes. Label keys must start with a letter.
2795      * International characters are allowed.
2796      * </pre>
2797      *
2798      * <code>map&lt;string, string&gt; labels = 8;</code>
2799      */
putAllLabels(java.util.Map<java.lang.String, java.lang.String> values)2800     public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) {
2801       internalGetMutableLabels().getMutableMap().putAll(values);
2802       bitField0_ |= 0x00000080;
2803       return this;
2804     }
2805 
2806     private java.lang.Object serviceAccount_ = "";
2807     /**
2808      *
2809      *
2810      * <pre>
2811      * The service account associated with the latest workflow version.
2812      * This service account represents the identity of the workflow and determines
2813      * what permissions the workflow has.
2814      * Format: projects/{project}/serviceAccounts/{account} or {account}
2815      * Using `-` as a wildcard for the `{project}` or not providing one at all
2816      * will infer the project from the account. The `{account}` value can be the
2817      * `email` address or the `unique_id` of the service account.
2818      * If not provided, workflow will use the project's default service account.
2819      * Modifying this field for an existing workflow results in a new workflow
2820      * revision.
2821      * </pre>
2822      *
2823      * <code>string service_account = 9;</code>
2824      *
2825      * @return The serviceAccount.
2826      */
getServiceAccount()2827     public java.lang.String getServiceAccount() {
2828       java.lang.Object ref = serviceAccount_;
2829       if (!(ref instanceof java.lang.String)) {
2830         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2831         java.lang.String s = bs.toStringUtf8();
2832         serviceAccount_ = s;
2833         return s;
2834       } else {
2835         return (java.lang.String) ref;
2836       }
2837     }
2838     /**
2839      *
2840      *
2841      * <pre>
2842      * The service account associated with the latest workflow version.
2843      * This service account represents the identity of the workflow and determines
2844      * what permissions the workflow has.
2845      * Format: projects/{project}/serviceAccounts/{account} or {account}
2846      * Using `-` as a wildcard for the `{project}` or not providing one at all
2847      * will infer the project from the account. The `{account}` value can be the
2848      * `email` address or the `unique_id` of the service account.
2849      * If not provided, workflow will use the project's default service account.
2850      * Modifying this field for an existing workflow results in a new workflow
2851      * revision.
2852      * </pre>
2853      *
2854      * <code>string service_account = 9;</code>
2855      *
2856      * @return The bytes for serviceAccount.
2857      */
getServiceAccountBytes()2858     public com.google.protobuf.ByteString getServiceAccountBytes() {
2859       java.lang.Object ref = serviceAccount_;
2860       if (ref instanceof String) {
2861         com.google.protobuf.ByteString b =
2862             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2863         serviceAccount_ = b;
2864         return b;
2865       } else {
2866         return (com.google.protobuf.ByteString) ref;
2867       }
2868     }
2869     /**
2870      *
2871      *
2872      * <pre>
2873      * The service account associated with the latest workflow version.
2874      * This service account represents the identity of the workflow and determines
2875      * what permissions the workflow has.
2876      * Format: projects/{project}/serviceAccounts/{account} or {account}
2877      * Using `-` as a wildcard for the `{project}` or not providing one at all
2878      * will infer the project from the account. The `{account}` value can be the
2879      * `email` address or the `unique_id` of the service account.
2880      * If not provided, workflow will use the project's default service account.
2881      * Modifying this field for an existing workflow results in a new workflow
2882      * revision.
2883      * </pre>
2884      *
2885      * <code>string service_account = 9;</code>
2886      *
2887      * @param value The serviceAccount to set.
2888      * @return This builder for chaining.
2889      */
setServiceAccount(java.lang.String value)2890     public Builder setServiceAccount(java.lang.String value) {
2891       if (value == null) {
2892         throw new NullPointerException();
2893       }
2894       serviceAccount_ = value;
2895       bitField0_ |= 0x00000100;
2896       onChanged();
2897       return this;
2898     }
2899     /**
2900      *
2901      *
2902      * <pre>
2903      * The service account associated with the latest workflow version.
2904      * This service account represents the identity of the workflow and determines
2905      * what permissions the workflow has.
2906      * Format: projects/{project}/serviceAccounts/{account} or {account}
2907      * Using `-` as a wildcard for the `{project}` or not providing one at all
2908      * will infer the project from the account. The `{account}` value can be the
2909      * `email` address or the `unique_id` of the service account.
2910      * If not provided, workflow will use the project's default service account.
2911      * Modifying this field for an existing workflow results in a new workflow
2912      * revision.
2913      * </pre>
2914      *
2915      * <code>string service_account = 9;</code>
2916      *
2917      * @return This builder for chaining.
2918      */
clearServiceAccount()2919     public Builder clearServiceAccount() {
2920       serviceAccount_ = getDefaultInstance().getServiceAccount();
2921       bitField0_ = (bitField0_ & ~0x00000100);
2922       onChanged();
2923       return this;
2924     }
2925     /**
2926      *
2927      *
2928      * <pre>
2929      * The service account associated with the latest workflow version.
2930      * This service account represents the identity of the workflow and determines
2931      * what permissions the workflow has.
2932      * Format: projects/{project}/serviceAccounts/{account} or {account}
2933      * Using `-` as a wildcard for the `{project}` or not providing one at all
2934      * will infer the project from the account. The `{account}` value can be the
2935      * `email` address or the `unique_id` of the service account.
2936      * If not provided, workflow will use the project's default service account.
2937      * Modifying this field for an existing workflow results in a new workflow
2938      * revision.
2939      * </pre>
2940      *
2941      * <code>string service_account = 9;</code>
2942      *
2943      * @param value The bytes for serviceAccount to set.
2944      * @return This builder for chaining.
2945      */
setServiceAccountBytes(com.google.protobuf.ByteString value)2946     public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) {
2947       if (value == null) {
2948         throw new NullPointerException();
2949       }
2950       checkByteStringIsUtf8(value);
2951       serviceAccount_ = value;
2952       bitField0_ |= 0x00000100;
2953       onChanged();
2954       return this;
2955     }
2956 
2957     /**
2958      *
2959      *
2960      * <pre>
2961      * Workflow code to be executed. The size limit is 128KB.
2962      * </pre>
2963      *
2964      * <code>string source_contents = 10;</code>
2965      *
2966      * @return Whether the sourceContents field is set.
2967      */
2968     @java.lang.Override
hasSourceContents()2969     public boolean hasSourceContents() {
2970       return sourceCodeCase_ == 10;
2971     }
2972     /**
2973      *
2974      *
2975      * <pre>
2976      * Workflow code to be executed. The size limit is 128KB.
2977      * </pre>
2978      *
2979      * <code>string source_contents = 10;</code>
2980      *
2981      * @return The sourceContents.
2982      */
2983     @java.lang.Override
getSourceContents()2984     public java.lang.String getSourceContents() {
2985       java.lang.Object ref = "";
2986       if (sourceCodeCase_ == 10) {
2987         ref = sourceCode_;
2988       }
2989       if (!(ref instanceof java.lang.String)) {
2990         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2991         java.lang.String s = bs.toStringUtf8();
2992         if (sourceCodeCase_ == 10) {
2993           sourceCode_ = s;
2994         }
2995         return s;
2996       } else {
2997         return (java.lang.String) ref;
2998       }
2999     }
3000     /**
3001      *
3002      *
3003      * <pre>
3004      * Workflow code to be executed. The size limit is 128KB.
3005      * </pre>
3006      *
3007      * <code>string source_contents = 10;</code>
3008      *
3009      * @return The bytes for sourceContents.
3010      */
3011     @java.lang.Override
getSourceContentsBytes()3012     public com.google.protobuf.ByteString getSourceContentsBytes() {
3013       java.lang.Object ref = "";
3014       if (sourceCodeCase_ == 10) {
3015         ref = sourceCode_;
3016       }
3017       if (ref instanceof String) {
3018         com.google.protobuf.ByteString b =
3019             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3020         if (sourceCodeCase_ == 10) {
3021           sourceCode_ = b;
3022         }
3023         return b;
3024       } else {
3025         return (com.google.protobuf.ByteString) ref;
3026       }
3027     }
3028     /**
3029      *
3030      *
3031      * <pre>
3032      * Workflow code to be executed. The size limit is 128KB.
3033      * </pre>
3034      *
3035      * <code>string source_contents = 10;</code>
3036      *
3037      * @param value The sourceContents to set.
3038      * @return This builder for chaining.
3039      */
setSourceContents(java.lang.String value)3040     public Builder setSourceContents(java.lang.String value) {
3041       if (value == null) {
3042         throw new NullPointerException();
3043       }
3044       sourceCodeCase_ = 10;
3045       sourceCode_ = value;
3046       onChanged();
3047       return this;
3048     }
3049     /**
3050      *
3051      *
3052      * <pre>
3053      * Workflow code to be executed. The size limit is 128KB.
3054      * </pre>
3055      *
3056      * <code>string source_contents = 10;</code>
3057      *
3058      * @return This builder for chaining.
3059      */
clearSourceContents()3060     public Builder clearSourceContents() {
3061       if (sourceCodeCase_ == 10) {
3062         sourceCodeCase_ = 0;
3063         sourceCode_ = null;
3064         onChanged();
3065       }
3066       return this;
3067     }
3068     /**
3069      *
3070      *
3071      * <pre>
3072      * Workflow code to be executed. The size limit is 128KB.
3073      * </pre>
3074      *
3075      * <code>string source_contents = 10;</code>
3076      *
3077      * @param value The bytes for sourceContents to set.
3078      * @return This builder for chaining.
3079      */
setSourceContentsBytes(com.google.protobuf.ByteString value)3080     public Builder setSourceContentsBytes(com.google.protobuf.ByteString value) {
3081       if (value == null) {
3082         throw new NullPointerException();
3083       }
3084       checkByteStringIsUtf8(value);
3085       sourceCodeCase_ = 10;
3086       sourceCode_ = value;
3087       onChanged();
3088       return this;
3089     }
3090 
3091     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3092     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
3093       return super.setUnknownFields(unknownFields);
3094     }
3095 
3096     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3097     public final Builder mergeUnknownFields(
3098         final com.google.protobuf.UnknownFieldSet unknownFields) {
3099       return super.mergeUnknownFields(unknownFields);
3100     }
3101 
3102     // @@protoc_insertion_point(builder_scope:google.cloud.workflows.v1.Workflow)
3103   }
3104 
3105   // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1.Workflow)
3106   private static final com.google.cloud.workflows.v1.Workflow DEFAULT_INSTANCE;
3107 
3108   static {
3109     DEFAULT_INSTANCE = new com.google.cloud.workflows.v1.Workflow();
3110   }
3111 
getDefaultInstance()3112   public static com.google.cloud.workflows.v1.Workflow getDefaultInstance() {
3113     return DEFAULT_INSTANCE;
3114   }
3115 
3116   private static final com.google.protobuf.Parser<Workflow> PARSER =
3117       new com.google.protobuf.AbstractParser<Workflow>() {
3118         @java.lang.Override
3119         public Workflow parsePartialFrom(
3120             com.google.protobuf.CodedInputStream input,
3121             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3122             throws com.google.protobuf.InvalidProtocolBufferException {
3123           Builder builder = newBuilder();
3124           try {
3125             builder.mergeFrom(input, extensionRegistry);
3126           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3127             throw e.setUnfinishedMessage(builder.buildPartial());
3128           } catch (com.google.protobuf.UninitializedMessageException e) {
3129             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
3130           } catch (java.io.IOException e) {
3131             throw new com.google.protobuf.InvalidProtocolBufferException(e)
3132                 .setUnfinishedMessage(builder.buildPartial());
3133           }
3134           return builder.buildPartial();
3135         }
3136       };
3137 
parser()3138   public static com.google.protobuf.Parser<Workflow> parser() {
3139     return PARSER;
3140   }
3141 
3142   @java.lang.Override
getParserForType()3143   public com.google.protobuf.Parser<Workflow> getParserForType() {
3144     return PARSER;
3145   }
3146 
3147   @java.lang.Override
getDefaultInstanceForType()3148   public com.google.cloud.workflows.v1.Workflow getDefaultInstanceForType() {
3149     return DEFAULT_INSTANCE;
3150   }
3151 }
3152