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/channel/v1/offers.proto 18 19 package com.google.cloud.channel.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Represents the constraints for buying the Offer. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.channel.v1.Constraints} 29 */ 30 public final class Constraints extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.Constraints) 33 ConstraintsOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use Constraints.newBuilder() to construct. Constraints(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private Constraints(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 Constraints()40 private Constraints() {} 41 42 @java.lang.Override 43 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)44 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 45 return new Constraints(); 46 } 47 48 @java.lang.Override getUnknownFields()49 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 50 return this.unknownFields; 51 } 52 getDescriptor()53 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 54 return com.google.cloud.channel.v1.OffersProto 55 .internal_static_google_cloud_channel_v1_Constraints_descriptor; 56 } 57 58 @java.lang.Override 59 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()60 internalGetFieldAccessorTable() { 61 return com.google.cloud.channel.v1.OffersProto 62 .internal_static_google_cloud_channel_v1_Constraints_fieldAccessorTable 63 .ensureFieldAccessorsInitialized( 64 com.google.cloud.channel.v1.Constraints.class, 65 com.google.cloud.channel.v1.Constraints.Builder.class); 66 } 67 68 public static final int CUSTOMER_CONSTRAINTS_FIELD_NUMBER = 1; 69 private com.google.cloud.channel.v1.CustomerConstraints customerConstraints_; 70 /** 71 * 72 * 73 * <pre> 74 * Represents constraints required to purchase the Offer for a customer. 75 * </pre> 76 * 77 * <code>.google.cloud.channel.v1.CustomerConstraints customer_constraints = 1;</code> 78 * 79 * @return Whether the customerConstraints field is set. 80 */ 81 @java.lang.Override hasCustomerConstraints()82 public boolean hasCustomerConstraints() { 83 return customerConstraints_ != null; 84 } 85 /** 86 * 87 * 88 * <pre> 89 * Represents constraints required to purchase the Offer for a customer. 90 * </pre> 91 * 92 * <code>.google.cloud.channel.v1.CustomerConstraints customer_constraints = 1;</code> 93 * 94 * @return The customerConstraints. 95 */ 96 @java.lang.Override getCustomerConstraints()97 public com.google.cloud.channel.v1.CustomerConstraints getCustomerConstraints() { 98 return customerConstraints_ == null 99 ? com.google.cloud.channel.v1.CustomerConstraints.getDefaultInstance() 100 : customerConstraints_; 101 } 102 /** 103 * 104 * 105 * <pre> 106 * Represents constraints required to purchase the Offer for a customer. 107 * </pre> 108 * 109 * <code>.google.cloud.channel.v1.CustomerConstraints customer_constraints = 1;</code> 110 */ 111 @java.lang.Override 112 public com.google.cloud.channel.v1.CustomerConstraintsOrBuilder getCustomerConstraintsOrBuilder()113 getCustomerConstraintsOrBuilder() { 114 return customerConstraints_ == null 115 ? com.google.cloud.channel.v1.CustomerConstraints.getDefaultInstance() 116 : customerConstraints_; 117 } 118 119 private byte memoizedIsInitialized = -1; 120 121 @java.lang.Override isInitialized()122 public final boolean isInitialized() { 123 byte isInitialized = memoizedIsInitialized; 124 if (isInitialized == 1) return true; 125 if (isInitialized == 0) return false; 126 127 memoizedIsInitialized = 1; 128 return true; 129 } 130 131 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)132 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 133 if (customerConstraints_ != null) { 134 output.writeMessage(1, getCustomerConstraints()); 135 } 136 getUnknownFields().writeTo(output); 137 } 138 139 @java.lang.Override getSerializedSize()140 public int getSerializedSize() { 141 int size = memoizedSize; 142 if (size != -1) return size; 143 144 size = 0; 145 if (customerConstraints_ != null) { 146 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCustomerConstraints()); 147 } 148 size += getUnknownFields().getSerializedSize(); 149 memoizedSize = size; 150 return size; 151 } 152 153 @java.lang.Override equals(final java.lang.Object obj)154 public boolean equals(final java.lang.Object obj) { 155 if (obj == this) { 156 return true; 157 } 158 if (!(obj instanceof com.google.cloud.channel.v1.Constraints)) { 159 return super.equals(obj); 160 } 161 com.google.cloud.channel.v1.Constraints other = (com.google.cloud.channel.v1.Constraints) obj; 162 163 if (hasCustomerConstraints() != other.hasCustomerConstraints()) return false; 164 if (hasCustomerConstraints()) { 165 if (!getCustomerConstraints().equals(other.getCustomerConstraints())) return false; 166 } 167 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 168 return true; 169 } 170 171 @java.lang.Override hashCode()172 public int hashCode() { 173 if (memoizedHashCode != 0) { 174 return memoizedHashCode; 175 } 176 int hash = 41; 177 hash = (19 * hash) + getDescriptor().hashCode(); 178 if (hasCustomerConstraints()) { 179 hash = (37 * hash) + CUSTOMER_CONSTRAINTS_FIELD_NUMBER; 180 hash = (53 * hash) + getCustomerConstraints().hashCode(); 181 } 182 hash = (29 * hash) + getUnknownFields().hashCode(); 183 memoizedHashCode = hash; 184 return hash; 185 } 186 parseFrom(java.nio.ByteBuffer data)187 public static com.google.cloud.channel.v1.Constraints parseFrom(java.nio.ByteBuffer data) 188 throws com.google.protobuf.InvalidProtocolBufferException { 189 return PARSER.parseFrom(data); 190 } 191 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)192 public static com.google.cloud.channel.v1.Constraints parseFrom( 193 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 194 throws com.google.protobuf.InvalidProtocolBufferException { 195 return PARSER.parseFrom(data, extensionRegistry); 196 } 197 parseFrom( com.google.protobuf.ByteString data)198 public static com.google.cloud.channel.v1.Constraints parseFrom( 199 com.google.protobuf.ByteString data) 200 throws com.google.protobuf.InvalidProtocolBufferException { 201 return PARSER.parseFrom(data); 202 } 203 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)204 public static com.google.cloud.channel.v1.Constraints parseFrom( 205 com.google.protobuf.ByteString data, 206 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 207 throws com.google.protobuf.InvalidProtocolBufferException { 208 return PARSER.parseFrom(data, extensionRegistry); 209 } 210 parseFrom(byte[] data)211 public static com.google.cloud.channel.v1.Constraints parseFrom(byte[] data) 212 throws com.google.protobuf.InvalidProtocolBufferException { 213 return PARSER.parseFrom(data); 214 } 215 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)216 public static com.google.cloud.channel.v1.Constraints parseFrom( 217 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 218 throws com.google.protobuf.InvalidProtocolBufferException { 219 return PARSER.parseFrom(data, extensionRegistry); 220 } 221 parseFrom(java.io.InputStream input)222 public static com.google.cloud.channel.v1.Constraints parseFrom(java.io.InputStream input) 223 throws java.io.IOException { 224 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 225 } 226 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)227 public static com.google.cloud.channel.v1.Constraints parseFrom( 228 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 229 throws java.io.IOException { 230 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 231 PARSER, input, extensionRegistry); 232 } 233 parseDelimitedFrom( java.io.InputStream input)234 public static com.google.cloud.channel.v1.Constraints parseDelimitedFrom( 235 java.io.InputStream input) throws java.io.IOException { 236 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 237 } 238 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)239 public static com.google.cloud.channel.v1.Constraints parseDelimitedFrom( 240 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 241 throws java.io.IOException { 242 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 243 PARSER, input, extensionRegistry); 244 } 245 parseFrom( com.google.protobuf.CodedInputStream input)246 public static com.google.cloud.channel.v1.Constraints parseFrom( 247 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 248 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 249 } 250 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)251 public static com.google.cloud.channel.v1.Constraints parseFrom( 252 com.google.protobuf.CodedInputStream input, 253 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 254 throws java.io.IOException { 255 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 256 PARSER, input, extensionRegistry); 257 } 258 259 @java.lang.Override newBuilderForType()260 public Builder newBuilderForType() { 261 return newBuilder(); 262 } 263 newBuilder()264 public static Builder newBuilder() { 265 return DEFAULT_INSTANCE.toBuilder(); 266 } 267 newBuilder(com.google.cloud.channel.v1.Constraints prototype)268 public static Builder newBuilder(com.google.cloud.channel.v1.Constraints prototype) { 269 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 270 } 271 272 @java.lang.Override toBuilder()273 public Builder toBuilder() { 274 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 275 } 276 277 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)278 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 279 Builder builder = new Builder(parent); 280 return builder; 281 } 282 /** 283 * 284 * 285 * <pre> 286 * Represents the constraints for buying the Offer. 287 * </pre> 288 * 289 * Protobuf type {@code google.cloud.channel.v1.Constraints} 290 */ 291 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 292 implements 293 // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.Constraints) 294 com.google.cloud.channel.v1.ConstraintsOrBuilder { getDescriptor()295 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 296 return com.google.cloud.channel.v1.OffersProto 297 .internal_static_google_cloud_channel_v1_Constraints_descriptor; 298 } 299 300 @java.lang.Override 301 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()302 internalGetFieldAccessorTable() { 303 return com.google.cloud.channel.v1.OffersProto 304 .internal_static_google_cloud_channel_v1_Constraints_fieldAccessorTable 305 .ensureFieldAccessorsInitialized( 306 com.google.cloud.channel.v1.Constraints.class, 307 com.google.cloud.channel.v1.Constraints.Builder.class); 308 } 309 310 // Construct using com.google.cloud.channel.v1.Constraints.newBuilder() Builder()311 private Builder() {} 312 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)313 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 314 super(parent); 315 } 316 317 @java.lang.Override clear()318 public Builder clear() { 319 super.clear(); 320 bitField0_ = 0; 321 customerConstraints_ = null; 322 if (customerConstraintsBuilder_ != null) { 323 customerConstraintsBuilder_.dispose(); 324 customerConstraintsBuilder_ = null; 325 } 326 return this; 327 } 328 329 @java.lang.Override getDescriptorForType()330 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 331 return com.google.cloud.channel.v1.OffersProto 332 .internal_static_google_cloud_channel_v1_Constraints_descriptor; 333 } 334 335 @java.lang.Override getDefaultInstanceForType()336 public com.google.cloud.channel.v1.Constraints getDefaultInstanceForType() { 337 return com.google.cloud.channel.v1.Constraints.getDefaultInstance(); 338 } 339 340 @java.lang.Override build()341 public com.google.cloud.channel.v1.Constraints build() { 342 com.google.cloud.channel.v1.Constraints result = buildPartial(); 343 if (!result.isInitialized()) { 344 throw newUninitializedMessageException(result); 345 } 346 return result; 347 } 348 349 @java.lang.Override buildPartial()350 public com.google.cloud.channel.v1.Constraints buildPartial() { 351 com.google.cloud.channel.v1.Constraints result = 352 new com.google.cloud.channel.v1.Constraints(this); 353 if (bitField0_ != 0) { 354 buildPartial0(result); 355 } 356 onBuilt(); 357 return result; 358 } 359 buildPartial0(com.google.cloud.channel.v1.Constraints result)360 private void buildPartial0(com.google.cloud.channel.v1.Constraints result) { 361 int from_bitField0_ = bitField0_; 362 if (((from_bitField0_ & 0x00000001) != 0)) { 363 result.customerConstraints_ = 364 customerConstraintsBuilder_ == null 365 ? customerConstraints_ 366 : customerConstraintsBuilder_.build(); 367 } 368 } 369 370 @java.lang.Override clone()371 public Builder clone() { 372 return super.clone(); 373 } 374 375 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)376 public Builder setField( 377 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 378 return super.setField(field, value); 379 } 380 381 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)382 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 383 return super.clearField(field); 384 } 385 386 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)387 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 388 return super.clearOneof(oneof); 389 } 390 391 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)392 public Builder setRepeatedField( 393 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 394 return super.setRepeatedField(field, index, value); 395 } 396 397 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)398 public Builder addRepeatedField( 399 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 400 return super.addRepeatedField(field, value); 401 } 402 403 @java.lang.Override mergeFrom(com.google.protobuf.Message other)404 public Builder mergeFrom(com.google.protobuf.Message other) { 405 if (other instanceof com.google.cloud.channel.v1.Constraints) { 406 return mergeFrom((com.google.cloud.channel.v1.Constraints) other); 407 } else { 408 super.mergeFrom(other); 409 return this; 410 } 411 } 412 mergeFrom(com.google.cloud.channel.v1.Constraints other)413 public Builder mergeFrom(com.google.cloud.channel.v1.Constraints other) { 414 if (other == com.google.cloud.channel.v1.Constraints.getDefaultInstance()) return this; 415 if (other.hasCustomerConstraints()) { 416 mergeCustomerConstraints(other.getCustomerConstraints()); 417 } 418 this.mergeUnknownFields(other.getUnknownFields()); 419 onChanged(); 420 return this; 421 } 422 423 @java.lang.Override isInitialized()424 public final boolean isInitialized() { 425 return true; 426 } 427 428 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)429 public Builder mergeFrom( 430 com.google.protobuf.CodedInputStream input, 431 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 432 throws java.io.IOException { 433 if (extensionRegistry == null) { 434 throw new java.lang.NullPointerException(); 435 } 436 try { 437 boolean done = false; 438 while (!done) { 439 int tag = input.readTag(); 440 switch (tag) { 441 case 0: 442 done = true; 443 break; 444 case 10: 445 { 446 input.readMessage( 447 getCustomerConstraintsFieldBuilder().getBuilder(), extensionRegistry); 448 bitField0_ |= 0x00000001; 449 break; 450 } // case 10 451 default: 452 { 453 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 454 done = true; // was an endgroup tag 455 } 456 break; 457 } // default: 458 } // switch (tag) 459 } // while (!done) 460 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 461 throw e.unwrapIOException(); 462 } finally { 463 onChanged(); 464 } // finally 465 return this; 466 } 467 468 private int bitField0_; 469 470 private com.google.cloud.channel.v1.CustomerConstraints customerConstraints_; 471 private com.google.protobuf.SingleFieldBuilderV3< 472 com.google.cloud.channel.v1.CustomerConstraints, 473 com.google.cloud.channel.v1.CustomerConstraints.Builder, 474 com.google.cloud.channel.v1.CustomerConstraintsOrBuilder> 475 customerConstraintsBuilder_; 476 /** 477 * 478 * 479 * <pre> 480 * Represents constraints required to purchase the Offer for a customer. 481 * </pre> 482 * 483 * <code>.google.cloud.channel.v1.CustomerConstraints customer_constraints = 1;</code> 484 * 485 * @return Whether the customerConstraints field is set. 486 */ hasCustomerConstraints()487 public boolean hasCustomerConstraints() { 488 return ((bitField0_ & 0x00000001) != 0); 489 } 490 /** 491 * 492 * 493 * <pre> 494 * Represents constraints required to purchase the Offer for a customer. 495 * </pre> 496 * 497 * <code>.google.cloud.channel.v1.CustomerConstraints customer_constraints = 1;</code> 498 * 499 * @return The customerConstraints. 500 */ getCustomerConstraints()501 public com.google.cloud.channel.v1.CustomerConstraints getCustomerConstraints() { 502 if (customerConstraintsBuilder_ == null) { 503 return customerConstraints_ == null 504 ? com.google.cloud.channel.v1.CustomerConstraints.getDefaultInstance() 505 : customerConstraints_; 506 } else { 507 return customerConstraintsBuilder_.getMessage(); 508 } 509 } 510 /** 511 * 512 * 513 * <pre> 514 * Represents constraints required to purchase the Offer for a customer. 515 * </pre> 516 * 517 * <code>.google.cloud.channel.v1.CustomerConstraints customer_constraints = 1;</code> 518 */ setCustomerConstraints(com.google.cloud.channel.v1.CustomerConstraints value)519 public Builder setCustomerConstraints(com.google.cloud.channel.v1.CustomerConstraints value) { 520 if (customerConstraintsBuilder_ == null) { 521 if (value == null) { 522 throw new NullPointerException(); 523 } 524 customerConstraints_ = value; 525 } else { 526 customerConstraintsBuilder_.setMessage(value); 527 } 528 bitField0_ |= 0x00000001; 529 onChanged(); 530 return this; 531 } 532 /** 533 * 534 * 535 * <pre> 536 * Represents constraints required to purchase the Offer for a customer. 537 * </pre> 538 * 539 * <code>.google.cloud.channel.v1.CustomerConstraints customer_constraints = 1;</code> 540 */ setCustomerConstraints( com.google.cloud.channel.v1.CustomerConstraints.Builder builderForValue)541 public Builder setCustomerConstraints( 542 com.google.cloud.channel.v1.CustomerConstraints.Builder builderForValue) { 543 if (customerConstraintsBuilder_ == null) { 544 customerConstraints_ = builderForValue.build(); 545 } else { 546 customerConstraintsBuilder_.setMessage(builderForValue.build()); 547 } 548 bitField0_ |= 0x00000001; 549 onChanged(); 550 return this; 551 } 552 /** 553 * 554 * 555 * <pre> 556 * Represents constraints required to purchase the Offer for a customer. 557 * </pre> 558 * 559 * <code>.google.cloud.channel.v1.CustomerConstraints customer_constraints = 1;</code> 560 */ mergeCustomerConstraints(com.google.cloud.channel.v1.CustomerConstraints value)561 public Builder mergeCustomerConstraints(com.google.cloud.channel.v1.CustomerConstraints value) { 562 if (customerConstraintsBuilder_ == null) { 563 if (((bitField0_ & 0x00000001) != 0) 564 && customerConstraints_ != null 565 && customerConstraints_ 566 != com.google.cloud.channel.v1.CustomerConstraints.getDefaultInstance()) { 567 getCustomerConstraintsBuilder().mergeFrom(value); 568 } else { 569 customerConstraints_ = value; 570 } 571 } else { 572 customerConstraintsBuilder_.mergeFrom(value); 573 } 574 bitField0_ |= 0x00000001; 575 onChanged(); 576 return this; 577 } 578 /** 579 * 580 * 581 * <pre> 582 * Represents constraints required to purchase the Offer for a customer. 583 * </pre> 584 * 585 * <code>.google.cloud.channel.v1.CustomerConstraints customer_constraints = 1;</code> 586 */ clearCustomerConstraints()587 public Builder clearCustomerConstraints() { 588 bitField0_ = (bitField0_ & ~0x00000001); 589 customerConstraints_ = null; 590 if (customerConstraintsBuilder_ != null) { 591 customerConstraintsBuilder_.dispose(); 592 customerConstraintsBuilder_ = null; 593 } 594 onChanged(); 595 return this; 596 } 597 /** 598 * 599 * 600 * <pre> 601 * Represents constraints required to purchase the Offer for a customer. 602 * </pre> 603 * 604 * <code>.google.cloud.channel.v1.CustomerConstraints customer_constraints = 1;</code> 605 */ getCustomerConstraintsBuilder()606 public com.google.cloud.channel.v1.CustomerConstraints.Builder getCustomerConstraintsBuilder() { 607 bitField0_ |= 0x00000001; 608 onChanged(); 609 return getCustomerConstraintsFieldBuilder().getBuilder(); 610 } 611 /** 612 * 613 * 614 * <pre> 615 * Represents constraints required to purchase the Offer for a customer. 616 * </pre> 617 * 618 * <code>.google.cloud.channel.v1.CustomerConstraints customer_constraints = 1;</code> 619 */ 620 public com.google.cloud.channel.v1.CustomerConstraintsOrBuilder getCustomerConstraintsOrBuilder()621 getCustomerConstraintsOrBuilder() { 622 if (customerConstraintsBuilder_ != null) { 623 return customerConstraintsBuilder_.getMessageOrBuilder(); 624 } else { 625 return customerConstraints_ == null 626 ? com.google.cloud.channel.v1.CustomerConstraints.getDefaultInstance() 627 : customerConstraints_; 628 } 629 } 630 /** 631 * 632 * 633 * <pre> 634 * Represents constraints required to purchase the Offer for a customer. 635 * </pre> 636 * 637 * <code>.google.cloud.channel.v1.CustomerConstraints customer_constraints = 1;</code> 638 */ 639 private com.google.protobuf.SingleFieldBuilderV3< 640 com.google.cloud.channel.v1.CustomerConstraints, 641 com.google.cloud.channel.v1.CustomerConstraints.Builder, 642 com.google.cloud.channel.v1.CustomerConstraintsOrBuilder> getCustomerConstraintsFieldBuilder()643 getCustomerConstraintsFieldBuilder() { 644 if (customerConstraintsBuilder_ == null) { 645 customerConstraintsBuilder_ = 646 new com.google.protobuf.SingleFieldBuilderV3< 647 com.google.cloud.channel.v1.CustomerConstraints, 648 com.google.cloud.channel.v1.CustomerConstraints.Builder, 649 com.google.cloud.channel.v1.CustomerConstraintsOrBuilder>( 650 getCustomerConstraints(), getParentForChildren(), isClean()); 651 customerConstraints_ = null; 652 } 653 return customerConstraintsBuilder_; 654 } 655 656 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)657 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 658 return super.setUnknownFields(unknownFields); 659 } 660 661 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)662 public final Builder mergeUnknownFields( 663 final com.google.protobuf.UnknownFieldSet unknownFields) { 664 return super.mergeUnknownFields(unknownFields); 665 } 666 667 // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.Constraints) 668 } 669 670 // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.Constraints) 671 private static final com.google.cloud.channel.v1.Constraints DEFAULT_INSTANCE; 672 673 static { 674 DEFAULT_INSTANCE = new com.google.cloud.channel.v1.Constraints(); 675 } 676 getDefaultInstance()677 public static com.google.cloud.channel.v1.Constraints getDefaultInstance() { 678 return DEFAULT_INSTANCE; 679 } 680 681 private static final com.google.protobuf.Parser<Constraints> PARSER = 682 new com.google.protobuf.AbstractParser<Constraints>() { 683 @java.lang.Override 684 public Constraints parsePartialFrom( 685 com.google.protobuf.CodedInputStream input, 686 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 687 throws com.google.protobuf.InvalidProtocolBufferException { 688 Builder builder = newBuilder(); 689 try { 690 builder.mergeFrom(input, extensionRegistry); 691 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 692 throw e.setUnfinishedMessage(builder.buildPartial()); 693 } catch (com.google.protobuf.UninitializedMessageException e) { 694 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 695 } catch (java.io.IOException e) { 696 throw new com.google.protobuf.InvalidProtocolBufferException(e) 697 .setUnfinishedMessage(builder.buildPartial()); 698 } 699 return builder.buildPartial(); 700 } 701 }; 702 parser()703 public static com.google.protobuf.Parser<Constraints> parser() { 704 return PARSER; 705 } 706 707 @java.lang.Override getParserForType()708 public com.google.protobuf.Parser<Constraints> getParserForType() { 709 return PARSER; 710 } 711 712 @java.lang.Override getDefaultInstanceForType()713 public com.google.cloud.channel.v1.Constraints getDefaultInstanceForType() { 714 return DEFAULT_INSTANCE; 715 } 716 } 717