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/tasks/v2beta3/target.proto 18 19 package com.google.cloud.tasks.v2beta3; 20 21 /** 22 * 23 * 24 * <pre> 25 * App Engine Routing. 26 * Defines routing characteristics specific to App Engine - service, version, 27 * and instance. 28 * For more information about services, versions, and instances see 29 * [An Overview of App 30 * Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), 31 * [Microservices Architecture on Google App 32 * Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), 33 * [App Engine Standard request 34 * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), 35 * and [App Engine Flex request 36 * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). 37 * </pre> 38 * 39 * Protobuf type {@code google.cloud.tasks.v2beta3.AppEngineRouting} 40 */ 41 public final class AppEngineRouting extends com.google.protobuf.GeneratedMessageV3 42 implements 43 // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta3.AppEngineRouting) 44 AppEngineRoutingOrBuilder { 45 private static final long serialVersionUID = 0L; 46 // Use AppEngineRouting.newBuilder() to construct. AppEngineRouting(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)47 private AppEngineRouting(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 48 super(builder); 49 } 50 AppEngineRouting()51 private AppEngineRouting() { 52 service_ = ""; 53 version_ = ""; 54 instance_ = ""; 55 host_ = ""; 56 } 57 58 @java.lang.Override 59 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)60 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 61 return new AppEngineRouting(); 62 } 63 64 @java.lang.Override getUnknownFields()65 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 66 return this.unknownFields; 67 } 68 getDescriptor()69 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 70 return com.google.cloud.tasks.v2beta3.TargetProto 71 .internal_static_google_cloud_tasks_v2beta3_AppEngineRouting_descriptor; 72 } 73 74 @java.lang.Override 75 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()76 internalGetFieldAccessorTable() { 77 return com.google.cloud.tasks.v2beta3.TargetProto 78 .internal_static_google_cloud_tasks_v2beta3_AppEngineRouting_fieldAccessorTable 79 .ensureFieldAccessorsInitialized( 80 com.google.cloud.tasks.v2beta3.AppEngineRouting.class, 81 com.google.cloud.tasks.v2beta3.AppEngineRouting.Builder.class); 82 } 83 84 public static final int SERVICE_FIELD_NUMBER = 1; 85 86 @SuppressWarnings("serial") 87 private volatile java.lang.Object service_ = ""; 88 /** 89 * 90 * 91 * <pre> 92 * App service. 93 * By default, the task is sent to the service which is the default 94 * service when the task is attempted. 95 * For some queues or tasks which were created using the App Engine 96 * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is 97 * not parsable into 98 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 99 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 100 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For 101 * example, some tasks which were created using the App Engine SDK use a 102 * custom domain name; custom domains are not parsed by Cloud Tasks. If 103 * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, 104 * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 105 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 106 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the 107 * empty string. 108 * </pre> 109 * 110 * <code>string service = 1;</code> 111 * 112 * @return The service. 113 */ 114 @java.lang.Override getService()115 public java.lang.String getService() { 116 java.lang.Object ref = service_; 117 if (ref instanceof java.lang.String) { 118 return (java.lang.String) ref; 119 } else { 120 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 121 java.lang.String s = bs.toStringUtf8(); 122 service_ = s; 123 return s; 124 } 125 } 126 /** 127 * 128 * 129 * <pre> 130 * App service. 131 * By default, the task is sent to the service which is the default 132 * service when the task is attempted. 133 * For some queues or tasks which were created using the App Engine 134 * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is 135 * not parsable into 136 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 137 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 138 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For 139 * example, some tasks which were created using the App Engine SDK use a 140 * custom domain name; custom domains are not parsed by Cloud Tasks. If 141 * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, 142 * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 143 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 144 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the 145 * empty string. 146 * </pre> 147 * 148 * <code>string service = 1;</code> 149 * 150 * @return The bytes for service. 151 */ 152 @java.lang.Override getServiceBytes()153 public com.google.protobuf.ByteString getServiceBytes() { 154 java.lang.Object ref = service_; 155 if (ref instanceof java.lang.String) { 156 com.google.protobuf.ByteString b = 157 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 158 service_ = b; 159 return b; 160 } else { 161 return (com.google.protobuf.ByteString) ref; 162 } 163 } 164 165 public static final int VERSION_FIELD_NUMBER = 2; 166 167 @SuppressWarnings("serial") 168 private volatile java.lang.Object version_ = ""; 169 /** 170 * 171 * 172 * <pre> 173 * App version. 174 * By default, the task is sent to the version which is the default 175 * version when the task is attempted. 176 * For some queues or tasks which were created using the App Engine 177 * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is 178 * not parsable into 179 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 180 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 181 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For 182 * example, some tasks which were created using the App Engine SDK use a 183 * custom domain name; custom domains are not parsed by Cloud Tasks. If 184 * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, 185 * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 186 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 187 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the 188 * empty string. 189 * </pre> 190 * 191 * <code>string version = 2;</code> 192 * 193 * @return The version. 194 */ 195 @java.lang.Override getVersion()196 public java.lang.String getVersion() { 197 java.lang.Object ref = version_; 198 if (ref instanceof java.lang.String) { 199 return (java.lang.String) ref; 200 } else { 201 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 202 java.lang.String s = bs.toStringUtf8(); 203 version_ = s; 204 return s; 205 } 206 } 207 /** 208 * 209 * 210 * <pre> 211 * App version. 212 * By default, the task is sent to the version which is the default 213 * version when the task is attempted. 214 * For some queues or tasks which were created using the App Engine 215 * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is 216 * not parsable into 217 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 218 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 219 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For 220 * example, some tasks which were created using the App Engine SDK use a 221 * custom domain name; custom domains are not parsed by Cloud Tasks. If 222 * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, 223 * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 224 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 225 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the 226 * empty string. 227 * </pre> 228 * 229 * <code>string version = 2;</code> 230 * 231 * @return The bytes for version. 232 */ 233 @java.lang.Override getVersionBytes()234 public com.google.protobuf.ByteString getVersionBytes() { 235 java.lang.Object ref = version_; 236 if (ref instanceof java.lang.String) { 237 com.google.protobuf.ByteString b = 238 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 239 version_ = b; 240 return b; 241 } else { 242 return (com.google.protobuf.ByteString) ref; 243 } 244 } 245 246 public static final int INSTANCE_FIELD_NUMBER = 3; 247 248 @SuppressWarnings("serial") 249 private volatile java.lang.Object instance_ = ""; 250 /** 251 * 252 * 253 * <pre> 254 * App instance. 255 * By default, the task is sent to an instance which is available when 256 * the task is attempted. 257 * Requests can only be sent to a specific instance if 258 * [manual scaling is used in App Engine 259 * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). 260 * App Engine Flex does not support instances. For more information, see 261 * [App Engine Standard request 262 * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) 263 * and [App Engine Flex request 264 * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). 265 * </pre> 266 * 267 * <code>string instance = 3;</code> 268 * 269 * @return The instance. 270 */ 271 @java.lang.Override getInstance()272 public java.lang.String getInstance() { 273 java.lang.Object ref = instance_; 274 if (ref instanceof java.lang.String) { 275 return (java.lang.String) ref; 276 } else { 277 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 278 java.lang.String s = bs.toStringUtf8(); 279 instance_ = s; 280 return s; 281 } 282 } 283 /** 284 * 285 * 286 * <pre> 287 * App instance. 288 * By default, the task is sent to an instance which is available when 289 * the task is attempted. 290 * Requests can only be sent to a specific instance if 291 * [manual scaling is used in App Engine 292 * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). 293 * App Engine Flex does not support instances. For more information, see 294 * [App Engine Standard request 295 * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) 296 * and [App Engine Flex request 297 * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). 298 * </pre> 299 * 300 * <code>string instance = 3;</code> 301 * 302 * @return The bytes for instance. 303 */ 304 @java.lang.Override getInstanceBytes()305 public com.google.protobuf.ByteString getInstanceBytes() { 306 java.lang.Object ref = instance_; 307 if (ref instanceof java.lang.String) { 308 com.google.protobuf.ByteString b = 309 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 310 instance_ = b; 311 return b; 312 } else { 313 return (com.google.protobuf.ByteString) ref; 314 } 315 } 316 317 public static final int HOST_FIELD_NUMBER = 4; 318 319 @SuppressWarnings("serial") 320 private volatile java.lang.Object host_ = ""; 321 /** 322 * 323 * 324 * <pre> 325 * Output only. The host that the task is sent to. 326 * The host is constructed from the domain name of the app associated with 327 * the queue's project ID (for example <app-id>.appspot.com), and the 328 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 329 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 330 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks 331 * which were created using the App Engine SDK might have a custom domain 332 * name. 333 * For more information, see 334 * [How Requests are 335 * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). 336 * </pre> 337 * 338 * <code>string host = 4;</code> 339 * 340 * @return The host. 341 */ 342 @java.lang.Override getHost()343 public java.lang.String getHost() { 344 java.lang.Object ref = host_; 345 if (ref instanceof java.lang.String) { 346 return (java.lang.String) ref; 347 } else { 348 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 349 java.lang.String s = bs.toStringUtf8(); 350 host_ = s; 351 return s; 352 } 353 } 354 /** 355 * 356 * 357 * <pre> 358 * Output only. The host that the task is sent to. 359 * The host is constructed from the domain name of the app associated with 360 * the queue's project ID (for example <app-id>.appspot.com), and the 361 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 362 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 363 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks 364 * which were created using the App Engine SDK might have a custom domain 365 * name. 366 * For more information, see 367 * [How Requests are 368 * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). 369 * </pre> 370 * 371 * <code>string host = 4;</code> 372 * 373 * @return The bytes for host. 374 */ 375 @java.lang.Override getHostBytes()376 public com.google.protobuf.ByteString getHostBytes() { 377 java.lang.Object ref = host_; 378 if (ref instanceof java.lang.String) { 379 com.google.protobuf.ByteString b = 380 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 381 host_ = b; 382 return b; 383 } else { 384 return (com.google.protobuf.ByteString) ref; 385 } 386 } 387 388 private byte memoizedIsInitialized = -1; 389 390 @java.lang.Override isInitialized()391 public final boolean isInitialized() { 392 byte isInitialized = memoizedIsInitialized; 393 if (isInitialized == 1) return true; 394 if (isInitialized == 0) return false; 395 396 memoizedIsInitialized = 1; 397 return true; 398 } 399 400 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)401 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 402 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { 403 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); 404 } 405 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { 406 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); 407 } 408 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instance_)) { 409 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instance_); 410 } 411 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { 412 com.google.protobuf.GeneratedMessageV3.writeString(output, 4, host_); 413 } 414 getUnknownFields().writeTo(output); 415 } 416 417 @java.lang.Override getSerializedSize()418 public int getSerializedSize() { 419 int size = memoizedSize; 420 if (size != -1) return size; 421 422 size = 0; 423 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { 424 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); 425 } 426 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { 427 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); 428 } 429 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instance_)) { 430 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, instance_); 431 } 432 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { 433 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, host_); 434 } 435 size += getUnknownFields().getSerializedSize(); 436 memoizedSize = size; 437 return size; 438 } 439 440 @java.lang.Override equals(final java.lang.Object obj)441 public boolean equals(final java.lang.Object obj) { 442 if (obj == this) { 443 return true; 444 } 445 if (!(obj instanceof com.google.cloud.tasks.v2beta3.AppEngineRouting)) { 446 return super.equals(obj); 447 } 448 com.google.cloud.tasks.v2beta3.AppEngineRouting other = 449 (com.google.cloud.tasks.v2beta3.AppEngineRouting) obj; 450 451 if (!getService().equals(other.getService())) return false; 452 if (!getVersion().equals(other.getVersion())) return false; 453 if (!getInstance().equals(other.getInstance())) return false; 454 if (!getHost().equals(other.getHost())) return false; 455 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 456 return true; 457 } 458 459 @java.lang.Override hashCode()460 public int hashCode() { 461 if (memoizedHashCode != 0) { 462 return memoizedHashCode; 463 } 464 int hash = 41; 465 hash = (19 * hash) + getDescriptor().hashCode(); 466 hash = (37 * hash) + SERVICE_FIELD_NUMBER; 467 hash = (53 * hash) + getService().hashCode(); 468 hash = (37 * hash) + VERSION_FIELD_NUMBER; 469 hash = (53 * hash) + getVersion().hashCode(); 470 hash = (37 * hash) + INSTANCE_FIELD_NUMBER; 471 hash = (53 * hash) + getInstance().hashCode(); 472 hash = (37 * hash) + HOST_FIELD_NUMBER; 473 hash = (53 * hash) + getHost().hashCode(); 474 hash = (29 * hash) + getUnknownFields().hashCode(); 475 memoizedHashCode = hash; 476 return hash; 477 } 478 parseFrom(java.nio.ByteBuffer data)479 public static com.google.cloud.tasks.v2beta3.AppEngineRouting parseFrom(java.nio.ByteBuffer data) 480 throws com.google.protobuf.InvalidProtocolBufferException { 481 return PARSER.parseFrom(data); 482 } 483 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)484 public static com.google.cloud.tasks.v2beta3.AppEngineRouting parseFrom( 485 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 486 throws com.google.protobuf.InvalidProtocolBufferException { 487 return PARSER.parseFrom(data, extensionRegistry); 488 } 489 parseFrom( com.google.protobuf.ByteString data)490 public static com.google.cloud.tasks.v2beta3.AppEngineRouting parseFrom( 491 com.google.protobuf.ByteString data) 492 throws com.google.protobuf.InvalidProtocolBufferException { 493 return PARSER.parseFrom(data); 494 } 495 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)496 public static com.google.cloud.tasks.v2beta3.AppEngineRouting parseFrom( 497 com.google.protobuf.ByteString data, 498 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 499 throws com.google.protobuf.InvalidProtocolBufferException { 500 return PARSER.parseFrom(data, extensionRegistry); 501 } 502 parseFrom(byte[] data)503 public static com.google.cloud.tasks.v2beta3.AppEngineRouting parseFrom(byte[] data) 504 throws com.google.protobuf.InvalidProtocolBufferException { 505 return PARSER.parseFrom(data); 506 } 507 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)508 public static com.google.cloud.tasks.v2beta3.AppEngineRouting parseFrom( 509 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 510 throws com.google.protobuf.InvalidProtocolBufferException { 511 return PARSER.parseFrom(data, extensionRegistry); 512 } 513 parseFrom(java.io.InputStream input)514 public static com.google.cloud.tasks.v2beta3.AppEngineRouting parseFrom(java.io.InputStream input) 515 throws java.io.IOException { 516 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 517 } 518 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)519 public static com.google.cloud.tasks.v2beta3.AppEngineRouting parseFrom( 520 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 521 throws java.io.IOException { 522 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 523 PARSER, input, extensionRegistry); 524 } 525 parseDelimitedFrom( java.io.InputStream input)526 public static com.google.cloud.tasks.v2beta3.AppEngineRouting parseDelimitedFrom( 527 java.io.InputStream input) throws java.io.IOException { 528 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 529 } 530 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)531 public static com.google.cloud.tasks.v2beta3.AppEngineRouting parseDelimitedFrom( 532 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 533 throws java.io.IOException { 534 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 535 PARSER, input, extensionRegistry); 536 } 537 parseFrom( com.google.protobuf.CodedInputStream input)538 public static com.google.cloud.tasks.v2beta3.AppEngineRouting parseFrom( 539 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 540 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 541 } 542 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)543 public static com.google.cloud.tasks.v2beta3.AppEngineRouting parseFrom( 544 com.google.protobuf.CodedInputStream input, 545 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 546 throws java.io.IOException { 547 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 548 PARSER, input, extensionRegistry); 549 } 550 551 @java.lang.Override newBuilderForType()552 public Builder newBuilderForType() { 553 return newBuilder(); 554 } 555 newBuilder()556 public static Builder newBuilder() { 557 return DEFAULT_INSTANCE.toBuilder(); 558 } 559 newBuilder(com.google.cloud.tasks.v2beta3.AppEngineRouting prototype)560 public static Builder newBuilder(com.google.cloud.tasks.v2beta3.AppEngineRouting prototype) { 561 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 562 } 563 564 @java.lang.Override toBuilder()565 public Builder toBuilder() { 566 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 567 } 568 569 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)570 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 571 Builder builder = new Builder(parent); 572 return builder; 573 } 574 /** 575 * 576 * 577 * <pre> 578 * App Engine Routing. 579 * Defines routing characteristics specific to App Engine - service, version, 580 * and instance. 581 * For more information about services, versions, and instances see 582 * [An Overview of App 583 * Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), 584 * [Microservices Architecture on Google App 585 * Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), 586 * [App Engine Standard request 587 * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), 588 * and [App Engine Flex request 589 * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). 590 * </pre> 591 * 592 * Protobuf type {@code google.cloud.tasks.v2beta3.AppEngineRouting} 593 */ 594 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 595 implements 596 // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta3.AppEngineRouting) 597 com.google.cloud.tasks.v2beta3.AppEngineRoutingOrBuilder { getDescriptor()598 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 599 return com.google.cloud.tasks.v2beta3.TargetProto 600 .internal_static_google_cloud_tasks_v2beta3_AppEngineRouting_descriptor; 601 } 602 603 @java.lang.Override 604 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()605 internalGetFieldAccessorTable() { 606 return com.google.cloud.tasks.v2beta3.TargetProto 607 .internal_static_google_cloud_tasks_v2beta3_AppEngineRouting_fieldAccessorTable 608 .ensureFieldAccessorsInitialized( 609 com.google.cloud.tasks.v2beta3.AppEngineRouting.class, 610 com.google.cloud.tasks.v2beta3.AppEngineRouting.Builder.class); 611 } 612 613 // Construct using com.google.cloud.tasks.v2beta3.AppEngineRouting.newBuilder() Builder()614 private Builder() {} 615 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)616 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 617 super(parent); 618 } 619 620 @java.lang.Override clear()621 public Builder clear() { 622 super.clear(); 623 bitField0_ = 0; 624 service_ = ""; 625 version_ = ""; 626 instance_ = ""; 627 host_ = ""; 628 return this; 629 } 630 631 @java.lang.Override getDescriptorForType()632 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 633 return com.google.cloud.tasks.v2beta3.TargetProto 634 .internal_static_google_cloud_tasks_v2beta3_AppEngineRouting_descriptor; 635 } 636 637 @java.lang.Override getDefaultInstanceForType()638 public com.google.cloud.tasks.v2beta3.AppEngineRouting getDefaultInstanceForType() { 639 return com.google.cloud.tasks.v2beta3.AppEngineRouting.getDefaultInstance(); 640 } 641 642 @java.lang.Override build()643 public com.google.cloud.tasks.v2beta3.AppEngineRouting build() { 644 com.google.cloud.tasks.v2beta3.AppEngineRouting result = buildPartial(); 645 if (!result.isInitialized()) { 646 throw newUninitializedMessageException(result); 647 } 648 return result; 649 } 650 651 @java.lang.Override buildPartial()652 public com.google.cloud.tasks.v2beta3.AppEngineRouting buildPartial() { 653 com.google.cloud.tasks.v2beta3.AppEngineRouting result = 654 new com.google.cloud.tasks.v2beta3.AppEngineRouting(this); 655 if (bitField0_ != 0) { 656 buildPartial0(result); 657 } 658 onBuilt(); 659 return result; 660 } 661 buildPartial0(com.google.cloud.tasks.v2beta3.AppEngineRouting result)662 private void buildPartial0(com.google.cloud.tasks.v2beta3.AppEngineRouting result) { 663 int from_bitField0_ = bitField0_; 664 if (((from_bitField0_ & 0x00000001) != 0)) { 665 result.service_ = service_; 666 } 667 if (((from_bitField0_ & 0x00000002) != 0)) { 668 result.version_ = version_; 669 } 670 if (((from_bitField0_ & 0x00000004) != 0)) { 671 result.instance_ = instance_; 672 } 673 if (((from_bitField0_ & 0x00000008) != 0)) { 674 result.host_ = host_; 675 } 676 } 677 678 @java.lang.Override clone()679 public Builder clone() { 680 return super.clone(); 681 } 682 683 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)684 public Builder setField( 685 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 686 return super.setField(field, value); 687 } 688 689 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)690 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 691 return super.clearField(field); 692 } 693 694 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)695 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 696 return super.clearOneof(oneof); 697 } 698 699 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)700 public Builder setRepeatedField( 701 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 702 return super.setRepeatedField(field, index, value); 703 } 704 705 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)706 public Builder addRepeatedField( 707 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 708 return super.addRepeatedField(field, value); 709 } 710 711 @java.lang.Override mergeFrom(com.google.protobuf.Message other)712 public Builder mergeFrom(com.google.protobuf.Message other) { 713 if (other instanceof com.google.cloud.tasks.v2beta3.AppEngineRouting) { 714 return mergeFrom((com.google.cloud.tasks.v2beta3.AppEngineRouting) other); 715 } else { 716 super.mergeFrom(other); 717 return this; 718 } 719 } 720 mergeFrom(com.google.cloud.tasks.v2beta3.AppEngineRouting other)721 public Builder mergeFrom(com.google.cloud.tasks.v2beta3.AppEngineRouting other) { 722 if (other == com.google.cloud.tasks.v2beta3.AppEngineRouting.getDefaultInstance()) 723 return this; 724 if (!other.getService().isEmpty()) { 725 service_ = other.service_; 726 bitField0_ |= 0x00000001; 727 onChanged(); 728 } 729 if (!other.getVersion().isEmpty()) { 730 version_ = other.version_; 731 bitField0_ |= 0x00000002; 732 onChanged(); 733 } 734 if (!other.getInstance().isEmpty()) { 735 instance_ = other.instance_; 736 bitField0_ |= 0x00000004; 737 onChanged(); 738 } 739 if (!other.getHost().isEmpty()) { 740 host_ = other.host_; 741 bitField0_ |= 0x00000008; 742 onChanged(); 743 } 744 this.mergeUnknownFields(other.getUnknownFields()); 745 onChanged(); 746 return this; 747 } 748 749 @java.lang.Override isInitialized()750 public final boolean isInitialized() { 751 return true; 752 } 753 754 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)755 public Builder mergeFrom( 756 com.google.protobuf.CodedInputStream input, 757 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 758 throws java.io.IOException { 759 if (extensionRegistry == null) { 760 throw new java.lang.NullPointerException(); 761 } 762 try { 763 boolean done = false; 764 while (!done) { 765 int tag = input.readTag(); 766 switch (tag) { 767 case 0: 768 done = true; 769 break; 770 case 10: 771 { 772 service_ = input.readStringRequireUtf8(); 773 bitField0_ |= 0x00000001; 774 break; 775 } // case 10 776 case 18: 777 { 778 version_ = input.readStringRequireUtf8(); 779 bitField0_ |= 0x00000002; 780 break; 781 } // case 18 782 case 26: 783 { 784 instance_ = input.readStringRequireUtf8(); 785 bitField0_ |= 0x00000004; 786 break; 787 } // case 26 788 case 34: 789 { 790 host_ = input.readStringRequireUtf8(); 791 bitField0_ |= 0x00000008; 792 break; 793 } // case 34 794 default: 795 { 796 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 797 done = true; // was an endgroup tag 798 } 799 break; 800 } // default: 801 } // switch (tag) 802 } // while (!done) 803 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 804 throw e.unwrapIOException(); 805 } finally { 806 onChanged(); 807 } // finally 808 return this; 809 } 810 811 private int bitField0_; 812 813 private java.lang.Object service_ = ""; 814 /** 815 * 816 * 817 * <pre> 818 * App service. 819 * By default, the task is sent to the service which is the default 820 * service when the task is attempted. 821 * For some queues or tasks which were created using the App Engine 822 * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is 823 * not parsable into 824 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 825 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 826 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For 827 * example, some tasks which were created using the App Engine SDK use a 828 * custom domain name; custom domains are not parsed by Cloud Tasks. If 829 * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, 830 * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 831 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 832 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the 833 * empty string. 834 * </pre> 835 * 836 * <code>string service = 1;</code> 837 * 838 * @return The service. 839 */ getService()840 public java.lang.String getService() { 841 java.lang.Object ref = service_; 842 if (!(ref instanceof java.lang.String)) { 843 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 844 java.lang.String s = bs.toStringUtf8(); 845 service_ = s; 846 return s; 847 } else { 848 return (java.lang.String) ref; 849 } 850 } 851 /** 852 * 853 * 854 * <pre> 855 * App service. 856 * By default, the task is sent to the service which is the default 857 * service when the task is attempted. 858 * For some queues or tasks which were created using the App Engine 859 * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is 860 * not parsable into 861 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 862 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 863 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For 864 * example, some tasks which were created using the App Engine SDK use a 865 * custom domain name; custom domains are not parsed by Cloud Tasks. If 866 * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, 867 * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 868 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 869 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the 870 * empty string. 871 * </pre> 872 * 873 * <code>string service = 1;</code> 874 * 875 * @return The bytes for service. 876 */ getServiceBytes()877 public com.google.protobuf.ByteString getServiceBytes() { 878 java.lang.Object ref = service_; 879 if (ref instanceof String) { 880 com.google.protobuf.ByteString b = 881 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 882 service_ = b; 883 return b; 884 } else { 885 return (com.google.protobuf.ByteString) ref; 886 } 887 } 888 /** 889 * 890 * 891 * <pre> 892 * App service. 893 * By default, the task is sent to the service which is the default 894 * service when the task is attempted. 895 * For some queues or tasks which were created using the App Engine 896 * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is 897 * not parsable into 898 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 899 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 900 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For 901 * example, some tasks which were created using the App Engine SDK use a 902 * custom domain name; custom domains are not parsed by Cloud Tasks. If 903 * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, 904 * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 905 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 906 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the 907 * empty string. 908 * </pre> 909 * 910 * <code>string service = 1;</code> 911 * 912 * @param value The service to set. 913 * @return This builder for chaining. 914 */ setService(java.lang.String value)915 public Builder setService(java.lang.String value) { 916 if (value == null) { 917 throw new NullPointerException(); 918 } 919 service_ = value; 920 bitField0_ |= 0x00000001; 921 onChanged(); 922 return this; 923 } 924 /** 925 * 926 * 927 * <pre> 928 * App service. 929 * By default, the task is sent to the service which is the default 930 * service when the task is attempted. 931 * For some queues or tasks which were created using the App Engine 932 * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is 933 * not parsable into 934 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 935 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 936 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For 937 * example, some tasks which were created using the App Engine SDK use a 938 * custom domain name; custom domains are not parsed by Cloud Tasks. If 939 * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, 940 * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 941 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 942 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the 943 * empty string. 944 * </pre> 945 * 946 * <code>string service = 1;</code> 947 * 948 * @return This builder for chaining. 949 */ clearService()950 public Builder clearService() { 951 service_ = getDefaultInstance().getService(); 952 bitField0_ = (bitField0_ & ~0x00000001); 953 onChanged(); 954 return this; 955 } 956 /** 957 * 958 * 959 * <pre> 960 * App service. 961 * By default, the task is sent to the service which is the default 962 * service when the task is attempted. 963 * For some queues or tasks which were created using the App Engine 964 * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is 965 * not parsable into 966 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 967 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 968 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For 969 * example, some tasks which were created using the App Engine SDK use a 970 * custom domain name; custom domains are not parsed by Cloud Tasks. If 971 * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, 972 * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 973 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 974 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the 975 * empty string. 976 * </pre> 977 * 978 * <code>string service = 1;</code> 979 * 980 * @param value The bytes for service to set. 981 * @return This builder for chaining. 982 */ setServiceBytes(com.google.protobuf.ByteString value)983 public Builder setServiceBytes(com.google.protobuf.ByteString value) { 984 if (value == null) { 985 throw new NullPointerException(); 986 } 987 checkByteStringIsUtf8(value); 988 service_ = value; 989 bitField0_ |= 0x00000001; 990 onChanged(); 991 return this; 992 } 993 994 private java.lang.Object version_ = ""; 995 /** 996 * 997 * 998 * <pre> 999 * App version. 1000 * By default, the task is sent to the version which is the default 1001 * version when the task is attempted. 1002 * For some queues or tasks which were created using the App Engine 1003 * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is 1004 * not parsable into 1005 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 1006 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 1007 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For 1008 * example, some tasks which were created using the App Engine SDK use a 1009 * custom domain name; custom domains are not parsed by Cloud Tasks. If 1010 * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, 1011 * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 1012 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 1013 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the 1014 * empty string. 1015 * </pre> 1016 * 1017 * <code>string version = 2;</code> 1018 * 1019 * @return The version. 1020 */ getVersion()1021 public java.lang.String getVersion() { 1022 java.lang.Object ref = version_; 1023 if (!(ref instanceof java.lang.String)) { 1024 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1025 java.lang.String s = bs.toStringUtf8(); 1026 version_ = s; 1027 return s; 1028 } else { 1029 return (java.lang.String) ref; 1030 } 1031 } 1032 /** 1033 * 1034 * 1035 * <pre> 1036 * App version. 1037 * By default, the task is sent to the version which is the default 1038 * version when the task is attempted. 1039 * For some queues or tasks which were created using the App Engine 1040 * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is 1041 * not parsable into 1042 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 1043 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 1044 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For 1045 * example, some tasks which were created using the App Engine SDK use a 1046 * custom domain name; custom domains are not parsed by Cloud Tasks. If 1047 * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, 1048 * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 1049 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 1050 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the 1051 * empty string. 1052 * </pre> 1053 * 1054 * <code>string version = 2;</code> 1055 * 1056 * @return The bytes for version. 1057 */ getVersionBytes()1058 public com.google.protobuf.ByteString getVersionBytes() { 1059 java.lang.Object ref = version_; 1060 if (ref instanceof String) { 1061 com.google.protobuf.ByteString b = 1062 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1063 version_ = b; 1064 return b; 1065 } else { 1066 return (com.google.protobuf.ByteString) ref; 1067 } 1068 } 1069 /** 1070 * 1071 * 1072 * <pre> 1073 * App version. 1074 * By default, the task is sent to the version which is the default 1075 * version when the task is attempted. 1076 * For some queues or tasks which were created using the App Engine 1077 * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is 1078 * not parsable into 1079 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 1080 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 1081 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For 1082 * example, some tasks which were created using the App Engine SDK use a 1083 * custom domain name; custom domains are not parsed by Cloud Tasks. If 1084 * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, 1085 * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 1086 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 1087 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the 1088 * empty string. 1089 * </pre> 1090 * 1091 * <code>string version = 2;</code> 1092 * 1093 * @param value The version to set. 1094 * @return This builder for chaining. 1095 */ setVersion(java.lang.String value)1096 public Builder setVersion(java.lang.String value) { 1097 if (value == null) { 1098 throw new NullPointerException(); 1099 } 1100 version_ = value; 1101 bitField0_ |= 0x00000002; 1102 onChanged(); 1103 return this; 1104 } 1105 /** 1106 * 1107 * 1108 * <pre> 1109 * App version. 1110 * By default, the task is sent to the version which is the default 1111 * version when the task is attempted. 1112 * For some queues or tasks which were created using the App Engine 1113 * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is 1114 * not parsable into 1115 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 1116 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 1117 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For 1118 * example, some tasks which were created using the App Engine SDK use a 1119 * custom domain name; custom domains are not parsed by Cloud Tasks. If 1120 * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, 1121 * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 1122 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 1123 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the 1124 * empty string. 1125 * </pre> 1126 * 1127 * <code>string version = 2;</code> 1128 * 1129 * @return This builder for chaining. 1130 */ clearVersion()1131 public Builder clearVersion() { 1132 version_ = getDefaultInstance().getVersion(); 1133 bitField0_ = (bitField0_ & ~0x00000002); 1134 onChanged(); 1135 return this; 1136 } 1137 /** 1138 * 1139 * 1140 * <pre> 1141 * App version. 1142 * By default, the task is sent to the version which is the default 1143 * version when the task is attempted. 1144 * For some queues or tasks which were created using the App Engine 1145 * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is 1146 * not parsable into 1147 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 1148 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 1149 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For 1150 * example, some tasks which were created using the App Engine SDK use a 1151 * custom domain name; custom domains are not parsed by Cloud Tasks. If 1152 * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, 1153 * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 1154 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 1155 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the 1156 * empty string. 1157 * </pre> 1158 * 1159 * <code>string version = 2;</code> 1160 * 1161 * @param value The bytes for version to set. 1162 * @return This builder for chaining. 1163 */ setVersionBytes(com.google.protobuf.ByteString value)1164 public Builder setVersionBytes(com.google.protobuf.ByteString value) { 1165 if (value == null) { 1166 throw new NullPointerException(); 1167 } 1168 checkByteStringIsUtf8(value); 1169 version_ = value; 1170 bitField0_ |= 0x00000002; 1171 onChanged(); 1172 return this; 1173 } 1174 1175 private java.lang.Object instance_ = ""; 1176 /** 1177 * 1178 * 1179 * <pre> 1180 * App instance. 1181 * By default, the task is sent to an instance which is available when 1182 * the task is attempted. 1183 * Requests can only be sent to a specific instance if 1184 * [manual scaling is used in App Engine 1185 * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). 1186 * App Engine Flex does not support instances. For more information, see 1187 * [App Engine Standard request 1188 * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) 1189 * and [App Engine Flex request 1190 * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). 1191 * </pre> 1192 * 1193 * <code>string instance = 3;</code> 1194 * 1195 * @return The instance. 1196 */ getInstance()1197 public java.lang.String getInstance() { 1198 java.lang.Object ref = instance_; 1199 if (!(ref instanceof java.lang.String)) { 1200 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1201 java.lang.String s = bs.toStringUtf8(); 1202 instance_ = s; 1203 return s; 1204 } else { 1205 return (java.lang.String) ref; 1206 } 1207 } 1208 /** 1209 * 1210 * 1211 * <pre> 1212 * App instance. 1213 * By default, the task is sent to an instance which is available when 1214 * the task is attempted. 1215 * Requests can only be sent to a specific instance if 1216 * [manual scaling is used in App Engine 1217 * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). 1218 * App Engine Flex does not support instances. For more information, see 1219 * [App Engine Standard request 1220 * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) 1221 * and [App Engine Flex request 1222 * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). 1223 * </pre> 1224 * 1225 * <code>string instance = 3;</code> 1226 * 1227 * @return The bytes for instance. 1228 */ getInstanceBytes()1229 public com.google.protobuf.ByteString getInstanceBytes() { 1230 java.lang.Object ref = instance_; 1231 if (ref instanceof String) { 1232 com.google.protobuf.ByteString b = 1233 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1234 instance_ = b; 1235 return b; 1236 } else { 1237 return (com.google.protobuf.ByteString) ref; 1238 } 1239 } 1240 /** 1241 * 1242 * 1243 * <pre> 1244 * App instance. 1245 * By default, the task is sent to an instance which is available when 1246 * the task is attempted. 1247 * Requests can only be sent to a specific instance if 1248 * [manual scaling is used in App Engine 1249 * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). 1250 * App Engine Flex does not support instances. For more information, see 1251 * [App Engine Standard request 1252 * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) 1253 * and [App Engine Flex request 1254 * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). 1255 * </pre> 1256 * 1257 * <code>string instance = 3;</code> 1258 * 1259 * @param value The instance to set. 1260 * @return This builder for chaining. 1261 */ setInstance(java.lang.String value)1262 public Builder setInstance(java.lang.String value) { 1263 if (value == null) { 1264 throw new NullPointerException(); 1265 } 1266 instance_ = value; 1267 bitField0_ |= 0x00000004; 1268 onChanged(); 1269 return this; 1270 } 1271 /** 1272 * 1273 * 1274 * <pre> 1275 * App instance. 1276 * By default, the task is sent to an instance which is available when 1277 * the task is attempted. 1278 * Requests can only be sent to a specific instance if 1279 * [manual scaling is used in App Engine 1280 * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). 1281 * App Engine Flex does not support instances. For more information, see 1282 * [App Engine Standard request 1283 * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) 1284 * and [App Engine Flex request 1285 * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). 1286 * </pre> 1287 * 1288 * <code>string instance = 3;</code> 1289 * 1290 * @return This builder for chaining. 1291 */ clearInstance()1292 public Builder clearInstance() { 1293 instance_ = getDefaultInstance().getInstance(); 1294 bitField0_ = (bitField0_ & ~0x00000004); 1295 onChanged(); 1296 return this; 1297 } 1298 /** 1299 * 1300 * 1301 * <pre> 1302 * App instance. 1303 * By default, the task is sent to an instance which is available when 1304 * the task is attempted. 1305 * Requests can only be sent to a specific instance if 1306 * [manual scaling is used in App Engine 1307 * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). 1308 * App Engine Flex does not support instances. For more information, see 1309 * [App Engine Standard request 1310 * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) 1311 * and [App Engine Flex request 1312 * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). 1313 * </pre> 1314 * 1315 * <code>string instance = 3;</code> 1316 * 1317 * @param value The bytes for instance to set. 1318 * @return This builder for chaining. 1319 */ setInstanceBytes(com.google.protobuf.ByteString value)1320 public Builder setInstanceBytes(com.google.protobuf.ByteString value) { 1321 if (value == null) { 1322 throw new NullPointerException(); 1323 } 1324 checkByteStringIsUtf8(value); 1325 instance_ = value; 1326 bitField0_ |= 0x00000004; 1327 onChanged(); 1328 return this; 1329 } 1330 1331 private java.lang.Object host_ = ""; 1332 /** 1333 * 1334 * 1335 * <pre> 1336 * Output only. The host that the task is sent to. 1337 * The host is constructed from the domain name of the app associated with 1338 * the queue's project ID (for example <app-id>.appspot.com), and the 1339 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 1340 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 1341 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks 1342 * which were created using the App Engine SDK might have a custom domain 1343 * name. 1344 * For more information, see 1345 * [How Requests are 1346 * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). 1347 * </pre> 1348 * 1349 * <code>string host = 4;</code> 1350 * 1351 * @return The host. 1352 */ getHost()1353 public java.lang.String getHost() { 1354 java.lang.Object ref = host_; 1355 if (!(ref instanceof java.lang.String)) { 1356 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1357 java.lang.String s = bs.toStringUtf8(); 1358 host_ = s; 1359 return s; 1360 } else { 1361 return (java.lang.String) ref; 1362 } 1363 } 1364 /** 1365 * 1366 * 1367 * <pre> 1368 * Output only. The host that the task is sent to. 1369 * The host is constructed from the domain name of the app associated with 1370 * the queue's project ID (for example <app-id>.appspot.com), and the 1371 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 1372 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 1373 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks 1374 * which were created using the App Engine SDK might have a custom domain 1375 * name. 1376 * For more information, see 1377 * [How Requests are 1378 * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). 1379 * </pre> 1380 * 1381 * <code>string host = 4;</code> 1382 * 1383 * @return The bytes for host. 1384 */ getHostBytes()1385 public com.google.protobuf.ByteString getHostBytes() { 1386 java.lang.Object ref = host_; 1387 if (ref instanceof String) { 1388 com.google.protobuf.ByteString b = 1389 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1390 host_ = b; 1391 return b; 1392 } else { 1393 return (com.google.protobuf.ByteString) ref; 1394 } 1395 } 1396 /** 1397 * 1398 * 1399 * <pre> 1400 * Output only. The host that the task is sent to. 1401 * The host is constructed from the domain name of the app associated with 1402 * the queue's project ID (for example <app-id>.appspot.com), and the 1403 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 1404 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 1405 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks 1406 * which were created using the App Engine SDK might have a custom domain 1407 * name. 1408 * For more information, see 1409 * [How Requests are 1410 * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). 1411 * </pre> 1412 * 1413 * <code>string host = 4;</code> 1414 * 1415 * @param value The host to set. 1416 * @return This builder for chaining. 1417 */ setHost(java.lang.String value)1418 public Builder setHost(java.lang.String value) { 1419 if (value == null) { 1420 throw new NullPointerException(); 1421 } 1422 host_ = value; 1423 bitField0_ |= 0x00000008; 1424 onChanged(); 1425 return this; 1426 } 1427 /** 1428 * 1429 * 1430 * <pre> 1431 * Output only. The host that the task is sent to. 1432 * The host is constructed from the domain name of the app associated with 1433 * the queue's project ID (for example <app-id>.appspot.com), and the 1434 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 1435 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 1436 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks 1437 * which were created using the App Engine SDK might have a custom domain 1438 * name. 1439 * For more information, see 1440 * [How Requests are 1441 * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). 1442 * </pre> 1443 * 1444 * <code>string host = 4;</code> 1445 * 1446 * @return This builder for chaining. 1447 */ clearHost()1448 public Builder clearHost() { 1449 host_ = getDefaultInstance().getHost(); 1450 bitField0_ = (bitField0_ & ~0x00000008); 1451 onChanged(); 1452 return this; 1453 } 1454 /** 1455 * 1456 * 1457 * <pre> 1458 * Output only. The host that the task is sent to. 1459 * The host is constructed from the domain name of the app associated with 1460 * the queue's project ID (for example <app-id>.appspot.com), and the 1461 * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], 1462 * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and 1463 * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks 1464 * which were created using the App Engine SDK might have a custom domain 1465 * name. 1466 * For more information, see 1467 * [How Requests are 1468 * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). 1469 * </pre> 1470 * 1471 * <code>string host = 4;</code> 1472 * 1473 * @param value The bytes for host to set. 1474 * @return This builder for chaining. 1475 */ setHostBytes(com.google.protobuf.ByteString value)1476 public Builder setHostBytes(com.google.protobuf.ByteString value) { 1477 if (value == null) { 1478 throw new NullPointerException(); 1479 } 1480 checkByteStringIsUtf8(value); 1481 host_ = value; 1482 bitField0_ |= 0x00000008; 1483 onChanged(); 1484 return this; 1485 } 1486 1487 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1488 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1489 return super.setUnknownFields(unknownFields); 1490 } 1491 1492 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1493 public final Builder mergeUnknownFields( 1494 final com.google.protobuf.UnknownFieldSet unknownFields) { 1495 return super.mergeUnknownFields(unknownFields); 1496 } 1497 1498 // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta3.AppEngineRouting) 1499 } 1500 1501 // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta3.AppEngineRouting) 1502 private static final com.google.cloud.tasks.v2beta3.AppEngineRouting DEFAULT_INSTANCE; 1503 1504 static { 1505 DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta3.AppEngineRouting(); 1506 } 1507 getDefaultInstance()1508 public static com.google.cloud.tasks.v2beta3.AppEngineRouting getDefaultInstance() { 1509 return DEFAULT_INSTANCE; 1510 } 1511 1512 private static final com.google.protobuf.Parser<AppEngineRouting> PARSER = 1513 new com.google.protobuf.AbstractParser<AppEngineRouting>() { 1514 @java.lang.Override 1515 public AppEngineRouting parsePartialFrom( 1516 com.google.protobuf.CodedInputStream input, 1517 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1518 throws com.google.protobuf.InvalidProtocolBufferException { 1519 Builder builder = newBuilder(); 1520 try { 1521 builder.mergeFrom(input, extensionRegistry); 1522 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1523 throw e.setUnfinishedMessage(builder.buildPartial()); 1524 } catch (com.google.protobuf.UninitializedMessageException e) { 1525 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1526 } catch (java.io.IOException e) { 1527 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1528 .setUnfinishedMessage(builder.buildPartial()); 1529 } 1530 return builder.buildPartial(); 1531 } 1532 }; 1533 parser()1534 public static com.google.protobuf.Parser<AppEngineRouting> parser() { 1535 return PARSER; 1536 } 1537 1538 @java.lang.Override getParserForType()1539 public com.google.protobuf.Parser<AppEngineRouting> getParserForType() { 1540 return PARSER; 1541 } 1542 1543 @java.lang.Override getDefaultInstanceForType()1544 public com.google.cloud.tasks.v2beta3.AppEngineRouting getDefaultInstanceForType() { 1545 return DEFAULT_INSTANCE; 1546 } 1547 } 1548