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