• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/devtools/cloudbuild/v1/cloudbuild.proto
18 
19 package com.google.cloudbuild.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * An artifact that was uploaded during a build. This
26  * is a single record in the artifact manifest JSON file.
27  * </pre>
28  *
29  * Protobuf type {@code google.devtools.cloudbuild.v1.ArtifactResult}
30  */
31 public final class ArtifactResult extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.devtools.cloudbuild.v1.ArtifactResult)
34     ArtifactResultOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use ArtifactResult.newBuilder() to construct.
ArtifactResult(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private ArtifactResult(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
ArtifactResult()41   private ArtifactResult() {
42     location_ = "";
43     fileHash_ = java.util.Collections.emptyList();
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new ArtifactResult();
50   }
51 
52   @java.lang.Override
getUnknownFields()53   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
54     return this.unknownFields;
55   }
56 
getDescriptor()57   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
58     return com.google.cloudbuild.v1.Cloudbuild
59         .internal_static_google_devtools_cloudbuild_v1_ArtifactResult_descriptor;
60   }
61 
62   @java.lang.Override
63   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()64       internalGetFieldAccessorTable() {
65     return com.google.cloudbuild.v1.Cloudbuild
66         .internal_static_google_devtools_cloudbuild_v1_ArtifactResult_fieldAccessorTable
67         .ensureFieldAccessorsInitialized(
68             com.google.cloudbuild.v1.ArtifactResult.class,
69             com.google.cloudbuild.v1.ArtifactResult.Builder.class);
70   }
71 
72   public static final int LOCATION_FIELD_NUMBER = 1;
73 
74   @SuppressWarnings("serial")
75   private volatile java.lang.Object location_ = "";
76   /**
77    *
78    *
79    * <pre>
80    * The path of an artifact in a Google Cloud Storage bucket, with the
81    * generation number. For example,
82    * `gs://mybucket/path/to/output.jar#generation`.
83    * </pre>
84    *
85    * <code>string location = 1;</code>
86    *
87    * @return The location.
88    */
89   @java.lang.Override
getLocation()90   public java.lang.String getLocation() {
91     java.lang.Object ref = location_;
92     if (ref instanceof java.lang.String) {
93       return (java.lang.String) ref;
94     } else {
95       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
96       java.lang.String s = bs.toStringUtf8();
97       location_ = s;
98       return s;
99     }
100   }
101   /**
102    *
103    *
104    * <pre>
105    * The path of an artifact in a Google Cloud Storage bucket, with the
106    * generation number. For example,
107    * `gs://mybucket/path/to/output.jar#generation`.
108    * </pre>
109    *
110    * <code>string location = 1;</code>
111    *
112    * @return The bytes for location.
113    */
114   @java.lang.Override
getLocationBytes()115   public com.google.protobuf.ByteString getLocationBytes() {
116     java.lang.Object ref = location_;
117     if (ref instanceof java.lang.String) {
118       com.google.protobuf.ByteString b =
119           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
120       location_ = b;
121       return b;
122     } else {
123       return (com.google.protobuf.ByteString) ref;
124     }
125   }
126 
127   public static final int FILE_HASH_FIELD_NUMBER = 2;
128 
129   @SuppressWarnings("serial")
130   private java.util.List<com.google.cloudbuild.v1.FileHashes> fileHash_;
131   /**
132    *
133    *
134    * <pre>
135    * The file hash of the artifact.
136    * </pre>
137    *
138    * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
139    */
140   @java.lang.Override
getFileHashList()141   public java.util.List<com.google.cloudbuild.v1.FileHashes> getFileHashList() {
142     return fileHash_;
143   }
144   /**
145    *
146    *
147    * <pre>
148    * The file hash of the artifact.
149    * </pre>
150    *
151    * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
152    */
153   @java.lang.Override
154   public java.util.List<? extends com.google.cloudbuild.v1.FileHashesOrBuilder>
getFileHashOrBuilderList()155       getFileHashOrBuilderList() {
156     return fileHash_;
157   }
158   /**
159    *
160    *
161    * <pre>
162    * The file hash of the artifact.
163    * </pre>
164    *
165    * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
166    */
167   @java.lang.Override
getFileHashCount()168   public int getFileHashCount() {
169     return fileHash_.size();
170   }
171   /**
172    *
173    *
174    * <pre>
175    * The file hash of the artifact.
176    * </pre>
177    *
178    * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
179    */
180   @java.lang.Override
getFileHash(int index)181   public com.google.cloudbuild.v1.FileHashes getFileHash(int index) {
182     return fileHash_.get(index);
183   }
184   /**
185    *
186    *
187    * <pre>
188    * The file hash of the artifact.
189    * </pre>
190    *
191    * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
192    */
193   @java.lang.Override
getFileHashOrBuilder(int index)194   public com.google.cloudbuild.v1.FileHashesOrBuilder getFileHashOrBuilder(int index) {
195     return fileHash_.get(index);
196   }
197 
198   private byte memoizedIsInitialized = -1;
199 
200   @java.lang.Override
isInitialized()201   public final boolean isInitialized() {
202     byte isInitialized = memoizedIsInitialized;
203     if (isInitialized == 1) return true;
204     if (isInitialized == 0) return false;
205 
206     memoizedIsInitialized = 1;
207     return true;
208   }
209 
210   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)211   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
212     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
213       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_);
214     }
215     for (int i = 0; i < fileHash_.size(); i++) {
216       output.writeMessage(2, fileHash_.get(i));
217     }
218     getUnknownFields().writeTo(output);
219   }
220 
221   @java.lang.Override
getSerializedSize()222   public int getSerializedSize() {
223     int size = memoizedSize;
224     if (size != -1) return size;
225 
226     size = 0;
227     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
228       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_);
229     }
230     for (int i = 0; i < fileHash_.size(); i++) {
231       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, fileHash_.get(i));
232     }
233     size += getUnknownFields().getSerializedSize();
234     memoizedSize = size;
235     return size;
236   }
237 
238   @java.lang.Override
equals(final java.lang.Object obj)239   public boolean equals(final java.lang.Object obj) {
240     if (obj == this) {
241       return true;
242     }
243     if (!(obj instanceof com.google.cloudbuild.v1.ArtifactResult)) {
244       return super.equals(obj);
245     }
246     com.google.cloudbuild.v1.ArtifactResult other = (com.google.cloudbuild.v1.ArtifactResult) obj;
247 
248     if (!getLocation().equals(other.getLocation())) return false;
249     if (!getFileHashList().equals(other.getFileHashList())) return false;
250     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
251     return true;
252   }
253 
254   @java.lang.Override
hashCode()255   public int hashCode() {
256     if (memoizedHashCode != 0) {
257       return memoizedHashCode;
258     }
259     int hash = 41;
260     hash = (19 * hash) + getDescriptor().hashCode();
261     hash = (37 * hash) + LOCATION_FIELD_NUMBER;
262     hash = (53 * hash) + getLocation().hashCode();
263     if (getFileHashCount() > 0) {
264       hash = (37 * hash) + FILE_HASH_FIELD_NUMBER;
265       hash = (53 * hash) + getFileHashList().hashCode();
266     }
267     hash = (29 * hash) + getUnknownFields().hashCode();
268     memoizedHashCode = hash;
269     return hash;
270   }
271 
parseFrom(java.nio.ByteBuffer data)272   public static com.google.cloudbuild.v1.ArtifactResult parseFrom(java.nio.ByteBuffer data)
273       throws com.google.protobuf.InvalidProtocolBufferException {
274     return PARSER.parseFrom(data);
275   }
276 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)277   public static com.google.cloudbuild.v1.ArtifactResult parseFrom(
278       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
279       throws com.google.protobuf.InvalidProtocolBufferException {
280     return PARSER.parseFrom(data, extensionRegistry);
281   }
282 
parseFrom( com.google.protobuf.ByteString data)283   public static com.google.cloudbuild.v1.ArtifactResult parseFrom(
284       com.google.protobuf.ByteString data)
285       throws com.google.protobuf.InvalidProtocolBufferException {
286     return PARSER.parseFrom(data);
287   }
288 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)289   public static com.google.cloudbuild.v1.ArtifactResult parseFrom(
290       com.google.protobuf.ByteString data,
291       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
292       throws com.google.protobuf.InvalidProtocolBufferException {
293     return PARSER.parseFrom(data, extensionRegistry);
294   }
295 
parseFrom(byte[] data)296   public static com.google.cloudbuild.v1.ArtifactResult parseFrom(byte[] data)
297       throws com.google.protobuf.InvalidProtocolBufferException {
298     return PARSER.parseFrom(data);
299   }
300 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)301   public static com.google.cloudbuild.v1.ArtifactResult parseFrom(
302       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
303       throws com.google.protobuf.InvalidProtocolBufferException {
304     return PARSER.parseFrom(data, extensionRegistry);
305   }
306 
parseFrom(java.io.InputStream input)307   public static com.google.cloudbuild.v1.ArtifactResult parseFrom(java.io.InputStream input)
308       throws java.io.IOException {
309     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
310   }
311 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)312   public static com.google.cloudbuild.v1.ArtifactResult parseFrom(
313       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
314       throws java.io.IOException {
315     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
316         PARSER, input, extensionRegistry);
317   }
318 
parseDelimitedFrom( java.io.InputStream input)319   public static com.google.cloudbuild.v1.ArtifactResult parseDelimitedFrom(
320       java.io.InputStream input) throws java.io.IOException {
321     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
322   }
323 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)324   public static com.google.cloudbuild.v1.ArtifactResult parseDelimitedFrom(
325       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
326       throws java.io.IOException {
327     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
328         PARSER, input, extensionRegistry);
329   }
330 
parseFrom( com.google.protobuf.CodedInputStream input)331   public static com.google.cloudbuild.v1.ArtifactResult parseFrom(
332       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
333     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
334   }
335 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)336   public static com.google.cloudbuild.v1.ArtifactResult parseFrom(
337       com.google.protobuf.CodedInputStream input,
338       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
339       throws java.io.IOException {
340     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
341         PARSER, input, extensionRegistry);
342   }
343 
344   @java.lang.Override
newBuilderForType()345   public Builder newBuilderForType() {
346     return newBuilder();
347   }
348 
newBuilder()349   public static Builder newBuilder() {
350     return DEFAULT_INSTANCE.toBuilder();
351   }
352 
newBuilder(com.google.cloudbuild.v1.ArtifactResult prototype)353   public static Builder newBuilder(com.google.cloudbuild.v1.ArtifactResult prototype) {
354     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
355   }
356 
357   @java.lang.Override
toBuilder()358   public Builder toBuilder() {
359     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
360   }
361 
362   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)363   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
364     Builder builder = new Builder(parent);
365     return builder;
366   }
367   /**
368    *
369    *
370    * <pre>
371    * An artifact that was uploaded during a build. This
372    * is a single record in the artifact manifest JSON file.
373    * </pre>
374    *
375    * Protobuf type {@code google.devtools.cloudbuild.v1.ArtifactResult}
376    */
377   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
378       implements
379       // @@protoc_insertion_point(builder_implements:google.devtools.cloudbuild.v1.ArtifactResult)
380       com.google.cloudbuild.v1.ArtifactResultOrBuilder {
getDescriptor()381     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
382       return com.google.cloudbuild.v1.Cloudbuild
383           .internal_static_google_devtools_cloudbuild_v1_ArtifactResult_descriptor;
384     }
385 
386     @java.lang.Override
387     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()388         internalGetFieldAccessorTable() {
389       return com.google.cloudbuild.v1.Cloudbuild
390           .internal_static_google_devtools_cloudbuild_v1_ArtifactResult_fieldAccessorTable
391           .ensureFieldAccessorsInitialized(
392               com.google.cloudbuild.v1.ArtifactResult.class,
393               com.google.cloudbuild.v1.ArtifactResult.Builder.class);
394     }
395 
396     // Construct using com.google.cloudbuild.v1.ArtifactResult.newBuilder()
Builder()397     private Builder() {}
398 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)399     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
400       super(parent);
401     }
402 
403     @java.lang.Override
clear()404     public Builder clear() {
405       super.clear();
406       bitField0_ = 0;
407       location_ = "";
408       if (fileHashBuilder_ == null) {
409         fileHash_ = java.util.Collections.emptyList();
410       } else {
411         fileHash_ = null;
412         fileHashBuilder_.clear();
413       }
414       bitField0_ = (bitField0_ & ~0x00000002);
415       return this;
416     }
417 
418     @java.lang.Override
getDescriptorForType()419     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
420       return com.google.cloudbuild.v1.Cloudbuild
421           .internal_static_google_devtools_cloudbuild_v1_ArtifactResult_descriptor;
422     }
423 
424     @java.lang.Override
getDefaultInstanceForType()425     public com.google.cloudbuild.v1.ArtifactResult getDefaultInstanceForType() {
426       return com.google.cloudbuild.v1.ArtifactResult.getDefaultInstance();
427     }
428 
429     @java.lang.Override
build()430     public com.google.cloudbuild.v1.ArtifactResult build() {
431       com.google.cloudbuild.v1.ArtifactResult result = buildPartial();
432       if (!result.isInitialized()) {
433         throw newUninitializedMessageException(result);
434       }
435       return result;
436     }
437 
438     @java.lang.Override
buildPartial()439     public com.google.cloudbuild.v1.ArtifactResult buildPartial() {
440       com.google.cloudbuild.v1.ArtifactResult result =
441           new com.google.cloudbuild.v1.ArtifactResult(this);
442       buildPartialRepeatedFields(result);
443       if (bitField0_ != 0) {
444         buildPartial0(result);
445       }
446       onBuilt();
447       return result;
448     }
449 
buildPartialRepeatedFields(com.google.cloudbuild.v1.ArtifactResult result)450     private void buildPartialRepeatedFields(com.google.cloudbuild.v1.ArtifactResult result) {
451       if (fileHashBuilder_ == null) {
452         if (((bitField0_ & 0x00000002) != 0)) {
453           fileHash_ = java.util.Collections.unmodifiableList(fileHash_);
454           bitField0_ = (bitField0_ & ~0x00000002);
455         }
456         result.fileHash_ = fileHash_;
457       } else {
458         result.fileHash_ = fileHashBuilder_.build();
459       }
460     }
461 
buildPartial0(com.google.cloudbuild.v1.ArtifactResult result)462     private void buildPartial0(com.google.cloudbuild.v1.ArtifactResult result) {
463       int from_bitField0_ = bitField0_;
464       if (((from_bitField0_ & 0x00000001) != 0)) {
465         result.location_ = location_;
466       }
467     }
468 
469     @java.lang.Override
clone()470     public Builder clone() {
471       return super.clone();
472     }
473 
474     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)475     public Builder setField(
476         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
477       return super.setField(field, value);
478     }
479 
480     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)481     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
482       return super.clearField(field);
483     }
484 
485     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)486     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
487       return super.clearOneof(oneof);
488     }
489 
490     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)491     public Builder setRepeatedField(
492         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
493       return super.setRepeatedField(field, index, value);
494     }
495 
496     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)497     public Builder addRepeatedField(
498         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
499       return super.addRepeatedField(field, value);
500     }
501 
502     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)503     public Builder mergeFrom(com.google.protobuf.Message other) {
504       if (other instanceof com.google.cloudbuild.v1.ArtifactResult) {
505         return mergeFrom((com.google.cloudbuild.v1.ArtifactResult) other);
506       } else {
507         super.mergeFrom(other);
508         return this;
509       }
510     }
511 
mergeFrom(com.google.cloudbuild.v1.ArtifactResult other)512     public Builder mergeFrom(com.google.cloudbuild.v1.ArtifactResult other) {
513       if (other == com.google.cloudbuild.v1.ArtifactResult.getDefaultInstance()) return this;
514       if (!other.getLocation().isEmpty()) {
515         location_ = other.location_;
516         bitField0_ |= 0x00000001;
517         onChanged();
518       }
519       if (fileHashBuilder_ == null) {
520         if (!other.fileHash_.isEmpty()) {
521           if (fileHash_.isEmpty()) {
522             fileHash_ = other.fileHash_;
523             bitField0_ = (bitField0_ & ~0x00000002);
524           } else {
525             ensureFileHashIsMutable();
526             fileHash_.addAll(other.fileHash_);
527           }
528           onChanged();
529         }
530       } else {
531         if (!other.fileHash_.isEmpty()) {
532           if (fileHashBuilder_.isEmpty()) {
533             fileHashBuilder_.dispose();
534             fileHashBuilder_ = null;
535             fileHash_ = other.fileHash_;
536             bitField0_ = (bitField0_ & ~0x00000002);
537             fileHashBuilder_ =
538                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
539                     ? getFileHashFieldBuilder()
540                     : null;
541           } else {
542             fileHashBuilder_.addAllMessages(other.fileHash_);
543           }
544         }
545       }
546       this.mergeUnknownFields(other.getUnknownFields());
547       onChanged();
548       return this;
549     }
550 
551     @java.lang.Override
isInitialized()552     public final boolean isInitialized() {
553       return true;
554     }
555 
556     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)557     public Builder mergeFrom(
558         com.google.protobuf.CodedInputStream input,
559         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
560         throws java.io.IOException {
561       if (extensionRegistry == null) {
562         throw new java.lang.NullPointerException();
563       }
564       try {
565         boolean done = false;
566         while (!done) {
567           int tag = input.readTag();
568           switch (tag) {
569             case 0:
570               done = true;
571               break;
572             case 10:
573               {
574                 location_ = input.readStringRequireUtf8();
575                 bitField0_ |= 0x00000001;
576                 break;
577               } // case 10
578             case 18:
579               {
580                 com.google.cloudbuild.v1.FileHashes m =
581                     input.readMessage(
582                         com.google.cloudbuild.v1.FileHashes.parser(), extensionRegistry);
583                 if (fileHashBuilder_ == null) {
584                   ensureFileHashIsMutable();
585                   fileHash_.add(m);
586                 } else {
587                   fileHashBuilder_.addMessage(m);
588                 }
589                 break;
590               } // case 18
591             default:
592               {
593                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
594                   done = true; // was an endgroup tag
595                 }
596                 break;
597               } // default:
598           } // switch (tag)
599         } // while (!done)
600       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
601         throw e.unwrapIOException();
602       } finally {
603         onChanged();
604       } // finally
605       return this;
606     }
607 
608     private int bitField0_;
609 
610     private java.lang.Object location_ = "";
611     /**
612      *
613      *
614      * <pre>
615      * The path of an artifact in a Google Cloud Storage bucket, with the
616      * generation number. For example,
617      * `gs://mybucket/path/to/output.jar#generation`.
618      * </pre>
619      *
620      * <code>string location = 1;</code>
621      *
622      * @return The location.
623      */
getLocation()624     public java.lang.String getLocation() {
625       java.lang.Object ref = location_;
626       if (!(ref instanceof java.lang.String)) {
627         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
628         java.lang.String s = bs.toStringUtf8();
629         location_ = s;
630         return s;
631       } else {
632         return (java.lang.String) ref;
633       }
634     }
635     /**
636      *
637      *
638      * <pre>
639      * The path of an artifact in a Google Cloud Storage bucket, with the
640      * generation number. For example,
641      * `gs://mybucket/path/to/output.jar#generation`.
642      * </pre>
643      *
644      * <code>string location = 1;</code>
645      *
646      * @return The bytes for location.
647      */
getLocationBytes()648     public com.google.protobuf.ByteString getLocationBytes() {
649       java.lang.Object ref = location_;
650       if (ref instanceof String) {
651         com.google.protobuf.ByteString b =
652             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
653         location_ = b;
654         return b;
655       } else {
656         return (com.google.protobuf.ByteString) ref;
657       }
658     }
659     /**
660      *
661      *
662      * <pre>
663      * The path of an artifact in a Google Cloud Storage bucket, with the
664      * generation number. For example,
665      * `gs://mybucket/path/to/output.jar#generation`.
666      * </pre>
667      *
668      * <code>string location = 1;</code>
669      *
670      * @param value The location to set.
671      * @return This builder for chaining.
672      */
setLocation(java.lang.String value)673     public Builder setLocation(java.lang.String value) {
674       if (value == null) {
675         throw new NullPointerException();
676       }
677       location_ = value;
678       bitField0_ |= 0x00000001;
679       onChanged();
680       return this;
681     }
682     /**
683      *
684      *
685      * <pre>
686      * The path of an artifact in a Google Cloud Storage bucket, with the
687      * generation number. For example,
688      * `gs://mybucket/path/to/output.jar#generation`.
689      * </pre>
690      *
691      * <code>string location = 1;</code>
692      *
693      * @return This builder for chaining.
694      */
clearLocation()695     public Builder clearLocation() {
696       location_ = getDefaultInstance().getLocation();
697       bitField0_ = (bitField0_ & ~0x00000001);
698       onChanged();
699       return this;
700     }
701     /**
702      *
703      *
704      * <pre>
705      * The path of an artifact in a Google Cloud Storage bucket, with the
706      * generation number. For example,
707      * `gs://mybucket/path/to/output.jar#generation`.
708      * </pre>
709      *
710      * <code>string location = 1;</code>
711      *
712      * @param value The bytes for location to set.
713      * @return This builder for chaining.
714      */
setLocationBytes(com.google.protobuf.ByteString value)715     public Builder setLocationBytes(com.google.protobuf.ByteString value) {
716       if (value == null) {
717         throw new NullPointerException();
718       }
719       checkByteStringIsUtf8(value);
720       location_ = value;
721       bitField0_ |= 0x00000001;
722       onChanged();
723       return this;
724     }
725 
726     private java.util.List<com.google.cloudbuild.v1.FileHashes> fileHash_ =
727         java.util.Collections.emptyList();
728 
ensureFileHashIsMutable()729     private void ensureFileHashIsMutable() {
730       if (!((bitField0_ & 0x00000002) != 0)) {
731         fileHash_ = new java.util.ArrayList<com.google.cloudbuild.v1.FileHashes>(fileHash_);
732         bitField0_ |= 0x00000002;
733       }
734     }
735 
736     private com.google.protobuf.RepeatedFieldBuilderV3<
737             com.google.cloudbuild.v1.FileHashes,
738             com.google.cloudbuild.v1.FileHashes.Builder,
739             com.google.cloudbuild.v1.FileHashesOrBuilder>
740         fileHashBuilder_;
741 
742     /**
743      *
744      *
745      * <pre>
746      * The file hash of the artifact.
747      * </pre>
748      *
749      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
750      */
getFileHashList()751     public java.util.List<com.google.cloudbuild.v1.FileHashes> getFileHashList() {
752       if (fileHashBuilder_ == null) {
753         return java.util.Collections.unmodifiableList(fileHash_);
754       } else {
755         return fileHashBuilder_.getMessageList();
756       }
757     }
758     /**
759      *
760      *
761      * <pre>
762      * The file hash of the artifact.
763      * </pre>
764      *
765      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
766      */
getFileHashCount()767     public int getFileHashCount() {
768       if (fileHashBuilder_ == null) {
769         return fileHash_.size();
770       } else {
771         return fileHashBuilder_.getCount();
772       }
773     }
774     /**
775      *
776      *
777      * <pre>
778      * The file hash of the artifact.
779      * </pre>
780      *
781      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
782      */
getFileHash(int index)783     public com.google.cloudbuild.v1.FileHashes getFileHash(int index) {
784       if (fileHashBuilder_ == null) {
785         return fileHash_.get(index);
786       } else {
787         return fileHashBuilder_.getMessage(index);
788       }
789     }
790     /**
791      *
792      *
793      * <pre>
794      * The file hash of the artifact.
795      * </pre>
796      *
797      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
798      */
setFileHash(int index, com.google.cloudbuild.v1.FileHashes value)799     public Builder setFileHash(int index, com.google.cloudbuild.v1.FileHashes value) {
800       if (fileHashBuilder_ == null) {
801         if (value == null) {
802           throw new NullPointerException();
803         }
804         ensureFileHashIsMutable();
805         fileHash_.set(index, value);
806         onChanged();
807       } else {
808         fileHashBuilder_.setMessage(index, value);
809       }
810       return this;
811     }
812     /**
813      *
814      *
815      * <pre>
816      * The file hash of the artifact.
817      * </pre>
818      *
819      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
820      */
setFileHash( int index, com.google.cloudbuild.v1.FileHashes.Builder builderForValue)821     public Builder setFileHash(
822         int index, com.google.cloudbuild.v1.FileHashes.Builder builderForValue) {
823       if (fileHashBuilder_ == null) {
824         ensureFileHashIsMutable();
825         fileHash_.set(index, builderForValue.build());
826         onChanged();
827       } else {
828         fileHashBuilder_.setMessage(index, builderForValue.build());
829       }
830       return this;
831     }
832     /**
833      *
834      *
835      * <pre>
836      * The file hash of the artifact.
837      * </pre>
838      *
839      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
840      */
addFileHash(com.google.cloudbuild.v1.FileHashes value)841     public Builder addFileHash(com.google.cloudbuild.v1.FileHashes value) {
842       if (fileHashBuilder_ == null) {
843         if (value == null) {
844           throw new NullPointerException();
845         }
846         ensureFileHashIsMutable();
847         fileHash_.add(value);
848         onChanged();
849       } else {
850         fileHashBuilder_.addMessage(value);
851       }
852       return this;
853     }
854     /**
855      *
856      *
857      * <pre>
858      * The file hash of the artifact.
859      * </pre>
860      *
861      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
862      */
addFileHash(int index, com.google.cloudbuild.v1.FileHashes value)863     public Builder addFileHash(int index, com.google.cloudbuild.v1.FileHashes value) {
864       if (fileHashBuilder_ == null) {
865         if (value == null) {
866           throw new NullPointerException();
867         }
868         ensureFileHashIsMutable();
869         fileHash_.add(index, value);
870         onChanged();
871       } else {
872         fileHashBuilder_.addMessage(index, value);
873       }
874       return this;
875     }
876     /**
877      *
878      *
879      * <pre>
880      * The file hash of the artifact.
881      * </pre>
882      *
883      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
884      */
addFileHash(com.google.cloudbuild.v1.FileHashes.Builder builderForValue)885     public Builder addFileHash(com.google.cloudbuild.v1.FileHashes.Builder builderForValue) {
886       if (fileHashBuilder_ == null) {
887         ensureFileHashIsMutable();
888         fileHash_.add(builderForValue.build());
889         onChanged();
890       } else {
891         fileHashBuilder_.addMessage(builderForValue.build());
892       }
893       return this;
894     }
895     /**
896      *
897      *
898      * <pre>
899      * The file hash of the artifact.
900      * </pre>
901      *
902      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
903      */
addFileHash( int index, com.google.cloudbuild.v1.FileHashes.Builder builderForValue)904     public Builder addFileHash(
905         int index, com.google.cloudbuild.v1.FileHashes.Builder builderForValue) {
906       if (fileHashBuilder_ == null) {
907         ensureFileHashIsMutable();
908         fileHash_.add(index, builderForValue.build());
909         onChanged();
910       } else {
911         fileHashBuilder_.addMessage(index, builderForValue.build());
912       }
913       return this;
914     }
915     /**
916      *
917      *
918      * <pre>
919      * The file hash of the artifact.
920      * </pre>
921      *
922      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
923      */
addAllFileHash( java.lang.Iterable<? extends com.google.cloudbuild.v1.FileHashes> values)924     public Builder addAllFileHash(
925         java.lang.Iterable<? extends com.google.cloudbuild.v1.FileHashes> values) {
926       if (fileHashBuilder_ == null) {
927         ensureFileHashIsMutable();
928         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fileHash_);
929         onChanged();
930       } else {
931         fileHashBuilder_.addAllMessages(values);
932       }
933       return this;
934     }
935     /**
936      *
937      *
938      * <pre>
939      * The file hash of the artifact.
940      * </pre>
941      *
942      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
943      */
clearFileHash()944     public Builder clearFileHash() {
945       if (fileHashBuilder_ == null) {
946         fileHash_ = java.util.Collections.emptyList();
947         bitField0_ = (bitField0_ & ~0x00000002);
948         onChanged();
949       } else {
950         fileHashBuilder_.clear();
951       }
952       return this;
953     }
954     /**
955      *
956      *
957      * <pre>
958      * The file hash of the artifact.
959      * </pre>
960      *
961      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
962      */
removeFileHash(int index)963     public Builder removeFileHash(int index) {
964       if (fileHashBuilder_ == null) {
965         ensureFileHashIsMutable();
966         fileHash_.remove(index);
967         onChanged();
968       } else {
969         fileHashBuilder_.remove(index);
970       }
971       return this;
972     }
973     /**
974      *
975      *
976      * <pre>
977      * The file hash of the artifact.
978      * </pre>
979      *
980      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
981      */
getFileHashBuilder(int index)982     public com.google.cloudbuild.v1.FileHashes.Builder getFileHashBuilder(int index) {
983       return getFileHashFieldBuilder().getBuilder(index);
984     }
985     /**
986      *
987      *
988      * <pre>
989      * The file hash of the artifact.
990      * </pre>
991      *
992      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
993      */
getFileHashOrBuilder(int index)994     public com.google.cloudbuild.v1.FileHashesOrBuilder getFileHashOrBuilder(int index) {
995       if (fileHashBuilder_ == null) {
996         return fileHash_.get(index);
997       } else {
998         return fileHashBuilder_.getMessageOrBuilder(index);
999       }
1000     }
1001     /**
1002      *
1003      *
1004      * <pre>
1005      * The file hash of the artifact.
1006      * </pre>
1007      *
1008      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
1009      */
1010     public java.util.List<? extends com.google.cloudbuild.v1.FileHashesOrBuilder>
getFileHashOrBuilderList()1011         getFileHashOrBuilderList() {
1012       if (fileHashBuilder_ != null) {
1013         return fileHashBuilder_.getMessageOrBuilderList();
1014       } else {
1015         return java.util.Collections.unmodifiableList(fileHash_);
1016       }
1017     }
1018     /**
1019      *
1020      *
1021      * <pre>
1022      * The file hash of the artifact.
1023      * </pre>
1024      *
1025      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
1026      */
addFileHashBuilder()1027     public com.google.cloudbuild.v1.FileHashes.Builder addFileHashBuilder() {
1028       return getFileHashFieldBuilder()
1029           .addBuilder(com.google.cloudbuild.v1.FileHashes.getDefaultInstance());
1030     }
1031     /**
1032      *
1033      *
1034      * <pre>
1035      * The file hash of the artifact.
1036      * </pre>
1037      *
1038      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
1039      */
addFileHashBuilder(int index)1040     public com.google.cloudbuild.v1.FileHashes.Builder addFileHashBuilder(int index) {
1041       return getFileHashFieldBuilder()
1042           .addBuilder(index, com.google.cloudbuild.v1.FileHashes.getDefaultInstance());
1043     }
1044     /**
1045      *
1046      *
1047      * <pre>
1048      * The file hash of the artifact.
1049      * </pre>
1050      *
1051      * <code>repeated .google.devtools.cloudbuild.v1.FileHashes file_hash = 2;</code>
1052      */
getFileHashBuilderList()1053     public java.util.List<com.google.cloudbuild.v1.FileHashes.Builder> getFileHashBuilderList() {
1054       return getFileHashFieldBuilder().getBuilderList();
1055     }
1056 
1057     private com.google.protobuf.RepeatedFieldBuilderV3<
1058             com.google.cloudbuild.v1.FileHashes,
1059             com.google.cloudbuild.v1.FileHashes.Builder,
1060             com.google.cloudbuild.v1.FileHashesOrBuilder>
getFileHashFieldBuilder()1061         getFileHashFieldBuilder() {
1062       if (fileHashBuilder_ == null) {
1063         fileHashBuilder_ =
1064             new com.google.protobuf.RepeatedFieldBuilderV3<
1065                 com.google.cloudbuild.v1.FileHashes,
1066                 com.google.cloudbuild.v1.FileHashes.Builder,
1067                 com.google.cloudbuild.v1.FileHashesOrBuilder>(
1068                 fileHash_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
1069         fileHash_ = null;
1070       }
1071       return fileHashBuilder_;
1072     }
1073 
1074     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1075     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1076       return super.setUnknownFields(unknownFields);
1077     }
1078 
1079     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1080     public final Builder mergeUnknownFields(
1081         final com.google.protobuf.UnknownFieldSet unknownFields) {
1082       return super.mergeUnknownFields(unknownFields);
1083     }
1084 
1085     // @@protoc_insertion_point(builder_scope:google.devtools.cloudbuild.v1.ArtifactResult)
1086   }
1087 
1088   // @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.ArtifactResult)
1089   private static final com.google.cloudbuild.v1.ArtifactResult DEFAULT_INSTANCE;
1090 
1091   static {
1092     DEFAULT_INSTANCE = new com.google.cloudbuild.v1.ArtifactResult();
1093   }
1094 
getDefaultInstance()1095   public static com.google.cloudbuild.v1.ArtifactResult getDefaultInstance() {
1096     return DEFAULT_INSTANCE;
1097   }
1098 
1099   private static final com.google.protobuf.Parser<ArtifactResult> PARSER =
1100       new com.google.protobuf.AbstractParser<ArtifactResult>() {
1101         @java.lang.Override
1102         public ArtifactResult parsePartialFrom(
1103             com.google.protobuf.CodedInputStream input,
1104             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1105             throws com.google.protobuf.InvalidProtocolBufferException {
1106           Builder builder = newBuilder();
1107           try {
1108             builder.mergeFrom(input, extensionRegistry);
1109           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1110             throw e.setUnfinishedMessage(builder.buildPartial());
1111           } catch (com.google.protobuf.UninitializedMessageException e) {
1112             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1113           } catch (java.io.IOException e) {
1114             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1115                 .setUnfinishedMessage(builder.buildPartial());
1116           }
1117           return builder.buildPartial();
1118         }
1119       };
1120 
parser()1121   public static com.google.protobuf.Parser<ArtifactResult> parser() {
1122     return PARSER;
1123   }
1124 
1125   @java.lang.Override
getParserForType()1126   public com.google.protobuf.Parser<ArtifactResult> getParserForType() {
1127     return PARSER;
1128   }
1129 
1130   @java.lang.Override
getDefaultInstanceForType()1131   public com.google.cloudbuild.v1.ArtifactResult getDefaultInstanceForType() {
1132     return DEFAULT_INSTANCE;
1133   }
1134 }
1135