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/vizier_service.proto 18 19 package com.google.cloud.aiplatform.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Response message for 26 * [VizierService.CheckTrialEarlyStoppingState][google.cloud.aiplatform.v1.VizierService.CheckTrialEarlyStoppingState]. 27 * </pre> 28 * 29 * Protobuf type {@code google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse} 30 */ 31 public final class CheckTrialEarlyStoppingStateResponse 32 extends com.google.protobuf.GeneratedMessageV3 33 implements 34 // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse) 35 CheckTrialEarlyStoppingStateResponseOrBuilder { 36 private static final long serialVersionUID = 0L; 37 // Use CheckTrialEarlyStoppingStateResponse.newBuilder() to construct. CheckTrialEarlyStoppingStateResponse( com.google.protobuf.GeneratedMessageV3.Builder<?> builder)38 private CheckTrialEarlyStoppingStateResponse( 39 com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 40 super(builder); 41 } 42 CheckTrialEarlyStoppingStateResponse()43 private CheckTrialEarlyStoppingStateResponse() {} 44 45 @java.lang.Override 46 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)47 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 48 return new CheckTrialEarlyStoppingStateResponse(); 49 } 50 51 @java.lang.Override getUnknownFields()52 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 53 return this.unknownFields; 54 } 55 getDescriptor()56 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 57 return com.google.cloud.aiplatform.v1.VizierServiceProto 58 .internal_static_google_cloud_aiplatform_v1_CheckTrialEarlyStoppingStateResponse_descriptor; 59 } 60 61 @java.lang.Override 62 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()63 internalGetFieldAccessorTable() { 64 return com.google.cloud.aiplatform.v1.VizierServiceProto 65 .internal_static_google_cloud_aiplatform_v1_CheckTrialEarlyStoppingStateResponse_fieldAccessorTable 66 .ensureFieldAccessorsInitialized( 67 com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse.class, 68 com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse.Builder.class); 69 } 70 71 public static final int SHOULD_STOP_FIELD_NUMBER = 1; 72 private boolean shouldStop_ = false; 73 /** 74 * 75 * 76 * <pre> 77 * True if the Trial should stop. 78 * </pre> 79 * 80 * <code>bool should_stop = 1;</code> 81 * 82 * @return The shouldStop. 83 */ 84 @java.lang.Override getShouldStop()85 public boolean getShouldStop() { 86 return shouldStop_; 87 } 88 89 private byte memoizedIsInitialized = -1; 90 91 @java.lang.Override isInitialized()92 public final boolean isInitialized() { 93 byte isInitialized = memoizedIsInitialized; 94 if (isInitialized == 1) return true; 95 if (isInitialized == 0) return false; 96 97 memoizedIsInitialized = 1; 98 return true; 99 } 100 101 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)102 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 103 if (shouldStop_ != false) { 104 output.writeBool(1, shouldStop_); 105 } 106 getUnknownFields().writeTo(output); 107 } 108 109 @java.lang.Override getSerializedSize()110 public int getSerializedSize() { 111 int size = memoizedSize; 112 if (size != -1) return size; 113 114 size = 0; 115 if (shouldStop_ != false) { 116 size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, shouldStop_); 117 } 118 size += getUnknownFields().getSerializedSize(); 119 memoizedSize = size; 120 return size; 121 } 122 123 @java.lang.Override equals(final java.lang.Object obj)124 public boolean equals(final java.lang.Object obj) { 125 if (obj == this) { 126 return true; 127 } 128 if (!(obj instanceof com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse)) { 129 return super.equals(obj); 130 } 131 com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse other = 132 (com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse) obj; 133 134 if (getShouldStop() != other.getShouldStop()) return false; 135 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 136 return true; 137 } 138 139 @java.lang.Override hashCode()140 public int hashCode() { 141 if (memoizedHashCode != 0) { 142 return memoizedHashCode; 143 } 144 int hash = 41; 145 hash = (19 * hash) + getDescriptor().hashCode(); 146 hash = (37 * hash) + SHOULD_STOP_FIELD_NUMBER; 147 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getShouldStop()); 148 hash = (29 * hash) + getUnknownFields().hashCode(); 149 memoizedHashCode = hash; 150 return hash; 151 } 152 parseFrom( java.nio.ByteBuffer data)153 public static com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse parseFrom( 154 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 155 return PARSER.parseFrom(data); 156 } 157 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)158 public static com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse parseFrom( 159 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 160 throws com.google.protobuf.InvalidProtocolBufferException { 161 return PARSER.parseFrom(data, extensionRegistry); 162 } 163 parseFrom( com.google.protobuf.ByteString data)164 public static com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse parseFrom( 165 com.google.protobuf.ByteString data) 166 throws com.google.protobuf.InvalidProtocolBufferException { 167 return PARSER.parseFrom(data); 168 } 169 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)170 public static com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse parseFrom( 171 com.google.protobuf.ByteString data, 172 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 173 throws com.google.protobuf.InvalidProtocolBufferException { 174 return PARSER.parseFrom(data, extensionRegistry); 175 } 176 parseFrom( byte[] data)177 public static com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse parseFrom( 178 byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { 179 return PARSER.parseFrom(data); 180 } 181 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)182 public static com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse parseFrom( 183 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 184 throws com.google.protobuf.InvalidProtocolBufferException { 185 return PARSER.parseFrom(data, extensionRegistry); 186 } 187 parseFrom( java.io.InputStream input)188 public static com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse parseFrom( 189 java.io.InputStream input) throws java.io.IOException { 190 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 191 } 192 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)193 public static com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse parseFrom( 194 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 195 throws java.io.IOException { 196 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 197 PARSER, input, extensionRegistry); 198 } 199 200 public static com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse parseDelimitedFrom(java.io.InputStream input)201 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { 202 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 203 } 204 205 public static com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)206 parseDelimitedFrom( 207 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 208 throws java.io.IOException { 209 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 210 PARSER, input, extensionRegistry); 211 } 212 parseFrom( com.google.protobuf.CodedInputStream input)213 public static com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse parseFrom( 214 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 215 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 216 } 217 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)218 public static com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse parseFrom( 219 com.google.protobuf.CodedInputStream input, 220 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 221 throws java.io.IOException { 222 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 223 PARSER, input, extensionRegistry); 224 } 225 226 @java.lang.Override newBuilderForType()227 public Builder newBuilderForType() { 228 return newBuilder(); 229 } 230 newBuilder()231 public static Builder newBuilder() { 232 return DEFAULT_INSTANCE.toBuilder(); 233 } 234 newBuilder( com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse prototype)235 public static Builder newBuilder( 236 com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse prototype) { 237 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 238 } 239 240 @java.lang.Override toBuilder()241 public Builder toBuilder() { 242 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 243 } 244 245 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)246 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 247 Builder builder = new Builder(parent); 248 return builder; 249 } 250 /** 251 * 252 * 253 * <pre> 254 * Response message for 255 * [VizierService.CheckTrialEarlyStoppingState][google.cloud.aiplatform.v1.VizierService.CheckTrialEarlyStoppingState]. 256 * </pre> 257 * 258 * Protobuf type {@code google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse} 259 */ 260 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 261 implements 262 // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse) 263 com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponseOrBuilder { getDescriptor()264 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 265 return com.google.cloud.aiplatform.v1.VizierServiceProto 266 .internal_static_google_cloud_aiplatform_v1_CheckTrialEarlyStoppingStateResponse_descriptor; 267 } 268 269 @java.lang.Override 270 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()271 internalGetFieldAccessorTable() { 272 return com.google.cloud.aiplatform.v1.VizierServiceProto 273 .internal_static_google_cloud_aiplatform_v1_CheckTrialEarlyStoppingStateResponse_fieldAccessorTable 274 .ensureFieldAccessorsInitialized( 275 com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse.class, 276 com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse.Builder.class); 277 } 278 279 // Construct using 280 // com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse.newBuilder() Builder()281 private Builder() {} 282 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)283 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 284 super(parent); 285 } 286 287 @java.lang.Override clear()288 public Builder clear() { 289 super.clear(); 290 bitField0_ = 0; 291 shouldStop_ = false; 292 return this; 293 } 294 295 @java.lang.Override getDescriptorForType()296 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 297 return com.google.cloud.aiplatform.v1.VizierServiceProto 298 .internal_static_google_cloud_aiplatform_v1_CheckTrialEarlyStoppingStateResponse_descriptor; 299 } 300 301 @java.lang.Override 302 public com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse getDefaultInstanceForType()303 getDefaultInstanceForType() { 304 return com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse 305 .getDefaultInstance(); 306 } 307 308 @java.lang.Override build()309 public com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse build() { 310 com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse result = buildPartial(); 311 if (!result.isInitialized()) { 312 throw newUninitializedMessageException(result); 313 } 314 return result; 315 } 316 317 @java.lang.Override buildPartial()318 public com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse buildPartial() { 319 com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse result = 320 new com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse(this); 321 if (bitField0_ != 0) { 322 buildPartial0(result); 323 } 324 onBuilt(); 325 return result; 326 } 327 buildPartial0( com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse result)328 private void buildPartial0( 329 com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse result) { 330 int from_bitField0_ = bitField0_; 331 if (((from_bitField0_ & 0x00000001) != 0)) { 332 result.shouldStop_ = shouldStop_; 333 } 334 } 335 336 @java.lang.Override clone()337 public Builder clone() { 338 return super.clone(); 339 } 340 341 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)342 public Builder setField( 343 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 344 return super.setField(field, value); 345 } 346 347 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)348 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 349 return super.clearField(field); 350 } 351 352 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)353 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 354 return super.clearOneof(oneof); 355 } 356 357 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)358 public Builder setRepeatedField( 359 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 360 return super.setRepeatedField(field, index, value); 361 } 362 363 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)364 public Builder addRepeatedField( 365 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 366 return super.addRepeatedField(field, value); 367 } 368 369 @java.lang.Override mergeFrom(com.google.protobuf.Message other)370 public Builder mergeFrom(com.google.protobuf.Message other) { 371 if (other instanceof com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse) { 372 return mergeFrom( 373 (com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse) other); 374 } else { 375 super.mergeFrom(other); 376 return this; 377 } 378 } 379 mergeFrom( com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse other)380 public Builder mergeFrom( 381 com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse other) { 382 if (other 383 == com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse 384 .getDefaultInstance()) return this; 385 if (other.getShouldStop() != false) { 386 setShouldStop(other.getShouldStop()); 387 } 388 this.mergeUnknownFields(other.getUnknownFields()); 389 onChanged(); 390 return this; 391 } 392 393 @java.lang.Override isInitialized()394 public final boolean isInitialized() { 395 return true; 396 } 397 398 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)399 public Builder mergeFrom( 400 com.google.protobuf.CodedInputStream input, 401 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 402 throws java.io.IOException { 403 if (extensionRegistry == null) { 404 throw new java.lang.NullPointerException(); 405 } 406 try { 407 boolean done = false; 408 while (!done) { 409 int tag = input.readTag(); 410 switch (tag) { 411 case 0: 412 done = true; 413 break; 414 case 8: 415 { 416 shouldStop_ = input.readBool(); 417 bitField0_ |= 0x00000001; 418 break; 419 } // case 8 420 default: 421 { 422 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 423 done = true; // was an endgroup tag 424 } 425 break; 426 } // default: 427 } // switch (tag) 428 } // while (!done) 429 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 430 throw e.unwrapIOException(); 431 } finally { 432 onChanged(); 433 } // finally 434 return this; 435 } 436 437 private int bitField0_; 438 439 private boolean shouldStop_; 440 /** 441 * 442 * 443 * <pre> 444 * True if the Trial should stop. 445 * </pre> 446 * 447 * <code>bool should_stop = 1;</code> 448 * 449 * @return The shouldStop. 450 */ 451 @java.lang.Override getShouldStop()452 public boolean getShouldStop() { 453 return shouldStop_; 454 } 455 /** 456 * 457 * 458 * <pre> 459 * True if the Trial should stop. 460 * </pre> 461 * 462 * <code>bool should_stop = 1;</code> 463 * 464 * @param value The shouldStop to set. 465 * @return This builder for chaining. 466 */ setShouldStop(boolean value)467 public Builder setShouldStop(boolean value) { 468 469 shouldStop_ = value; 470 bitField0_ |= 0x00000001; 471 onChanged(); 472 return this; 473 } 474 /** 475 * 476 * 477 * <pre> 478 * True if the Trial should stop. 479 * </pre> 480 * 481 * <code>bool should_stop = 1;</code> 482 * 483 * @return This builder for chaining. 484 */ clearShouldStop()485 public Builder clearShouldStop() { 486 bitField0_ = (bitField0_ & ~0x00000001); 487 shouldStop_ = false; 488 onChanged(); 489 return this; 490 } 491 492 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)493 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 494 return super.setUnknownFields(unknownFields); 495 } 496 497 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)498 public final Builder mergeUnknownFields( 499 final com.google.protobuf.UnknownFieldSet unknownFields) { 500 return super.mergeUnknownFields(unknownFields); 501 } 502 503 // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse) 504 } 505 506 // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse) 507 private static final com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse 508 DEFAULT_INSTANCE; 509 510 static { 511 DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse(); 512 } 513 514 public static com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse getDefaultInstance()515 getDefaultInstance() { 516 return DEFAULT_INSTANCE; 517 } 518 519 private static final com.google.protobuf.Parser<CheckTrialEarlyStoppingStateResponse> PARSER = 520 new com.google.protobuf.AbstractParser<CheckTrialEarlyStoppingStateResponse>() { 521 @java.lang.Override 522 public CheckTrialEarlyStoppingStateResponse parsePartialFrom( 523 com.google.protobuf.CodedInputStream input, 524 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 525 throws com.google.protobuf.InvalidProtocolBufferException { 526 Builder builder = newBuilder(); 527 try { 528 builder.mergeFrom(input, extensionRegistry); 529 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 530 throw e.setUnfinishedMessage(builder.buildPartial()); 531 } catch (com.google.protobuf.UninitializedMessageException e) { 532 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 533 } catch (java.io.IOException e) { 534 throw new com.google.protobuf.InvalidProtocolBufferException(e) 535 .setUnfinishedMessage(builder.buildPartial()); 536 } 537 return builder.buildPartial(); 538 } 539 }; 540 parser()541 public static com.google.protobuf.Parser<CheckTrialEarlyStoppingStateResponse> parser() { 542 return PARSER; 543 } 544 545 @java.lang.Override getParserForType()546 public com.google.protobuf.Parser<CheckTrialEarlyStoppingStateResponse> getParserForType() { 547 return PARSER; 548 } 549 550 @java.lang.Override 551 public com.google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse getDefaultInstanceForType()552 getDefaultInstanceForType() { 553 return DEFAULT_INSTANCE; 554 } 555 } 556