• 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/v1beta/workflows.proto
18 
19 package com.google.cloud.workflows.v1beta;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Workflow program to be executed by Workflows.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.workflows.v1beta.Workflow}
29  */
30 public final class Workflow extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1beta.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.v1beta.WorkflowsProto
61         .internal_static_google_cloud_workflows_v1beta_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.v1beta.WorkflowsProto
79         .internal_static_google_cloud_workflows_v1beta_Workflow_fieldAccessorTable
80         .ensureFieldAccessorsInitialized(
81             com.google.cloud.workflows.v1beta.Workflow.class,
82             com.google.cloud.workflows.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.Workflow.State getState() {
405     com.google.cloud.workflows.v1beta.Workflow.State result =
406         com.google.cloud.workflows.v1beta.Workflow.State.forNumber(state_);
407     return result == null ? com.google.cloud.workflows.v1beta.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 fields of a workflow:
421    * - `source_code`
422    * - `service_account`
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 fields of a workflow:
451    * - `source_code`
452    * - `service_account`
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.v1beta.WorkflowsProto
638                 .internal_static_google_cloud_workflows_v1beta_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    * Name of 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}
762    * Using `-` as a wildcard for the `{project}` will infer the project from
763    * the account. The `{account}` value can be the `email` address or the
764    * `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    * Name of 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}
794    * Using `-` as a wildcard for the `{project}` will infer the project from
795    * the account. The `{account}` value can be the `email` address or the
796    * `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 32KB.
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 32KB.
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 32KB.
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.v1beta.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.v1beta.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.v1beta.Workflow)) {
989       return super.equals(obj);
990     }
991     com.google.cloud.workflows.v1beta.Workflow other =
992         (com.google.cloud.workflows.v1beta.Workflow) obj;
993 
994     if (!getName().equals(other.getName())) return false;
995     if (!getDescription().equals(other.getDescription())) return false;
996     if (state_ != other.state_) return false;
997     if (!getRevisionId().equals(other.getRevisionId())) return false;
998     if (hasCreateTime() != other.hasCreateTime()) return false;
999     if (hasCreateTime()) {
1000       if (!getCreateTime().equals(other.getCreateTime())) return false;
1001     }
1002     if (hasUpdateTime() != other.hasUpdateTime()) return false;
1003     if (hasUpdateTime()) {
1004       if (!getUpdateTime().equals(other.getUpdateTime())) return false;
1005     }
1006     if (hasRevisionCreateTime() != other.hasRevisionCreateTime()) return false;
1007     if (hasRevisionCreateTime()) {
1008       if (!getRevisionCreateTime().equals(other.getRevisionCreateTime())) return false;
1009     }
1010     if (!internalGetLabels().equals(other.internalGetLabels())) return false;
1011     if (!getServiceAccount().equals(other.getServiceAccount())) return false;
1012     if (!getSourceCodeCase().equals(other.getSourceCodeCase())) return false;
1013     switch (sourceCodeCase_) {
1014       case 10:
1015         if (!getSourceContents().equals(other.getSourceContents())) return false;
1016         break;
1017       case 0:
1018       default:
1019     }
1020     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1021     return true;
1022   }
1023 
1024   @java.lang.Override
hashCode()1025   public int hashCode() {
1026     if (memoizedHashCode != 0) {
1027       return memoizedHashCode;
1028     }
1029     int hash = 41;
1030     hash = (19 * hash) + getDescriptor().hashCode();
1031     hash = (37 * hash) + NAME_FIELD_NUMBER;
1032     hash = (53 * hash) + getName().hashCode();
1033     hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
1034     hash = (53 * hash) + getDescription().hashCode();
1035     hash = (37 * hash) + STATE_FIELD_NUMBER;
1036     hash = (53 * hash) + state_;
1037     hash = (37 * hash) + REVISION_ID_FIELD_NUMBER;
1038     hash = (53 * hash) + getRevisionId().hashCode();
1039     if (hasCreateTime()) {
1040       hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
1041       hash = (53 * hash) + getCreateTime().hashCode();
1042     }
1043     if (hasUpdateTime()) {
1044       hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
1045       hash = (53 * hash) + getUpdateTime().hashCode();
1046     }
1047     if (hasRevisionCreateTime()) {
1048       hash = (37 * hash) + REVISION_CREATE_TIME_FIELD_NUMBER;
1049       hash = (53 * hash) + getRevisionCreateTime().hashCode();
1050     }
1051     if (!internalGetLabels().getMap().isEmpty()) {
1052       hash = (37 * hash) + LABELS_FIELD_NUMBER;
1053       hash = (53 * hash) + internalGetLabels().hashCode();
1054     }
1055     hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER;
1056     hash = (53 * hash) + getServiceAccount().hashCode();
1057     switch (sourceCodeCase_) {
1058       case 10:
1059         hash = (37 * hash) + SOURCE_CONTENTS_FIELD_NUMBER;
1060         hash = (53 * hash) + getSourceContents().hashCode();
1061         break;
1062       case 0:
1063       default:
1064     }
1065     hash = (29 * hash) + getUnknownFields().hashCode();
1066     memoizedHashCode = hash;
1067     return hash;
1068   }
1069 
parseFrom(java.nio.ByteBuffer data)1070   public static com.google.cloud.workflows.v1beta.Workflow parseFrom(java.nio.ByteBuffer data)
1071       throws com.google.protobuf.InvalidProtocolBufferException {
1072     return PARSER.parseFrom(data);
1073   }
1074 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1075   public static com.google.cloud.workflows.v1beta.Workflow parseFrom(
1076       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1077       throws com.google.protobuf.InvalidProtocolBufferException {
1078     return PARSER.parseFrom(data, extensionRegistry);
1079   }
1080 
parseFrom( com.google.protobuf.ByteString data)1081   public static com.google.cloud.workflows.v1beta.Workflow parseFrom(
1082       com.google.protobuf.ByteString data)
1083       throws com.google.protobuf.InvalidProtocolBufferException {
1084     return PARSER.parseFrom(data);
1085   }
1086 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1087   public static com.google.cloud.workflows.v1beta.Workflow parseFrom(
1088       com.google.protobuf.ByteString data,
1089       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1090       throws com.google.protobuf.InvalidProtocolBufferException {
1091     return PARSER.parseFrom(data, extensionRegistry);
1092   }
1093 
parseFrom(byte[] data)1094   public static com.google.cloud.workflows.v1beta.Workflow parseFrom(byte[] data)
1095       throws com.google.protobuf.InvalidProtocolBufferException {
1096     return PARSER.parseFrom(data);
1097   }
1098 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1099   public static com.google.cloud.workflows.v1beta.Workflow parseFrom(
1100       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1101       throws com.google.protobuf.InvalidProtocolBufferException {
1102     return PARSER.parseFrom(data, extensionRegistry);
1103   }
1104 
parseFrom(java.io.InputStream input)1105   public static com.google.cloud.workflows.v1beta.Workflow parseFrom(java.io.InputStream input)
1106       throws java.io.IOException {
1107     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1108   }
1109 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1110   public static com.google.cloud.workflows.v1beta.Workflow parseFrom(
1111       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1112       throws java.io.IOException {
1113     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1114         PARSER, input, extensionRegistry);
1115   }
1116 
parseDelimitedFrom( java.io.InputStream input)1117   public static com.google.cloud.workflows.v1beta.Workflow parseDelimitedFrom(
1118       java.io.InputStream input) throws java.io.IOException {
1119     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1120   }
1121 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1122   public static com.google.cloud.workflows.v1beta.Workflow parseDelimitedFrom(
1123       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1124       throws java.io.IOException {
1125     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1126         PARSER, input, extensionRegistry);
1127   }
1128 
parseFrom( com.google.protobuf.CodedInputStream input)1129   public static com.google.cloud.workflows.v1beta.Workflow parseFrom(
1130       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1131     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1132   }
1133 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1134   public static com.google.cloud.workflows.v1beta.Workflow parseFrom(
1135       com.google.protobuf.CodedInputStream input,
1136       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1137       throws java.io.IOException {
1138     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1139         PARSER, input, extensionRegistry);
1140   }
1141 
1142   @java.lang.Override
newBuilderForType()1143   public Builder newBuilderForType() {
1144     return newBuilder();
1145   }
1146 
newBuilder()1147   public static Builder newBuilder() {
1148     return DEFAULT_INSTANCE.toBuilder();
1149   }
1150 
newBuilder(com.google.cloud.workflows.v1beta.Workflow prototype)1151   public static Builder newBuilder(com.google.cloud.workflows.v1beta.Workflow prototype) {
1152     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1153   }
1154 
1155   @java.lang.Override
toBuilder()1156   public Builder toBuilder() {
1157     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1158   }
1159 
1160   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1161   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1162     Builder builder = new Builder(parent);
1163     return builder;
1164   }
1165   /**
1166    *
1167    *
1168    * <pre>
1169    * Workflow program to be executed by Workflows.
1170    * </pre>
1171    *
1172    * Protobuf type {@code google.cloud.workflows.v1beta.Workflow}
1173    */
1174   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1175       implements
1176       // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1beta.Workflow)
1177       com.google.cloud.workflows.v1beta.WorkflowOrBuilder {
getDescriptor()1178     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1179       return com.google.cloud.workflows.v1beta.WorkflowsProto
1180           .internal_static_google_cloud_workflows_v1beta_Workflow_descriptor;
1181     }
1182 
1183     @SuppressWarnings({"rawtypes"})
internalGetMapField(int number)1184     protected com.google.protobuf.MapField internalGetMapField(int number) {
1185       switch (number) {
1186         case 8:
1187           return internalGetLabels();
1188         default:
1189           throw new RuntimeException("Invalid map field number: " + number);
1190       }
1191     }
1192 
1193     @SuppressWarnings({"rawtypes"})
internalGetMutableMapField(int number)1194     protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
1195       switch (number) {
1196         case 8:
1197           return internalGetMutableLabels();
1198         default:
1199           throw new RuntimeException("Invalid map field number: " + number);
1200       }
1201     }
1202 
1203     @java.lang.Override
1204     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1205         internalGetFieldAccessorTable() {
1206       return com.google.cloud.workflows.v1beta.WorkflowsProto
1207           .internal_static_google_cloud_workflows_v1beta_Workflow_fieldAccessorTable
1208           .ensureFieldAccessorsInitialized(
1209               com.google.cloud.workflows.v1beta.Workflow.class,
1210               com.google.cloud.workflows.v1beta.Workflow.Builder.class);
1211     }
1212 
1213     // Construct using com.google.cloud.workflows.v1beta.Workflow.newBuilder()
Builder()1214     private Builder() {}
1215 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1216     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1217       super(parent);
1218     }
1219 
1220     @java.lang.Override
clear()1221     public Builder clear() {
1222       super.clear();
1223       bitField0_ = 0;
1224       name_ = "";
1225       description_ = "";
1226       state_ = 0;
1227       revisionId_ = "";
1228       createTime_ = null;
1229       if (createTimeBuilder_ != null) {
1230         createTimeBuilder_.dispose();
1231         createTimeBuilder_ = null;
1232       }
1233       updateTime_ = null;
1234       if (updateTimeBuilder_ != null) {
1235         updateTimeBuilder_.dispose();
1236         updateTimeBuilder_ = null;
1237       }
1238       revisionCreateTime_ = null;
1239       if (revisionCreateTimeBuilder_ != null) {
1240         revisionCreateTimeBuilder_.dispose();
1241         revisionCreateTimeBuilder_ = null;
1242       }
1243       internalGetMutableLabels().clear();
1244       serviceAccount_ = "";
1245       sourceCodeCase_ = 0;
1246       sourceCode_ = null;
1247       return this;
1248     }
1249 
1250     @java.lang.Override
getDescriptorForType()1251     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1252       return com.google.cloud.workflows.v1beta.WorkflowsProto
1253           .internal_static_google_cloud_workflows_v1beta_Workflow_descriptor;
1254     }
1255 
1256     @java.lang.Override
getDefaultInstanceForType()1257     public com.google.cloud.workflows.v1beta.Workflow getDefaultInstanceForType() {
1258       return com.google.cloud.workflows.v1beta.Workflow.getDefaultInstance();
1259     }
1260 
1261     @java.lang.Override
build()1262     public com.google.cloud.workflows.v1beta.Workflow build() {
1263       com.google.cloud.workflows.v1beta.Workflow result = buildPartial();
1264       if (!result.isInitialized()) {
1265         throw newUninitializedMessageException(result);
1266       }
1267       return result;
1268     }
1269 
1270     @java.lang.Override
buildPartial()1271     public com.google.cloud.workflows.v1beta.Workflow buildPartial() {
1272       com.google.cloud.workflows.v1beta.Workflow result =
1273           new com.google.cloud.workflows.v1beta.Workflow(this);
1274       if (bitField0_ != 0) {
1275         buildPartial0(result);
1276       }
1277       buildPartialOneofs(result);
1278       onBuilt();
1279       return result;
1280     }
1281 
buildPartial0(com.google.cloud.workflows.v1beta.Workflow result)1282     private void buildPartial0(com.google.cloud.workflows.v1beta.Workflow result) {
1283       int from_bitField0_ = bitField0_;
1284       if (((from_bitField0_ & 0x00000001) != 0)) {
1285         result.name_ = name_;
1286       }
1287       if (((from_bitField0_ & 0x00000002) != 0)) {
1288         result.description_ = description_;
1289       }
1290       if (((from_bitField0_ & 0x00000004) != 0)) {
1291         result.state_ = state_;
1292       }
1293       if (((from_bitField0_ & 0x00000008) != 0)) {
1294         result.revisionId_ = revisionId_;
1295       }
1296       if (((from_bitField0_ & 0x00000010) != 0)) {
1297         result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
1298       }
1299       if (((from_bitField0_ & 0x00000020) != 0)) {
1300         result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
1301       }
1302       if (((from_bitField0_ & 0x00000040) != 0)) {
1303         result.revisionCreateTime_ =
1304             revisionCreateTimeBuilder_ == null
1305                 ? revisionCreateTime_
1306                 : revisionCreateTimeBuilder_.build();
1307       }
1308       if (((from_bitField0_ & 0x00000080) != 0)) {
1309         result.labels_ = internalGetLabels();
1310         result.labels_.makeImmutable();
1311       }
1312       if (((from_bitField0_ & 0x00000100) != 0)) {
1313         result.serviceAccount_ = serviceAccount_;
1314       }
1315     }
1316 
buildPartialOneofs(com.google.cloud.workflows.v1beta.Workflow result)1317     private void buildPartialOneofs(com.google.cloud.workflows.v1beta.Workflow result) {
1318       result.sourceCodeCase_ = sourceCodeCase_;
1319       result.sourceCode_ = this.sourceCode_;
1320     }
1321 
1322     @java.lang.Override
clone()1323     public Builder clone() {
1324       return super.clone();
1325     }
1326 
1327     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1328     public Builder setField(
1329         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1330       return super.setField(field, value);
1331     }
1332 
1333     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1334     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1335       return super.clearField(field);
1336     }
1337 
1338     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1339     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1340       return super.clearOneof(oneof);
1341     }
1342 
1343     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1344     public Builder setRepeatedField(
1345         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1346       return super.setRepeatedField(field, index, value);
1347     }
1348 
1349     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1350     public Builder addRepeatedField(
1351         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1352       return super.addRepeatedField(field, value);
1353     }
1354 
1355     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1356     public Builder mergeFrom(com.google.protobuf.Message other) {
1357       if (other instanceof com.google.cloud.workflows.v1beta.Workflow) {
1358         return mergeFrom((com.google.cloud.workflows.v1beta.Workflow) other);
1359       } else {
1360         super.mergeFrom(other);
1361         return this;
1362       }
1363     }
1364 
mergeFrom(com.google.cloud.workflows.v1beta.Workflow other)1365     public Builder mergeFrom(com.google.cloud.workflows.v1beta.Workflow other) {
1366       if (other == com.google.cloud.workflows.v1beta.Workflow.getDefaultInstance()) return this;
1367       if (!other.getName().isEmpty()) {
1368         name_ = other.name_;
1369         bitField0_ |= 0x00000001;
1370         onChanged();
1371       }
1372       if (!other.getDescription().isEmpty()) {
1373         description_ = other.description_;
1374         bitField0_ |= 0x00000002;
1375         onChanged();
1376       }
1377       if (other.state_ != 0) {
1378         setStateValue(other.getStateValue());
1379       }
1380       if (!other.getRevisionId().isEmpty()) {
1381         revisionId_ = other.revisionId_;
1382         bitField0_ |= 0x00000008;
1383         onChanged();
1384       }
1385       if (other.hasCreateTime()) {
1386         mergeCreateTime(other.getCreateTime());
1387       }
1388       if (other.hasUpdateTime()) {
1389         mergeUpdateTime(other.getUpdateTime());
1390       }
1391       if (other.hasRevisionCreateTime()) {
1392         mergeRevisionCreateTime(other.getRevisionCreateTime());
1393       }
1394       internalGetMutableLabels().mergeFrom(other.internalGetLabels());
1395       bitField0_ |= 0x00000080;
1396       if (!other.getServiceAccount().isEmpty()) {
1397         serviceAccount_ = other.serviceAccount_;
1398         bitField0_ |= 0x00000100;
1399         onChanged();
1400       }
1401       switch (other.getSourceCodeCase()) {
1402         case SOURCE_CONTENTS:
1403           {
1404             sourceCodeCase_ = 10;
1405             sourceCode_ = other.sourceCode_;
1406             onChanged();
1407             break;
1408           }
1409         case SOURCECODE_NOT_SET:
1410           {
1411             break;
1412           }
1413       }
1414       this.mergeUnknownFields(other.getUnknownFields());
1415       onChanged();
1416       return this;
1417     }
1418 
1419     @java.lang.Override
isInitialized()1420     public final boolean isInitialized() {
1421       return true;
1422     }
1423 
1424     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1425     public Builder mergeFrom(
1426         com.google.protobuf.CodedInputStream input,
1427         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1428         throws java.io.IOException {
1429       if (extensionRegistry == null) {
1430         throw new java.lang.NullPointerException();
1431       }
1432       try {
1433         boolean done = false;
1434         while (!done) {
1435           int tag = input.readTag();
1436           switch (tag) {
1437             case 0:
1438               done = true;
1439               break;
1440             case 10:
1441               {
1442                 name_ = input.readStringRequireUtf8();
1443                 bitField0_ |= 0x00000001;
1444                 break;
1445               } // case 10
1446             case 18:
1447               {
1448                 description_ = input.readStringRequireUtf8();
1449                 bitField0_ |= 0x00000002;
1450                 break;
1451               } // case 18
1452             case 24:
1453               {
1454                 state_ = input.readEnum();
1455                 bitField0_ |= 0x00000004;
1456                 break;
1457               } // case 24
1458             case 34:
1459               {
1460                 revisionId_ = input.readStringRequireUtf8();
1461                 bitField0_ |= 0x00000008;
1462                 break;
1463               } // case 34
1464             case 42:
1465               {
1466                 input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
1467                 bitField0_ |= 0x00000010;
1468                 break;
1469               } // case 42
1470             case 50:
1471               {
1472                 input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
1473                 bitField0_ |= 0x00000020;
1474                 break;
1475               } // case 50
1476             case 58:
1477               {
1478                 input.readMessage(
1479                     getRevisionCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
1480                 bitField0_ |= 0x00000040;
1481                 break;
1482               } // case 58
1483             case 66:
1484               {
1485                 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
1486                     input.readMessage(
1487                         LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
1488                         extensionRegistry);
1489                 internalGetMutableLabels()
1490                     .getMutableMap()
1491                     .put(labels__.getKey(), labels__.getValue());
1492                 bitField0_ |= 0x00000080;
1493                 break;
1494               } // case 66
1495             case 74:
1496               {
1497                 serviceAccount_ = input.readStringRequireUtf8();
1498                 bitField0_ |= 0x00000100;
1499                 break;
1500               } // case 74
1501             case 82:
1502               {
1503                 java.lang.String s = input.readStringRequireUtf8();
1504                 sourceCodeCase_ = 10;
1505                 sourceCode_ = s;
1506                 break;
1507               } // case 82
1508             default:
1509               {
1510                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1511                   done = true; // was an endgroup tag
1512                 }
1513                 break;
1514               } // default:
1515           } // switch (tag)
1516         } // while (!done)
1517       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1518         throw e.unwrapIOException();
1519       } finally {
1520         onChanged();
1521       } // finally
1522       return this;
1523     }
1524 
1525     private int sourceCodeCase_ = 0;
1526     private java.lang.Object sourceCode_;
1527 
getSourceCodeCase()1528     public SourceCodeCase getSourceCodeCase() {
1529       return SourceCodeCase.forNumber(sourceCodeCase_);
1530     }
1531 
clearSourceCode()1532     public Builder clearSourceCode() {
1533       sourceCodeCase_ = 0;
1534       sourceCode_ = null;
1535       onChanged();
1536       return this;
1537     }
1538 
1539     private int bitField0_;
1540 
1541     private java.lang.Object name_ = "";
1542     /**
1543      *
1544      *
1545      * <pre>
1546      * The resource name of the workflow.
1547      * Format: projects/{project}/locations/{location}/workflows/{workflow}
1548      * </pre>
1549      *
1550      * <code>string name = 1;</code>
1551      *
1552      * @return The name.
1553      */
getName()1554     public java.lang.String getName() {
1555       java.lang.Object ref = name_;
1556       if (!(ref instanceof java.lang.String)) {
1557         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1558         java.lang.String s = bs.toStringUtf8();
1559         name_ = s;
1560         return s;
1561       } else {
1562         return (java.lang.String) ref;
1563       }
1564     }
1565     /**
1566      *
1567      *
1568      * <pre>
1569      * The resource name of the workflow.
1570      * Format: projects/{project}/locations/{location}/workflows/{workflow}
1571      * </pre>
1572      *
1573      * <code>string name = 1;</code>
1574      *
1575      * @return The bytes for name.
1576      */
getNameBytes()1577     public com.google.protobuf.ByteString getNameBytes() {
1578       java.lang.Object ref = name_;
1579       if (ref instanceof String) {
1580         com.google.protobuf.ByteString b =
1581             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1582         name_ = b;
1583         return b;
1584       } else {
1585         return (com.google.protobuf.ByteString) ref;
1586       }
1587     }
1588     /**
1589      *
1590      *
1591      * <pre>
1592      * The resource name of the workflow.
1593      * Format: projects/{project}/locations/{location}/workflows/{workflow}
1594      * </pre>
1595      *
1596      * <code>string name = 1;</code>
1597      *
1598      * @param value The name to set.
1599      * @return This builder for chaining.
1600      */
setName(java.lang.String value)1601     public Builder setName(java.lang.String value) {
1602       if (value == null) {
1603         throw new NullPointerException();
1604       }
1605       name_ = value;
1606       bitField0_ |= 0x00000001;
1607       onChanged();
1608       return this;
1609     }
1610     /**
1611      *
1612      *
1613      * <pre>
1614      * The resource name of the workflow.
1615      * Format: projects/{project}/locations/{location}/workflows/{workflow}
1616      * </pre>
1617      *
1618      * <code>string name = 1;</code>
1619      *
1620      * @return This builder for chaining.
1621      */
clearName()1622     public Builder clearName() {
1623       name_ = getDefaultInstance().getName();
1624       bitField0_ = (bitField0_ & ~0x00000001);
1625       onChanged();
1626       return this;
1627     }
1628     /**
1629      *
1630      *
1631      * <pre>
1632      * The resource name of the workflow.
1633      * Format: projects/{project}/locations/{location}/workflows/{workflow}
1634      * </pre>
1635      *
1636      * <code>string name = 1;</code>
1637      *
1638      * @param value The bytes for name to set.
1639      * @return This builder for chaining.
1640      */
setNameBytes(com.google.protobuf.ByteString value)1641     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1642       if (value == null) {
1643         throw new NullPointerException();
1644       }
1645       checkByteStringIsUtf8(value);
1646       name_ = value;
1647       bitField0_ |= 0x00000001;
1648       onChanged();
1649       return this;
1650     }
1651 
1652     private java.lang.Object description_ = "";
1653     /**
1654      *
1655      *
1656      * <pre>
1657      * Description of the workflow provided by the user.
1658      * Must be at most 1000 unicode characters long.
1659      * </pre>
1660      *
1661      * <code>string description = 2;</code>
1662      *
1663      * @return The description.
1664      */
getDescription()1665     public java.lang.String getDescription() {
1666       java.lang.Object ref = description_;
1667       if (!(ref instanceof java.lang.String)) {
1668         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1669         java.lang.String s = bs.toStringUtf8();
1670         description_ = s;
1671         return s;
1672       } else {
1673         return (java.lang.String) ref;
1674       }
1675     }
1676     /**
1677      *
1678      *
1679      * <pre>
1680      * Description of the workflow provided by the user.
1681      * Must be at most 1000 unicode characters long.
1682      * </pre>
1683      *
1684      * <code>string description = 2;</code>
1685      *
1686      * @return The bytes for description.
1687      */
getDescriptionBytes()1688     public com.google.protobuf.ByteString getDescriptionBytes() {
1689       java.lang.Object ref = description_;
1690       if (ref instanceof String) {
1691         com.google.protobuf.ByteString b =
1692             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1693         description_ = b;
1694         return b;
1695       } else {
1696         return (com.google.protobuf.ByteString) ref;
1697       }
1698     }
1699     /**
1700      *
1701      *
1702      * <pre>
1703      * Description of the workflow provided by the user.
1704      * Must be at most 1000 unicode characters long.
1705      * </pre>
1706      *
1707      * <code>string description = 2;</code>
1708      *
1709      * @param value The description to set.
1710      * @return This builder for chaining.
1711      */
setDescription(java.lang.String value)1712     public Builder setDescription(java.lang.String value) {
1713       if (value == null) {
1714         throw new NullPointerException();
1715       }
1716       description_ = value;
1717       bitField0_ |= 0x00000002;
1718       onChanged();
1719       return this;
1720     }
1721     /**
1722      *
1723      *
1724      * <pre>
1725      * Description of the workflow provided by the user.
1726      * Must be at most 1000 unicode characters long.
1727      * </pre>
1728      *
1729      * <code>string description = 2;</code>
1730      *
1731      * @return This builder for chaining.
1732      */
clearDescription()1733     public Builder clearDescription() {
1734       description_ = getDefaultInstance().getDescription();
1735       bitField0_ = (bitField0_ & ~0x00000002);
1736       onChanged();
1737       return this;
1738     }
1739     /**
1740      *
1741      *
1742      * <pre>
1743      * Description of the workflow provided by the user.
1744      * Must be at most 1000 unicode characters long.
1745      * </pre>
1746      *
1747      * <code>string description = 2;</code>
1748      *
1749      * @param value The bytes for description to set.
1750      * @return This builder for chaining.
1751      */
setDescriptionBytes(com.google.protobuf.ByteString value)1752     public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
1753       if (value == null) {
1754         throw new NullPointerException();
1755       }
1756       checkByteStringIsUtf8(value);
1757       description_ = value;
1758       bitField0_ |= 0x00000002;
1759       onChanged();
1760       return this;
1761     }
1762 
1763     private int state_ = 0;
1764     /**
1765      *
1766      *
1767      * <pre>
1768      * Output only. State of the workflow deployment.
1769      * </pre>
1770      *
1771      * <code>
1772      * .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
1773      * </code>
1774      *
1775      * @return The enum numeric value on the wire for state.
1776      */
1777     @java.lang.Override
getStateValue()1778     public int getStateValue() {
1779       return state_;
1780     }
1781     /**
1782      *
1783      *
1784      * <pre>
1785      * Output only. State of the workflow deployment.
1786      * </pre>
1787      *
1788      * <code>
1789      * .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
1790      * </code>
1791      *
1792      * @param value The enum numeric value on the wire for state to set.
1793      * @return This builder for chaining.
1794      */
setStateValue(int value)1795     public Builder setStateValue(int value) {
1796       state_ = value;
1797       bitField0_ |= 0x00000004;
1798       onChanged();
1799       return this;
1800     }
1801     /**
1802      *
1803      *
1804      * <pre>
1805      * Output only. State of the workflow deployment.
1806      * </pre>
1807      *
1808      * <code>
1809      * .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
1810      * </code>
1811      *
1812      * @return The state.
1813      */
1814     @java.lang.Override
getState()1815     public com.google.cloud.workflows.v1beta.Workflow.State getState() {
1816       com.google.cloud.workflows.v1beta.Workflow.State result =
1817           com.google.cloud.workflows.v1beta.Workflow.State.forNumber(state_);
1818       return result == null
1819           ? com.google.cloud.workflows.v1beta.Workflow.State.UNRECOGNIZED
1820           : result;
1821     }
1822     /**
1823      *
1824      *
1825      * <pre>
1826      * Output only. State of the workflow deployment.
1827      * </pre>
1828      *
1829      * <code>
1830      * .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
1831      * </code>
1832      *
1833      * @param value The state to set.
1834      * @return This builder for chaining.
1835      */
setState(com.google.cloud.workflows.v1beta.Workflow.State value)1836     public Builder setState(com.google.cloud.workflows.v1beta.Workflow.State value) {
1837       if (value == null) {
1838         throw new NullPointerException();
1839       }
1840       bitField0_ |= 0x00000004;
1841       state_ = value.getNumber();
1842       onChanged();
1843       return this;
1844     }
1845     /**
1846      *
1847      *
1848      * <pre>
1849      * Output only. State of the workflow deployment.
1850      * </pre>
1851      *
1852      * <code>
1853      * .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
1854      * </code>
1855      *
1856      * @return This builder for chaining.
1857      */
clearState()1858     public Builder clearState() {
1859       bitField0_ = (bitField0_ & ~0x00000004);
1860       state_ = 0;
1861       onChanged();
1862       return this;
1863     }
1864 
1865     private java.lang.Object revisionId_ = "";
1866     /**
1867      *
1868      *
1869      * <pre>
1870      * Output only. The revision of the workflow.
1871      * A new revision of a workflow is created as a result of updating the
1872      * following fields of a workflow:
1873      * - `source_code`
1874      * - `service_account`
1875      * The format is "000001-a4d", where the first 6 characters define
1876      * the zero-padded revision ordinal number. They are followed by a hyphen and
1877      * 3 hexadecimal random characters.
1878      * </pre>
1879      *
1880      * <code>string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1881      *
1882      * @return The revisionId.
1883      */
getRevisionId()1884     public java.lang.String getRevisionId() {
1885       java.lang.Object ref = revisionId_;
1886       if (!(ref instanceof java.lang.String)) {
1887         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1888         java.lang.String s = bs.toStringUtf8();
1889         revisionId_ = s;
1890         return s;
1891       } else {
1892         return (java.lang.String) ref;
1893       }
1894     }
1895     /**
1896      *
1897      *
1898      * <pre>
1899      * Output only. The revision of the workflow.
1900      * A new revision of a workflow is created as a result of updating the
1901      * following fields of a workflow:
1902      * - `source_code`
1903      * - `service_account`
1904      * The format is "000001-a4d", where the first 6 characters define
1905      * the zero-padded revision ordinal number. They are followed by a hyphen and
1906      * 3 hexadecimal random characters.
1907      * </pre>
1908      *
1909      * <code>string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1910      *
1911      * @return The bytes for revisionId.
1912      */
getRevisionIdBytes()1913     public com.google.protobuf.ByteString getRevisionIdBytes() {
1914       java.lang.Object ref = revisionId_;
1915       if (ref instanceof String) {
1916         com.google.protobuf.ByteString b =
1917             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1918         revisionId_ = b;
1919         return b;
1920       } else {
1921         return (com.google.protobuf.ByteString) ref;
1922       }
1923     }
1924     /**
1925      *
1926      *
1927      * <pre>
1928      * Output only. The revision of the workflow.
1929      * A new revision of a workflow is created as a result of updating the
1930      * following fields of a workflow:
1931      * - `source_code`
1932      * - `service_account`
1933      * The format is "000001-a4d", where the first 6 characters define
1934      * the zero-padded revision ordinal number. They are followed by a hyphen and
1935      * 3 hexadecimal random characters.
1936      * </pre>
1937      *
1938      * <code>string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1939      *
1940      * @param value The revisionId to set.
1941      * @return This builder for chaining.
1942      */
setRevisionId(java.lang.String value)1943     public Builder setRevisionId(java.lang.String value) {
1944       if (value == null) {
1945         throw new NullPointerException();
1946       }
1947       revisionId_ = value;
1948       bitField0_ |= 0x00000008;
1949       onChanged();
1950       return this;
1951     }
1952     /**
1953      *
1954      *
1955      * <pre>
1956      * Output only. The revision of the workflow.
1957      * A new revision of a workflow is created as a result of updating the
1958      * following fields of a workflow:
1959      * - `source_code`
1960      * - `service_account`
1961      * The format is "000001-a4d", where the first 6 characters define
1962      * the zero-padded revision ordinal number. They are followed by a hyphen and
1963      * 3 hexadecimal random characters.
1964      * </pre>
1965      *
1966      * <code>string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1967      *
1968      * @return This builder for chaining.
1969      */
clearRevisionId()1970     public Builder clearRevisionId() {
1971       revisionId_ = getDefaultInstance().getRevisionId();
1972       bitField0_ = (bitField0_ & ~0x00000008);
1973       onChanged();
1974       return this;
1975     }
1976     /**
1977      *
1978      *
1979      * <pre>
1980      * Output only. The revision of the workflow.
1981      * A new revision of a workflow is created as a result of updating the
1982      * following fields of a workflow:
1983      * - `source_code`
1984      * - `service_account`
1985      * The format is "000001-a4d", where the first 6 characters define
1986      * the zero-padded revision ordinal number. They are followed by a hyphen and
1987      * 3 hexadecimal random characters.
1988      * </pre>
1989      *
1990      * <code>string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1991      *
1992      * @param value The bytes for revisionId to set.
1993      * @return This builder for chaining.
1994      */
setRevisionIdBytes(com.google.protobuf.ByteString value)1995     public Builder setRevisionIdBytes(com.google.protobuf.ByteString value) {
1996       if (value == null) {
1997         throw new NullPointerException();
1998       }
1999       checkByteStringIsUtf8(value);
2000       revisionId_ = value;
2001       bitField0_ |= 0x00000008;
2002       onChanged();
2003       return this;
2004     }
2005 
2006     private com.google.protobuf.Timestamp createTime_;
2007     private com.google.protobuf.SingleFieldBuilderV3<
2008             com.google.protobuf.Timestamp,
2009             com.google.protobuf.Timestamp.Builder,
2010             com.google.protobuf.TimestampOrBuilder>
2011         createTimeBuilder_;
2012     /**
2013      *
2014      *
2015      * <pre>
2016      * Output only. The timestamp of when the workflow was created.
2017      * </pre>
2018      *
2019      * <code>
2020      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2021      * </code>
2022      *
2023      * @return Whether the createTime field is set.
2024      */
hasCreateTime()2025     public boolean hasCreateTime() {
2026       return ((bitField0_ & 0x00000010) != 0);
2027     }
2028     /**
2029      *
2030      *
2031      * <pre>
2032      * Output only. The timestamp of when the workflow was created.
2033      * </pre>
2034      *
2035      * <code>
2036      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2037      * </code>
2038      *
2039      * @return The createTime.
2040      */
getCreateTime()2041     public com.google.protobuf.Timestamp getCreateTime() {
2042       if (createTimeBuilder_ == null) {
2043         return createTime_ == null
2044             ? com.google.protobuf.Timestamp.getDefaultInstance()
2045             : createTime_;
2046       } else {
2047         return createTimeBuilder_.getMessage();
2048       }
2049     }
2050     /**
2051      *
2052      *
2053      * <pre>
2054      * Output only. The timestamp of when the workflow was created.
2055      * </pre>
2056      *
2057      * <code>
2058      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2059      * </code>
2060      */
setCreateTime(com.google.protobuf.Timestamp value)2061     public Builder setCreateTime(com.google.protobuf.Timestamp value) {
2062       if (createTimeBuilder_ == null) {
2063         if (value == null) {
2064           throw new NullPointerException();
2065         }
2066         createTime_ = value;
2067       } else {
2068         createTimeBuilder_.setMessage(value);
2069       }
2070       bitField0_ |= 0x00000010;
2071       onChanged();
2072       return this;
2073     }
2074     /**
2075      *
2076      *
2077      * <pre>
2078      * Output only. The timestamp of when the workflow was created.
2079      * </pre>
2080      *
2081      * <code>
2082      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2083      * </code>
2084      */
setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)2085     public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
2086       if (createTimeBuilder_ == null) {
2087         createTime_ = builderForValue.build();
2088       } else {
2089         createTimeBuilder_.setMessage(builderForValue.build());
2090       }
2091       bitField0_ |= 0x00000010;
2092       onChanged();
2093       return this;
2094     }
2095     /**
2096      *
2097      *
2098      * <pre>
2099      * Output only. The timestamp of when the workflow was created.
2100      * </pre>
2101      *
2102      * <code>
2103      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2104      * </code>
2105      */
mergeCreateTime(com.google.protobuf.Timestamp value)2106     public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
2107       if (createTimeBuilder_ == null) {
2108         if (((bitField0_ & 0x00000010) != 0)
2109             && createTime_ != null
2110             && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
2111           getCreateTimeBuilder().mergeFrom(value);
2112         } else {
2113           createTime_ = value;
2114         }
2115       } else {
2116         createTimeBuilder_.mergeFrom(value);
2117       }
2118       bitField0_ |= 0x00000010;
2119       onChanged();
2120       return this;
2121     }
2122     /**
2123      *
2124      *
2125      * <pre>
2126      * Output only. The timestamp of when the workflow was created.
2127      * </pre>
2128      *
2129      * <code>
2130      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2131      * </code>
2132      */
clearCreateTime()2133     public Builder clearCreateTime() {
2134       bitField0_ = (bitField0_ & ~0x00000010);
2135       createTime_ = null;
2136       if (createTimeBuilder_ != null) {
2137         createTimeBuilder_.dispose();
2138         createTimeBuilder_ = null;
2139       }
2140       onChanged();
2141       return this;
2142     }
2143     /**
2144      *
2145      *
2146      * <pre>
2147      * Output only. The timestamp of when the workflow was created.
2148      * </pre>
2149      *
2150      * <code>
2151      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2152      * </code>
2153      */
getCreateTimeBuilder()2154     public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
2155       bitField0_ |= 0x00000010;
2156       onChanged();
2157       return getCreateTimeFieldBuilder().getBuilder();
2158     }
2159     /**
2160      *
2161      *
2162      * <pre>
2163      * Output only. The timestamp of when the workflow was created.
2164      * </pre>
2165      *
2166      * <code>
2167      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2168      * </code>
2169      */
getCreateTimeOrBuilder()2170     public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
2171       if (createTimeBuilder_ != null) {
2172         return createTimeBuilder_.getMessageOrBuilder();
2173       } else {
2174         return createTime_ == null
2175             ? com.google.protobuf.Timestamp.getDefaultInstance()
2176             : createTime_;
2177       }
2178     }
2179     /**
2180      *
2181      *
2182      * <pre>
2183      * Output only. The timestamp of when the workflow was created.
2184      * </pre>
2185      *
2186      * <code>
2187      * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
2188      * </code>
2189      */
2190     private com.google.protobuf.SingleFieldBuilderV3<
2191             com.google.protobuf.Timestamp,
2192             com.google.protobuf.Timestamp.Builder,
2193             com.google.protobuf.TimestampOrBuilder>
getCreateTimeFieldBuilder()2194         getCreateTimeFieldBuilder() {
2195       if (createTimeBuilder_ == null) {
2196         createTimeBuilder_ =
2197             new com.google.protobuf.SingleFieldBuilderV3<
2198                 com.google.protobuf.Timestamp,
2199                 com.google.protobuf.Timestamp.Builder,
2200                 com.google.protobuf.TimestampOrBuilder>(
2201                 getCreateTime(), getParentForChildren(), isClean());
2202         createTime_ = null;
2203       }
2204       return createTimeBuilder_;
2205     }
2206 
2207     private com.google.protobuf.Timestamp updateTime_;
2208     private com.google.protobuf.SingleFieldBuilderV3<
2209             com.google.protobuf.Timestamp,
2210             com.google.protobuf.Timestamp.Builder,
2211             com.google.protobuf.TimestampOrBuilder>
2212         updateTimeBuilder_;
2213     /**
2214      *
2215      *
2216      * <pre>
2217      * Output only. The last update timestamp of the workflow.
2218      * </pre>
2219      *
2220      * <code>
2221      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2222      * </code>
2223      *
2224      * @return Whether the updateTime field is set.
2225      */
hasUpdateTime()2226     public boolean hasUpdateTime() {
2227       return ((bitField0_ & 0x00000020) != 0);
2228     }
2229     /**
2230      *
2231      *
2232      * <pre>
2233      * Output only. The last update timestamp of the workflow.
2234      * </pre>
2235      *
2236      * <code>
2237      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2238      * </code>
2239      *
2240      * @return The updateTime.
2241      */
getUpdateTime()2242     public com.google.protobuf.Timestamp getUpdateTime() {
2243       if (updateTimeBuilder_ == null) {
2244         return updateTime_ == null
2245             ? com.google.protobuf.Timestamp.getDefaultInstance()
2246             : updateTime_;
2247       } else {
2248         return updateTimeBuilder_.getMessage();
2249       }
2250     }
2251     /**
2252      *
2253      *
2254      * <pre>
2255      * Output only. The last update timestamp of the workflow.
2256      * </pre>
2257      *
2258      * <code>
2259      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2260      * </code>
2261      */
setUpdateTime(com.google.protobuf.Timestamp value)2262     public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
2263       if (updateTimeBuilder_ == null) {
2264         if (value == null) {
2265           throw new NullPointerException();
2266         }
2267         updateTime_ = value;
2268       } else {
2269         updateTimeBuilder_.setMessage(value);
2270       }
2271       bitField0_ |= 0x00000020;
2272       onChanged();
2273       return this;
2274     }
2275     /**
2276      *
2277      *
2278      * <pre>
2279      * Output only. The last update timestamp of the workflow.
2280      * </pre>
2281      *
2282      * <code>
2283      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2284      * </code>
2285      */
setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)2286     public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
2287       if (updateTimeBuilder_ == null) {
2288         updateTime_ = builderForValue.build();
2289       } else {
2290         updateTimeBuilder_.setMessage(builderForValue.build());
2291       }
2292       bitField0_ |= 0x00000020;
2293       onChanged();
2294       return this;
2295     }
2296     /**
2297      *
2298      *
2299      * <pre>
2300      * Output only. The last update timestamp of the workflow.
2301      * </pre>
2302      *
2303      * <code>
2304      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2305      * </code>
2306      */
mergeUpdateTime(com.google.protobuf.Timestamp value)2307     public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
2308       if (updateTimeBuilder_ == null) {
2309         if (((bitField0_ & 0x00000020) != 0)
2310             && updateTime_ != null
2311             && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
2312           getUpdateTimeBuilder().mergeFrom(value);
2313         } else {
2314           updateTime_ = value;
2315         }
2316       } else {
2317         updateTimeBuilder_.mergeFrom(value);
2318       }
2319       bitField0_ |= 0x00000020;
2320       onChanged();
2321       return this;
2322     }
2323     /**
2324      *
2325      *
2326      * <pre>
2327      * Output only. The last update timestamp of the workflow.
2328      * </pre>
2329      *
2330      * <code>
2331      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2332      * </code>
2333      */
clearUpdateTime()2334     public Builder clearUpdateTime() {
2335       bitField0_ = (bitField0_ & ~0x00000020);
2336       updateTime_ = null;
2337       if (updateTimeBuilder_ != null) {
2338         updateTimeBuilder_.dispose();
2339         updateTimeBuilder_ = null;
2340       }
2341       onChanged();
2342       return this;
2343     }
2344     /**
2345      *
2346      *
2347      * <pre>
2348      * Output only. The last update timestamp of the workflow.
2349      * </pre>
2350      *
2351      * <code>
2352      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2353      * </code>
2354      */
getUpdateTimeBuilder()2355     public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
2356       bitField0_ |= 0x00000020;
2357       onChanged();
2358       return getUpdateTimeFieldBuilder().getBuilder();
2359     }
2360     /**
2361      *
2362      *
2363      * <pre>
2364      * Output only. The last update timestamp of the workflow.
2365      * </pre>
2366      *
2367      * <code>
2368      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2369      * </code>
2370      */
getUpdateTimeOrBuilder()2371     public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
2372       if (updateTimeBuilder_ != null) {
2373         return updateTimeBuilder_.getMessageOrBuilder();
2374       } else {
2375         return updateTime_ == null
2376             ? com.google.protobuf.Timestamp.getDefaultInstance()
2377             : updateTime_;
2378       }
2379     }
2380     /**
2381      *
2382      *
2383      * <pre>
2384      * Output only. The last update timestamp of the workflow.
2385      * </pre>
2386      *
2387      * <code>
2388      * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
2389      * </code>
2390      */
2391     private com.google.protobuf.SingleFieldBuilderV3<
2392             com.google.protobuf.Timestamp,
2393             com.google.protobuf.Timestamp.Builder,
2394             com.google.protobuf.TimestampOrBuilder>
getUpdateTimeFieldBuilder()2395         getUpdateTimeFieldBuilder() {
2396       if (updateTimeBuilder_ == null) {
2397         updateTimeBuilder_ =
2398             new com.google.protobuf.SingleFieldBuilderV3<
2399                 com.google.protobuf.Timestamp,
2400                 com.google.protobuf.Timestamp.Builder,
2401                 com.google.protobuf.TimestampOrBuilder>(
2402                 getUpdateTime(), getParentForChildren(), isClean());
2403         updateTime_ = null;
2404       }
2405       return updateTimeBuilder_;
2406     }
2407 
2408     private com.google.protobuf.Timestamp revisionCreateTime_;
2409     private com.google.protobuf.SingleFieldBuilderV3<
2410             com.google.protobuf.Timestamp,
2411             com.google.protobuf.Timestamp.Builder,
2412             com.google.protobuf.TimestampOrBuilder>
2413         revisionCreateTimeBuilder_;
2414     /**
2415      *
2416      *
2417      * <pre>
2418      * Output only. The timestamp that the latest revision of the workflow
2419      * was created.
2420      * </pre>
2421      *
2422      * <code>
2423      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2424      * </code>
2425      *
2426      * @return Whether the revisionCreateTime field is set.
2427      */
hasRevisionCreateTime()2428     public boolean hasRevisionCreateTime() {
2429       return ((bitField0_ & 0x00000040) != 0);
2430     }
2431     /**
2432      *
2433      *
2434      * <pre>
2435      * Output only. The timestamp that the latest revision of the workflow
2436      * was created.
2437      * </pre>
2438      *
2439      * <code>
2440      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2441      * </code>
2442      *
2443      * @return The revisionCreateTime.
2444      */
getRevisionCreateTime()2445     public com.google.protobuf.Timestamp getRevisionCreateTime() {
2446       if (revisionCreateTimeBuilder_ == null) {
2447         return revisionCreateTime_ == null
2448             ? com.google.protobuf.Timestamp.getDefaultInstance()
2449             : revisionCreateTime_;
2450       } else {
2451         return revisionCreateTimeBuilder_.getMessage();
2452       }
2453     }
2454     /**
2455      *
2456      *
2457      * <pre>
2458      * Output only. The timestamp that the latest revision of the workflow
2459      * was created.
2460      * </pre>
2461      *
2462      * <code>
2463      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2464      * </code>
2465      */
setRevisionCreateTime(com.google.protobuf.Timestamp value)2466     public Builder setRevisionCreateTime(com.google.protobuf.Timestamp value) {
2467       if (revisionCreateTimeBuilder_ == null) {
2468         if (value == null) {
2469           throw new NullPointerException();
2470         }
2471         revisionCreateTime_ = value;
2472       } else {
2473         revisionCreateTimeBuilder_.setMessage(value);
2474       }
2475       bitField0_ |= 0x00000040;
2476       onChanged();
2477       return this;
2478     }
2479     /**
2480      *
2481      *
2482      * <pre>
2483      * Output only. The timestamp that the latest revision of the workflow
2484      * was created.
2485      * </pre>
2486      *
2487      * <code>
2488      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2489      * </code>
2490      */
setRevisionCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)2491     public Builder setRevisionCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
2492       if (revisionCreateTimeBuilder_ == null) {
2493         revisionCreateTime_ = builderForValue.build();
2494       } else {
2495         revisionCreateTimeBuilder_.setMessage(builderForValue.build());
2496       }
2497       bitField0_ |= 0x00000040;
2498       onChanged();
2499       return this;
2500     }
2501     /**
2502      *
2503      *
2504      * <pre>
2505      * Output only. The timestamp that the latest revision of the workflow
2506      * was created.
2507      * </pre>
2508      *
2509      * <code>
2510      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2511      * </code>
2512      */
mergeRevisionCreateTime(com.google.protobuf.Timestamp value)2513     public Builder mergeRevisionCreateTime(com.google.protobuf.Timestamp value) {
2514       if (revisionCreateTimeBuilder_ == null) {
2515         if (((bitField0_ & 0x00000040) != 0)
2516             && revisionCreateTime_ != null
2517             && revisionCreateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
2518           getRevisionCreateTimeBuilder().mergeFrom(value);
2519         } else {
2520           revisionCreateTime_ = value;
2521         }
2522       } else {
2523         revisionCreateTimeBuilder_.mergeFrom(value);
2524       }
2525       bitField0_ |= 0x00000040;
2526       onChanged();
2527       return this;
2528     }
2529     /**
2530      *
2531      *
2532      * <pre>
2533      * Output only. The timestamp that the latest revision of the workflow
2534      * was created.
2535      * </pre>
2536      *
2537      * <code>
2538      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2539      * </code>
2540      */
clearRevisionCreateTime()2541     public Builder clearRevisionCreateTime() {
2542       bitField0_ = (bitField0_ & ~0x00000040);
2543       revisionCreateTime_ = null;
2544       if (revisionCreateTimeBuilder_ != null) {
2545         revisionCreateTimeBuilder_.dispose();
2546         revisionCreateTimeBuilder_ = null;
2547       }
2548       onChanged();
2549       return this;
2550     }
2551     /**
2552      *
2553      *
2554      * <pre>
2555      * Output only. The timestamp that the latest revision of the workflow
2556      * was created.
2557      * </pre>
2558      *
2559      * <code>
2560      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2561      * </code>
2562      */
getRevisionCreateTimeBuilder()2563     public com.google.protobuf.Timestamp.Builder getRevisionCreateTimeBuilder() {
2564       bitField0_ |= 0x00000040;
2565       onChanged();
2566       return getRevisionCreateTimeFieldBuilder().getBuilder();
2567     }
2568     /**
2569      *
2570      *
2571      * <pre>
2572      * Output only. The timestamp that the latest revision of the workflow
2573      * was created.
2574      * </pre>
2575      *
2576      * <code>
2577      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2578      * </code>
2579      */
getRevisionCreateTimeOrBuilder()2580     public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() {
2581       if (revisionCreateTimeBuilder_ != null) {
2582         return revisionCreateTimeBuilder_.getMessageOrBuilder();
2583       } else {
2584         return revisionCreateTime_ == null
2585             ? com.google.protobuf.Timestamp.getDefaultInstance()
2586             : revisionCreateTime_;
2587       }
2588     }
2589     /**
2590      *
2591      *
2592      * <pre>
2593      * Output only. The timestamp that the latest revision of the workflow
2594      * was created.
2595      * </pre>
2596      *
2597      * <code>
2598      * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
2599      * </code>
2600      */
2601     private com.google.protobuf.SingleFieldBuilderV3<
2602             com.google.protobuf.Timestamp,
2603             com.google.protobuf.Timestamp.Builder,
2604             com.google.protobuf.TimestampOrBuilder>
getRevisionCreateTimeFieldBuilder()2605         getRevisionCreateTimeFieldBuilder() {
2606       if (revisionCreateTimeBuilder_ == null) {
2607         revisionCreateTimeBuilder_ =
2608             new com.google.protobuf.SingleFieldBuilderV3<
2609                 com.google.protobuf.Timestamp,
2610                 com.google.protobuf.Timestamp.Builder,
2611                 com.google.protobuf.TimestampOrBuilder>(
2612                 getRevisionCreateTime(), getParentForChildren(), isClean());
2613         revisionCreateTime_ = null;
2614       }
2615       return revisionCreateTimeBuilder_;
2616     }
2617 
2618     private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;
2619 
internalGetLabels()2620     private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
2621       if (labels_ == null) {
2622         return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
2623       }
2624       return labels_;
2625     }
2626 
2627     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableLabels()2628         internalGetMutableLabels() {
2629       if (labels_ == null) {
2630         labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
2631       }
2632       if (!labels_.isMutable()) {
2633         labels_ = labels_.copy();
2634       }
2635       bitField0_ |= 0x00000080;
2636       onChanged();
2637       return labels_;
2638     }
2639 
getLabelsCount()2640     public int getLabelsCount() {
2641       return internalGetLabels().getMap().size();
2642     }
2643     /**
2644      *
2645      *
2646      * <pre>
2647      * Labels associated with this workflow.
2648      * Labels can contain at most 64 entries. Keys and values can be no longer
2649      * than 63 characters and can only contain lowercase letters, numeric
2650      * characters, underscores and dashes. Label keys must start with a letter.
2651      * International characters are allowed.
2652      * </pre>
2653      *
2654      * <code>map&lt;string, string&gt; labels = 8;</code>
2655      */
2656     @java.lang.Override
containsLabels(java.lang.String key)2657     public boolean containsLabels(java.lang.String key) {
2658       if (key == null) {
2659         throw new NullPointerException("map key");
2660       }
2661       return internalGetLabels().getMap().containsKey(key);
2662     }
2663     /** Use {@link #getLabelsMap()} instead. */
2664     @java.lang.Override
2665     @java.lang.Deprecated
getLabels()2666     public java.util.Map<java.lang.String, java.lang.String> getLabels() {
2667       return getLabelsMap();
2668     }
2669     /**
2670      *
2671      *
2672      * <pre>
2673      * Labels associated with this workflow.
2674      * Labels can contain at most 64 entries. Keys and values can be no longer
2675      * than 63 characters and can only contain lowercase letters, numeric
2676      * characters, underscores and dashes. Label keys must start with a letter.
2677      * International characters are allowed.
2678      * </pre>
2679      *
2680      * <code>map&lt;string, string&gt; labels = 8;</code>
2681      */
2682     @java.lang.Override
getLabelsMap()2683     public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
2684       return internalGetLabels().getMap();
2685     }
2686     /**
2687      *
2688      *
2689      * <pre>
2690      * Labels associated with this workflow.
2691      * Labels can contain at most 64 entries. Keys and values can be no longer
2692      * than 63 characters and can only contain lowercase letters, numeric
2693      * characters, underscores and dashes. Label keys must start with a letter.
2694      * International characters are allowed.
2695      * </pre>
2696      *
2697      * <code>map&lt;string, string&gt; labels = 8;</code>
2698      */
2699     @java.lang.Override
getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)2700     public /* nullable */ java.lang.String getLabelsOrDefault(
2701         java.lang.String key,
2702         /* nullable */
2703         java.lang.String defaultValue) {
2704       if (key == null) {
2705         throw new NullPointerException("map key");
2706       }
2707       java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
2708       return map.containsKey(key) ? map.get(key) : defaultValue;
2709     }
2710     /**
2711      *
2712      *
2713      * <pre>
2714      * Labels associated with this workflow.
2715      * Labels can contain at most 64 entries. Keys and values can be no longer
2716      * than 63 characters and can only contain lowercase letters, numeric
2717      * characters, underscores and dashes. Label keys must start with a letter.
2718      * International characters are allowed.
2719      * </pre>
2720      *
2721      * <code>map&lt;string, string&gt; labels = 8;</code>
2722      */
2723     @java.lang.Override
getLabelsOrThrow(java.lang.String key)2724     public java.lang.String getLabelsOrThrow(java.lang.String key) {
2725       if (key == null) {
2726         throw new NullPointerException("map key");
2727       }
2728       java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
2729       if (!map.containsKey(key)) {
2730         throw new java.lang.IllegalArgumentException();
2731       }
2732       return map.get(key);
2733     }
2734 
clearLabels()2735     public Builder clearLabels() {
2736       bitField0_ = (bitField0_ & ~0x00000080);
2737       internalGetMutableLabels().getMutableMap().clear();
2738       return this;
2739     }
2740     /**
2741      *
2742      *
2743      * <pre>
2744      * Labels associated with this workflow.
2745      * Labels can contain at most 64 entries. Keys and values can be no longer
2746      * than 63 characters and can only contain lowercase letters, numeric
2747      * characters, underscores and dashes. Label keys must start with a letter.
2748      * International characters are allowed.
2749      * </pre>
2750      *
2751      * <code>map&lt;string, string&gt; labels = 8;</code>
2752      */
removeLabels(java.lang.String key)2753     public Builder removeLabels(java.lang.String key) {
2754       if (key == null) {
2755         throw new NullPointerException("map key");
2756       }
2757       internalGetMutableLabels().getMutableMap().remove(key);
2758       return this;
2759     }
2760     /** Use alternate mutation accessors instead. */
2761     @java.lang.Deprecated
getMutableLabels()2762     public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() {
2763       bitField0_ |= 0x00000080;
2764       return internalGetMutableLabels().getMutableMap();
2765     }
2766     /**
2767      *
2768      *
2769      * <pre>
2770      * Labels associated with this workflow.
2771      * Labels can contain at most 64 entries. Keys and values can be no longer
2772      * than 63 characters and can only contain lowercase letters, numeric
2773      * characters, underscores and dashes. Label keys must start with a letter.
2774      * International characters are allowed.
2775      * </pre>
2776      *
2777      * <code>map&lt;string, string&gt; labels = 8;</code>
2778      */
putLabels(java.lang.String key, java.lang.String value)2779     public Builder putLabels(java.lang.String key, java.lang.String value) {
2780       if (key == null) {
2781         throw new NullPointerException("map key");
2782       }
2783       if (value == null) {
2784         throw new NullPointerException("map value");
2785       }
2786       internalGetMutableLabels().getMutableMap().put(key, value);
2787       bitField0_ |= 0x00000080;
2788       return this;
2789     }
2790     /**
2791      *
2792      *
2793      * <pre>
2794      * Labels associated with this workflow.
2795      * Labels can contain at most 64 entries. Keys and values can be no longer
2796      * than 63 characters and can only contain lowercase letters, numeric
2797      * characters, underscores and dashes. Label keys must start with a letter.
2798      * International characters are allowed.
2799      * </pre>
2800      *
2801      * <code>map&lt;string, string&gt; labels = 8;</code>
2802      */
putAllLabels(java.util.Map<java.lang.String, java.lang.String> values)2803     public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) {
2804       internalGetMutableLabels().getMutableMap().putAll(values);
2805       bitField0_ |= 0x00000080;
2806       return this;
2807     }
2808 
2809     private java.lang.Object serviceAccount_ = "";
2810     /**
2811      *
2812      *
2813      * <pre>
2814      * Name of the service account associated with the latest workflow version.
2815      * This service account represents the identity of the workflow and determines
2816      * what permissions the workflow has.
2817      * Format: projects/{project}/serviceAccounts/{account}
2818      * Using `-` as a wildcard for the `{project}` will infer the project from
2819      * the account. The `{account}` value can be the `email` address or the
2820      * `unique_id` of the service account.
2821      * If not provided, workflow will use the project's default service account.
2822      * Modifying this field for an existing workflow results in a new workflow
2823      * revision.
2824      * </pre>
2825      *
2826      * <code>string service_account = 9;</code>
2827      *
2828      * @return The serviceAccount.
2829      */
getServiceAccount()2830     public java.lang.String getServiceAccount() {
2831       java.lang.Object ref = serviceAccount_;
2832       if (!(ref instanceof java.lang.String)) {
2833         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2834         java.lang.String s = bs.toStringUtf8();
2835         serviceAccount_ = s;
2836         return s;
2837       } else {
2838         return (java.lang.String) ref;
2839       }
2840     }
2841     /**
2842      *
2843      *
2844      * <pre>
2845      * Name of the service account associated with the latest workflow version.
2846      * This service account represents the identity of the workflow and determines
2847      * what permissions the workflow has.
2848      * Format: projects/{project}/serviceAccounts/{account}
2849      * Using `-` as a wildcard for the `{project}` will infer the project from
2850      * the account. The `{account}` value can be the `email` address or the
2851      * `unique_id` of the service account.
2852      * If not provided, workflow will use the project's default service account.
2853      * Modifying this field for an existing workflow results in a new workflow
2854      * revision.
2855      * </pre>
2856      *
2857      * <code>string service_account = 9;</code>
2858      *
2859      * @return The bytes for serviceAccount.
2860      */
getServiceAccountBytes()2861     public com.google.protobuf.ByteString getServiceAccountBytes() {
2862       java.lang.Object ref = serviceAccount_;
2863       if (ref instanceof String) {
2864         com.google.protobuf.ByteString b =
2865             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2866         serviceAccount_ = b;
2867         return b;
2868       } else {
2869         return (com.google.protobuf.ByteString) ref;
2870       }
2871     }
2872     /**
2873      *
2874      *
2875      * <pre>
2876      * Name of the service account associated with the latest workflow version.
2877      * This service account represents the identity of the workflow and determines
2878      * what permissions the workflow has.
2879      * Format: projects/{project}/serviceAccounts/{account}
2880      * Using `-` as a wildcard for the `{project}` will infer the project from
2881      * the account. The `{account}` value can be the `email` address or the
2882      * `unique_id` of the service account.
2883      * If not provided, workflow will use the project's default service account.
2884      * Modifying this field for an existing workflow results in a new workflow
2885      * revision.
2886      * </pre>
2887      *
2888      * <code>string service_account = 9;</code>
2889      *
2890      * @param value The serviceAccount to set.
2891      * @return This builder for chaining.
2892      */
setServiceAccount(java.lang.String value)2893     public Builder setServiceAccount(java.lang.String value) {
2894       if (value == null) {
2895         throw new NullPointerException();
2896       }
2897       serviceAccount_ = value;
2898       bitField0_ |= 0x00000100;
2899       onChanged();
2900       return this;
2901     }
2902     /**
2903      *
2904      *
2905      * <pre>
2906      * Name of the service account associated with the latest workflow version.
2907      * This service account represents the identity of the workflow and determines
2908      * what permissions the workflow has.
2909      * Format: projects/{project}/serviceAccounts/{account}
2910      * Using `-` as a wildcard for the `{project}` will infer the project from
2911      * the account. The `{account}` value can be the `email` address or the
2912      * `unique_id` of the service account.
2913      * If not provided, workflow will use the project's default service account.
2914      * Modifying this field for an existing workflow results in a new workflow
2915      * revision.
2916      * </pre>
2917      *
2918      * <code>string service_account = 9;</code>
2919      *
2920      * @return This builder for chaining.
2921      */
clearServiceAccount()2922     public Builder clearServiceAccount() {
2923       serviceAccount_ = getDefaultInstance().getServiceAccount();
2924       bitField0_ = (bitField0_ & ~0x00000100);
2925       onChanged();
2926       return this;
2927     }
2928     /**
2929      *
2930      *
2931      * <pre>
2932      * Name of the service account associated with the latest workflow version.
2933      * This service account represents the identity of the workflow and determines
2934      * what permissions the workflow has.
2935      * Format: projects/{project}/serviceAccounts/{account}
2936      * Using `-` as a wildcard for the `{project}` will infer the project from
2937      * the account. The `{account}` value can be the `email` address or the
2938      * `unique_id` of the service account.
2939      * If not provided, workflow will use the project's default service account.
2940      * Modifying this field for an existing workflow results in a new workflow
2941      * revision.
2942      * </pre>
2943      *
2944      * <code>string service_account = 9;</code>
2945      *
2946      * @param value The bytes for serviceAccount to set.
2947      * @return This builder for chaining.
2948      */
setServiceAccountBytes(com.google.protobuf.ByteString value)2949     public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) {
2950       if (value == null) {
2951         throw new NullPointerException();
2952       }
2953       checkByteStringIsUtf8(value);
2954       serviceAccount_ = value;
2955       bitField0_ |= 0x00000100;
2956       onChanged();
2957       return this;
2958     }
2959 
2960     /**
2961      *
2962      *
2963      * <pre>
2964      * Workflow code to be executed. The size limit is 32KB.
2965      * </pre>
2966      *
2967      * <code>string source_contents = 10;</code>
2968      *
2969      * @return Whether the sourceContents field is set.
2970      */
2971     @java.lang.Override
hasSourceContents()2972     public boolean hasSourceContents() {
2973       return sourceCodeCase_ == 10;
2974     }
2975     /**
2976      *
2977      *
2978      * <pre>
2979      * Workflow code to be executed. The size limit is 32KB.
2980      * </pre>
2981      *
2982      * <code>string source_contents = 10;</code>
2983      *
2984      * @return The sourceContents.
2985      */
2986     @java.lang.Override
getSourceContents()2987     public java.lang.String getSourceContents() {
2988       java.lang.Object ref = "";
2989       if (sourceCodeCase_ == 10) {
2990         ref = sourceCode_;
2991       }
2992       if (!(ref instanceof java.lang.String)) {
2993         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2994         java.lang.String s = bs.toStringUtf8();
2995         if (sourceCodeCase_ == 10) {
2996           sourceCode_ = s;
2997         }
2998         return s;
2999       } else {
3000         return (java.lang.String) ref;
3001       }
3002     }
3003     /**
3004      *
3005      *
3006      * <pre>
3007      * Workflow code to be executed. The size limit is 32KB.
3008      * </pre>
3009      *
3010      * <code>string source_contents = 10;</code>
3011      *
3012      * @return The bytes for sourceContents.
3013      */
3014     @java.lang.Override
getSourceContentsBytes()3015     public com.google.protobuf.ByteString getSourceContentsBytes() {
3016       java.lang.Object ref = "";
3017       if (sourceCodeCase_ == 10) {
3018         ref = sourceCode_;
3019       }
3020       if (ref instanceof String) {
3021         com.google.protobuf.ByteString b =
3022             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3023         if (sourceCodeCase_ == 10) {
3024           sourceCode_ = b;
3025         }
3026         return b;
3027       } else {
3028         return (com.google.protobuf.ByteString) ref;
3029       }
3030     }
3031     /**
3032      *
3033      *
3034      * <pre>
3035      * Workflow code to be executed. The size limit is 32KB.
3036      * </pre>
3037      *
3038      * <code>string source_contents = 10;</code>
3039      *
3040      * @param value The sourceContents to set.
3041      * @return This builder for chaining.
3042      */
setSourceContents(java.lang.String value)3043     public Builder setSourceContents(java.lang.String value) {
3044       if (value == null) {
3045         throw new NullPointerException();
3046       }
3047       sourceCodeCase_ = 10;
3048       sourceCode_ = value;
3049       onChanged();
3050       return this;
3051     }
3052     /**
3053      *
3054      *
3055      * <pre>
3056      * Workflow code to be executed. The size limit is 32KB.
3057      * </pre>
3058      *
3059      * <code>string source_contents = 10;</code>
3060      *
3061      * @return This builder for chaining.
3062      */
clearSourceContents()3063     public Builder clearSourceContents() {
3064       if (sourceCodeCase_ == 10) {
3065         sourceCodeCase_ = 0;
3066         sourceCode_ = null;
3067         onChanged();
3068       }
3069       return this;
3070     }
3071     /**
3072      *
3073      *
3074      * <pre>
3075      * Workflow code to be executed. The size limit is 32KB.
3076      * </pre>
3077      *
3078      * <code>string source_contents = 10;</code>
3079      *
3080      * @param value The bytes for sourceContents to set.
3081      * @return This builder for chaining.
3082      */
setSourceContentsBytes(com.google.protobuf.ByteString value)3083     public Builder setSourceContentsBytes(com.google.protobuf.ByteString value) {
3084       if (value == null) {
3085         throw new NullPointerException();
3086       }
3087       checkByteStringIsUtf8(value);
3088       sourceCodeCase_ = 10;
3089       sourceCode_ = value;
3090       onChanged();
3091       return this;
3092     }
3093 
3094     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3095     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
3096       return super.setUnknownFields(unknownFields);
3097     }
3098 
3099     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3100     public final Builder mergeUnknownFields(
3101         final com.google.protobuf.UnknownFieldSet unknownFields) {
3102       return super.mergeUnknownFields(unknownFields);
3103     }
3104 
3105     // @@protoc_insertion_point(builder_scope:google.cloud.workflows.v1beta.Workflow)
3106   }
3107 
3108   // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1beta.Workflow)
3109   private static final com.google.cloud.workflows.v1beta.Workflow DEFAULT_INSTANCE;
3110 
3111   static {
3112     DEFAULT_INSTANCE = new com.google.cloud.workflows.v1beta.Workflow();
3113   }
3114 
getDefaultInstance()3115   public static com.google.cloud.workflows.v1beta.Workflow getDefaultInstance() {
3116     return DEFAULT_INSTANCE;
3117   }
3118 
3119   private static final com.google.protobuf.Parser<Workflow> PARSER =
3120       new com.google.protobuf.AbstractParser<Workflow>() {
3121         @java.lang.Override
3122         public Workflow parsePartialFrom(
3123             com.google.protobuf.CodedInputStream input,
3124             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3125             throws com.google.protobuf.InvalidProtocolBufferException {
3126           Builder builder = newBuilder();
3127           try {
3128             builder.mergeFrom(input, extensionRegistry);
3129           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3130             throw e.setUnfinishedMessage(builder.buildPartial());
3131           } catch (com.google.protobuf.UninitializedMessageException e) {
3132             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
3133           } catch (java.io.IOException e) {
3134             throw new com.google.protobuf.InvalidProtocolBufferException(e)
3135                 .setUnfinishedMessage(builder.buildPartial());
3136           }
3137           return builder.buildPartial();
3138         }
3139       };
3140 
parser()3141   public static com.google.protobuf.Parser<Workflow> parser() {
3142     return PARSER;
3143   }
3144 
3145   @java.lang.Override
getParserForType()3146   public com.google.protobuf.Parser<Workflow> getParserForType() {
3147     return PARSER;
3148   }
3149 
3150   @java.lang.Override
getDefaultInstanceForType()3151   public com.google.cloud.workflows.v1beta.Workflow getDefaultInstanceForType() {
3152     return DEFAULT_INSTANCE;
3153   }
3154 }
3155