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