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/budgets/v1/budget_model.proto 18 19 package com.google.cloud.billing.budgets.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * A budget is a plan that describes what you expect to spend on Cloud 26 * projects, plus the rules to execute as spend is tracked against that plan, 27 * (for example, send an alert when 90% of the target spend is met). 28 * The budget time period is configurable, with options such as month (default), 29 * quarter, year, or custom time period. 30 * </pre> 31 * 32 * Protobuf type {@code google.cloud.billing.budgets.v1.Budget} 33 */ 34 public final class Budget extends com.google.protobuf.GeneratedMessageV3 35 implements 36 // @@protoc_insertion_point(message_implements:google.cloud.billing.budgets.v1.Budget) 37 BudgetOrBuilder { 38 private static final long serialVersionUID = 0L; 39 // Use Budget.newBuilder() to construct. Budget(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)40 private Budget(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 41 super(builder); 42 } 43 Budget()44 private Budget() { 45 name_ = ""; 46 displayName_ = ""; 47 thresholdRules_ = java.util.Collections.emptyList(); 48 etag_ = ""; 49 } 50 51 @java.lang.Override 52 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)53 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 54 return new Budget(); 55 } 56 57 @java.lang.Override getUnknownFields()58 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 59 return this.unknownFields; 60 } 61 getDescriptor()62 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 63 return com.google.cloud.billing.budgets.v1.BudgetModelProto 64 .internal_static_google_cloud_billing_budgets_v1_Budget_descriptor; 65 } 66 67 @java.lang.Override 68 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()69 internalGetFieldAccessorTable() { 70 return com.google.cloud.billing.budgets.v1.BudgetModelProto 71 .internal_static_google_cloud_billing_budgets_v1_Budget_fieldAccessorTable 72 .ensureFieldAccessorsInitialized( 73 com.google.cloud.billing.budgets.v1.Budget.class, 74 com.google.cloud.billing.budgets.v1.Budget.Builder.class); 75 } 76 77 public static final int NAME_FIELD_NUMBER = 1; 78 79 @SuppressWarnings("serial") 80 private volatile java.lang.Object name_ = ""; 81 /** 82 * 83 * 84 * <pre> 85 * Output only. Resource name of the budget. 86 * The resource name implies the scope of a budget. Values are of the form 87 * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. 88 * </pre> 89 * 90 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 91 * 92 * @return The name. 93 */ 94 @java.lang.Override getName()95 public java.lang.String getName() { 96 java.lang.Object ref = name_; 97 if (ref instanceof java.lang.String) { 98 return (java.lang.String) ref; 99 } else { 100 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 101 java.lang.String s = bs.toStringUtf8(); 102 name_ = s; 103 return s; 104 } 105 } 106 /** 107 * 108 * 109 * <pre> 110 * Output only. Resource name of the budget. 111 * The resource name implies the scope of a budget. Values are of the form 112 * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. 113 * </pre> 114 * 115 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 116 * 117 * @return The bytes for name. 118 */ 119 @java.lang.Override getNameBytes()120 public com.google.protobuf.ByteString getNameBytes() { 121 java.lang.Object ref = name_; 122 if (ref instanceof java.lang.String) { 123 com.google.protobuf.ByteString b = 124 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 125 name_ = b; 126 return b; 127 } else { 128 return (com.google.protobuf.ByteString) ref; 129 } 130 } 131 132 public static final int DISPLAY_NAME_FIELD_NUMBER = 2; 133 134 @SuppressWarnings("serial") 135 private volatile java.lang.Object displayName_ = ""; 136 /** 137 * 138 * 139 * <pre> 140 * User data for display name in UI. The name must be less than or equal to 60 141 * characters. 142 * </pre> 143 * 144 * <code>string display_name = 2;</code> 145 * 146 * @return The displayName. 147 */ 148 @java.lang.Override getDisplayName()149 public java.lang.String getDisplayName() { 150 java.lang.Object ref = displayName_; 151 if (ref instanceof java.lang.String) { 152 return (java.lang.String) ref; 153 } else { 154 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 155 java.lang.String s = bs.toStringUtf8(); 156 displayName_ = s; 157 return s; 158 } 159 } 160 /** 161 * 162 * 163 * <pre> 164 * User data for display name in UI. The name must be less than or equal to 60 165 * characters. 166 * </pre> 167 * 168 * <code>string display_name = 2;</code> 169 * 170 * @return The bytes for displayName. 171 */ 172 @java.lang.Override getDisplayNameBytes()173 public com.google.protobuf.ByteString getDisplayNameBytes() { 174 java.lang.Object ref = displayName_; 175 if (ref instanceof java.lang.String) { 176 com.google.protobuf.ByteString b = 177 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 178 displayName_ = b; 179 return b; 180 } else { 181 return (com.google.protobuf.ByteString) ref; 182 } 183 } 184 185 public static final int BUDGET_FILTER_FIELD_NUMBER = 3; 186 private com.google.cloud.billing.budgets.v1.Filter budgetFilter_; 187 /** 188 * 189 * 190 * <pre> 191 * Optional. Filters that define which resources are used to compute the 192 * actual spend against the budget amount, such as projects, services, and the 193 * budget's time period, as well as other filters. 194 * </pre> 195 * 196 * <code> 197 * .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; 198 * </code> 199 * 200 * @return Whether the budgetFilter field is set. 201 */ 202 @java.lang.Override hasBudgetFilter()203 public boolean hasBudgetFilter() { 204 return budgetFilter_ != null; 205 } 206 /** 207 * 208 * 209 * <pre> 210 * Optional. Filters that define which resources are used to compute the 211 * actual spend against the budget amount, such as projects, services, and the 212 * budget's time period, as well as other filters. 213 * </pre> 214 * 215 * <code> 216 * .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; 217 * </code> 218 * 219 * @return The budgetFilter. 220 */ 221 @java.lang.Override getBudgetFilter()222 public com.google.cloud.billing.budgets.v1.Filter getBudgetFilter() { 223 return budgetFilter_ == null 224 ? com.google.cloud.billing.budgets.v1.Filter.getDefaultInstance() 225 : budgetFilter_; 226 } 227 /** 228 * 229 * 230 * <pre> 231 * Optional. Filters that define which resources are used to compute the 232 * actual spend against the budget amount, such as projects, services, and the 233 * budget's time period, as well as other filters. 234 * </pre> 235 * 236 * <code> 237 * .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; 238 * </code> 239 */ 240 @java.lang.Override getBudgetFilterOrBuilder()241 public com.google.cloud.billing.budgets.v1.FilterOrBuilder getBudgetFilterOrBuilder() { 242 return budgetFilter_ == null 243 ? com.google.cloud.billing.budgets.v1.Filter.getDefaultInstance() 244 : budgetFilter_; 245 } 246 247 public static final int AMOUNT_FIELD_NUMBER = 4; 248 private com.google.cloud.billing.budgets.v1.BudgetAmount amount_; 249 /** 250 * 251 * 252 * <pre> 253 * Required. Budgeted amount. 254 * </pre> 255 * 256 * <code> 257 * .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; 258 * </code> 259 * 260 * @return Whether the amount field is set. 261 */ 262 @java.lang.Override hasAmount()263 public boolean hasAmount() { 264 return amount_ != null; 265 } 266 /** 267 * 268 * 269 * <pre> 270 * Required. Budgeted amount. 271 * </pre> 272 * 273 * <code> 274 * .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; 275 * </code> 276 * 277 * @return The amount. 278 */ 279 @java.lang.Override getAmount()280 public com.google.cloud.billing.budgets.v1.BudgetAmount getAmount() { 281 return amount_ == null 282 ? com.google.cloud.billing.budgets.v1.BudgetAmount.getDefaultInstance() 283 : amount_; 284 } 285 /** 286 * 287 * 288 * <pre> 289 * Required. Budgeted amount. 290 * </pre> 291 * 292 * <code> 293 * .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; 294 * </code> 295 */ 296 @java.lang.Override getAmountOrBuilder()297 public com.google.cloud.billing.budgets.v1.BudgetAmountOrBuilder getAmountOrBuilder() { 298 return amount_ == null 299 ? com.google.cloud.billing.budgets.v1.BudgetAmount.getDefaultInstance() 300 : amount_; 301 } 302 303 public static final int THRESHOLD_RULES_FIELD_NUMBER = 5; 304 305 @SuppressWarnings("serial") 306 private java.util.List<com.google.cloud.billing.budgets.v1.ThresholdRule> thresholdRules_; 307 /** 308 * 309 * 310 * <pre> 311 * Optional. Rules that trigger alerts (notifications of thresholds 312 * being crossed) when spend exceeds the specified percentages of the budget. 313 * </pre> 314 * 315 * <code> 316 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 317 * </code> 318 */ 319 @java.lang.Override getThresholdRulesList()320 public java.util.List<com.google.cloud.billing.budgets.v1.ThresholdRule> getThresholdRulesList() { 321 return thresholdRules_; 322 } 323 /** 324 * 325 * 326 * <pre> 327 * Optional. Rules that trigger alerts (notifications of thresholds 328 * being crossed) when spend exceeds the specified percentages of the budget. 329 * </pre> 330 * 331 * <code> 332 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 333 * </code> 334 */ 335 @java.lang.Override 336 public java.util.List<? extends com.google.cloud.billing.budgets.v1.ThresholdRuleOrBuilder> getThresholdRulesOrBuilderList()337 getThresholdRulesOrBuilderList() { 338 return thresholdRules_; 339 } 340 /** 341 * 342 * 343 * <pre> 344 * Optional. Rules that trigger alerts (notifications of thresholds 345 * being crossed) when spend exceeds the specified percentages of the budget. 346 * </pre> 347 * 348 * <code> 349 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 350 * </code> 351 */ 352 @java.lang.Override getThresholdRulesCount()353 public int getThresholdRulesCount() { 354 return thresholdRules_.size(); 355 } 356 /** 357 * 358 * 359 * <pre> 360 * Optional. Rules that trigger alerts (notifications of thresholds 361 * being crossed) when spend exceeds the specified percentages of the budget. 362 * </pre> 363 * 364 * <code> 365 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 366 * </code> 367 */ 368 @java.lang.Override getThresholdRules(int index)369 public com.google.cloud.billing.budgets.v1.ThresholdRule getThresholdRules(int index) { 370 return thresholdRules_.get(index); 371 } 372 /** 373 * 374 * 375 * <pre> 376 * Optional. Rules that trigger alerts (notifications of thresholds 377 * being crossed) when spend exceeds the specified percentages of the budget. 378 * </pre> 379 * 380 * <code> 381 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 382 * </code> 383 */ 384 @java.lang.Override getThresholdRulesOrBuilder( int index)385 public com.google.cloud.billing.budgets.v1.ThresholdRuleOrBuilder getThresholdRulesOrBuilder( 386 int index) { 387 return thresholdRules_.get(index); 388 } 389 390 public static final int NOTIFICATIONS_RULE_FIELD_NUMBER = 6; 391 private com.google.cloud.billing.budgets.v1.NotificationsRule notificationsRule_; 392 /** 393 * 394 * 395 * <pre> 396 * Optional. Rules to apply to notifications sent based on budget spend and 397 * thresholds. 398 * </pre> 399 * 400 * <code> 401 * .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; 402 * </code> 403 * 404 * @return Whether the notificationsRule field is set. 405 */ 406 @java.lang.Override hasNotificationsRule()407 public boolean hasNotificationsRule() { 408 return notificationsRule_ != null; 409 } 410 /** 411 * 412 * 413 * <pre> 414 * Optional. Rules to apply to notifications sent based on budget spend and 415 * thresholds. 416 * </pre> 417 * 418 * <code> 419 * .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; 420 * </code> 421 * 422 * @return The notificationsRule. 423 */ 424 @java.lang.Override getNotificationsRule()425 public com.google.cloud.billing.budgets.v1.NotificationsRule getNotificationsRule() { 426 return notificationsRule_ == null 427 ? com.google.cloud.billing.budgets.v1.NotificationsRule.getDefaultInstance() 428 : notificationsRule_; 429 } 430 /** 431 * 432 * 433 * <pre> 434 * Optional. Rules to apply to notifications sent based on budget spend and 435 * thresholds. 436 * </pre> 437 * 438 * <code> 439 * .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; 440 * </code> 441 */ 442 @java.lang.Override 443 public com.google.cloud.billing.budgets.v1.NotificationsRuleOrBuilder getNotificationsRuleOrBuilder()444 getNotificationsRuleOrBuilder() { 445 return notificationsRule_ == null 446 ? com.google.cloud.billing.budgets.v1.NotificationsRule.getDefaultInstance() 447 : notificationsRule_; 448 } 449 450 public static final int ETAG_FIELD_NUMBER = 7; 451 452 @SuppressWarnings("serial") 453 private volatile java.lang.Object etag_ = ""; 454 /** 455 * 456 * 457 * <pre> 458 * Optional. Etag to validate that the object is unchanged for a 459 * read-modify-write operation. 460 * An empty etag will cause an update to overwrite other changes. 461 * </pre> 462 * 463 * <code>string etag = 7 [(.google.api.field_behavior) = OPTIONAL];</code> 464 * 465 * @return The etag. 466 */ 467 @java.lang.Override getEtag()468 public java.lang.String getEtag() { 469 java.lang.Object ref = etag_; 470 if (ref instanceof java.lang.String) { 471 return (java.lang.String) ref; 472 } else { 473 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 474 java.lang.String s = bs.toStringUtf8(); 475 etag_ = s; 476 return s; 477 } 478 } 479 /** 480 * 481 * 482 * <pre> 483 * Optional. Etag to validate that the object is unchanged for a 484 * read-modify-write operation. 485 * An empty etag will cause an update to overwrite other changes. 486 * </pre> 487 * 488 * <code>string etag = 7 [(.google.api.field_behavior) = OPTIONAL];</code> 489 * 490 * @return The bytes for etag. 491 */ 492 @java.lang.Override getEtagBytes()493 public com.google.protobuf.ByteString getEtagBytes() { 494 java.lang.Object ref = etag_; 495 if (ref instanceof java.lang.String) { 496 com.google.protobuf.ByteString b = 497 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 498 etag_ = b; 499 return b; 500 } else { 501 return (com.google.protobuf.ByteString) ref; 502 } 503 } 504 505 private byte memoizedIsInitialized = -1; 506 507 @java.lang.Override isInitialized()508 public final boolean isInitialized() { 509 byte isInitialized = memoizedIsInitialized; 510 if (isInitialized == 1) return true; 511 if (isInitialized == 0) return false; 512 513 memoizedIsInitialized = 1; 514 return true; 515 } 516 517 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)518 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 519 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 520 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); 521 } 522 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { 523 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); 524 } 525 if (budgetFilter_ != null) { 526 output.writeMessage(3, getBudgetFilter()); 527 } 528 if (amount_ != null) { 529 output.writeMessage(4, getAmount()); 530 } 531 for (int i = 0; i < thresholdRules_.size(); i++) { 532 output.writeMessage(5, thresholdRules_.get(i)); 533 } 534 if (notificationsRule_ != null) { 535 output.writeMessage(6, getNotificationsRule()); 536 } 537 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { 538 com.google.protobuf.GeneratedMessageV3.writeString(output, 7, etag_); 539 } 540 getUnknownFields().writeTo(output); 541 } 542 543 @java.lang.Override getSerializedSize()544 public int getSerializedSize() { 545 int size = memoizedSize; 546 if (size != -1) return size; 547 548 size = 0; 549 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 550 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); 551 } 552 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { 553 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); 554 } 555 if (budgetFilter_ != null) { 556 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBudgetFilter()); 557 } 558 if (amount_ != null) { 559 size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAmount()); 560 } 561 for (int i = 0; i < thresholdRules_.size(); i++) { 562 size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, thresholdRules_.get(i)); 563 } 564 if (notificationsRule_ != null) { 565 size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getNotificationsRule()); 566 } 567 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { 568 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, etag_); 569 } 570 size += getUnknownFields().getSerializedSize(); 571 memoizedSize = size; 572 return size; 573 } 574 575 @java.lang.Override equals(final java.lang.Object obj)576 public boolean equals(final java.lang.Object obj) { 577 if (obj == this) { 578 return true; 579 } 580 if (!(obj instanceof com.google.cloud.billing.budgets.v1.Budget)) { 581 return super.equals(obj); 582 } 583 com.google.cloud.billing.budgets.v1.Budget other = 584 (com.google.cloud.billing.budgets.v1.Budget) obj; 585 586 if (!getName().equals(other.getName())) return false; 587 if (!getDisplayName().equals(other.getDisplayName())) return false; 588 if (hasBudgetFilter() != other.hasBudgetFilter()) return false; 589 if (hasBudgetFilter()) { 590 if (!getBudgetFilter().equals(other.getBudgetFilter())) return false; 591 } 592 if (hasAmount() != other.hasAmount()) return false; 593 if (hasAmount()) { 594 if (!getAmount().equals(other.getAmount())) return false; 595 } 596 if (!getThresholdRulesList().equals(other.getThresholdRulesList())) return false; 597 if (hasNotificationsRule() != other.hasNotificationsRule()) return false; 598 if (hasNotificationsRule()) { 599 if (!getNotificationsRule().equals(other.getNotificationsRule())) return false; 600 } 601 if (!getEtag().equals(other.getEtag())) return false; 602 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 603 return true; 604 } 605 606 @java.lang.Override hashCode()607 public int hashCode() { 608 if (memoizedHashCode != 0) { 609 return memoizedHashCode; 610 } 611 int hash = 41; 612 hash = (19 * hash) + getDescriptor().hashCode(); 613 hash = (37 * hash) + NAME_FIELD_NUMBER; 614 hash = (53 * hash) + getName().hashCode(); 615 hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; 616 hash = (53 * hash) + getDisplayName().hashCode(); 617 if (hasBudgetFilter()) { 618 hash = (37 * hash) + BUDGET_FILTER_FIELD_NUMBER; 619 hash = (53 * hash) + getBudgetFilter().hashCode(); 620 } 621 if (hasAmount()) { 622 hash = (37 * hash) + AMOUNT_FIELD_NUMBER; 623 hash = (53 * hash) + getAmount().hashCode(); 624 } 625 if (getThresholdRulesCount() > 0) { 626 hash = (37 * hash) + THRESHOLD_RULES_FIELD_NUMBER; 627 hash = (53 * hash) + getThresholdRulesList().hashCode(); 628 } 629 if (hasNotificationsRule()) { 630 hash = (37 * hash) + NOTIFICATIONS_RULE_FIELD_NUMBER; 631 hash = (53 * hash) + getNotificationsRule().hashCode(); 632 } 633 hash = (37 * hash) + ETAG_FIELD_NUMBER; 634 hash = (53 * hash) + getEtag().hashCode(); 635 hash = (29 * hash) + getUnknownFields().hashCode(); 636 memoizedHashCode = hash; 637 return hash; 638 } 639 parseFrom(java.nio.ByteBuffer data)640 public static com.google.cloud.billing.budgets.v1.Budget parseFrom(java.nio.ByteBuffer data) 641 throws com.google.protobuf.InvalidProtocolBufferException { 642 return PARSER.parseFrom(data); 643 } 644 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)645 public static com.google.cloud.billing.budgets.v1.Budget parseFrom( 646 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 647 throws com.google.protobuf.InvalidProtocolBufferException { 648 return PARSER.parseFrom(data, extensionRegistry); 649 } 650 parseFrom( com.google.protobuf.ByteString data)651 public static com.google.cloud.billing.budgets.v1.Budget parseFrom( 652 com.google.protobuf.ByteString data) 653 throws com.google.protobuf.InvalidProtocolBufferException { 654 return PARSER.parseFrom(data); 655 } 656 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)657 public static com.google.cloud.billing.budgets.v1.Budget parseFrom( 658 com.google.protobuf.ByteString data, 659 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 660 throws com.google.protobuf.InvalidProtocolBufferException { 661 return PARSER.parseFrom(data, extensionRegistry); 662 } 663 parseFrom(byte[] data)664 public static com.google.cloud.billing.budgets.v1.Budget parseFrom(byte[] data) 665 throws com.google.protobuf.InvalidProtocolBufferException { 666 return PARSER.parseFrom(data); 667 } 668 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)669 public static com.google.cloud.billing.budgets.v1.Budget parseFrom( 670 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 671 throws com.google.protobuf.InvalidProtocolBufferException { 672 return PARSER.parseFrom(data, extensionRegistry); 673 } 674 parseFrom(java.io.InputStream input)675 public static com.google.cloud.billing.budgets.v1.Budget parseFrom(java.io.InputStream input) 676 throws java.io.IOException { 677 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 678 } 679 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)680 public static com.google.cloud.billing.budgets.v1.Budget parseFrom( 681 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 682 throws java.io.IOException { 683 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 684 PARSER, input, extensionRegistry); 685 } 686 parseDelimitedFrom( java.io.InputStream input)687 public static com.google.cloud.billing.budgets.v1.Budget parseDelimitedFrom( 688 java.io.InputStream input) throws java.io.IOException { 689 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 690 } 691 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)692 public static com.google.cloud.billing.budgets.v1.Budget parseDelimitedFrom( 693 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 694 throws java.io.IOException { 695 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 696 PARSER, input, extensionRegistry); 697 } 698 parseFrom( com.google.protobuf.CodedInputStream input)699 public static com.google.cloud.billing.budgets.v1.Budget parseFrom( 700 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 701 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 702 } 703 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)704 public static com.google.cloud.billing.budgets.v1.Budget parseFrom( 705 com.google.protobuf.CodedInputStream input, 706 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 707 throws java.io.IOException { 708 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 709 PARSER, input, extensionRegistry); 710 } 711 712 @java.lang.Override newBuilderForType()713 public Builder newBuilderForType() { 714 return newBuilder(); 715 } 716 newBuilder()717 public static Builder newBuilder() { 718 return DEFAULT_INSTANCE.toBuilder(); 719 } 720 newBuilder(com.google.cloud.billing.budgets.v1.Budget prototype)721 public static Builder newBuilder(com.google.cloud.billing.budgets.v1.Budget prototype) { 722 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 723 } 724 725 @java.lang.Override toBuilder()726 public Builder toBuilder() { 727 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 728 } 729 730 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)731 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 732 Builder builder = new Builder(parent); 733 return builder; 734 } 735 /** 736 * 737 * 738 * <pre> 739 * A budget is a plan that describes what you expect to spend on Cloud 740 * projects, plus the rules to execute as spend is tracked against that plan, 741 * (for example, send an alert when 90% of the target spend is met). 742 * The budget time period is configurable, with options such as month (default), 743 * quarter, year, or custom time period. 744 * </pre> 745 * 746 * Protobuf type {@code google.cloud.billing.budgets.v1.Budget} 747 */ 748 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 749 implements 750 // @@protoc_insertion_point(builder_implements:google.cloud.billing.budgets.v1.Budget) 751 com.google.cloud.billing.budgets.v1.BudgetOrBuilder { getDescriptor()752 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 753 return com.google.cloud.billing.budgets.v1.BudgetModelProto 754 .internal_static_google_cloud_billing_budgets_v1_Budget_descriptor; 755 } 756 757 @java.lang.Override 758 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()759 internalGetFieldAccessorTable() { 760 return com.google.cloud.billing.budgets.v1.BudgetModelProto 761 .internal_static_google_cloud_billing_budgets_v1_Budget_fieldAccessorTable 762 .ensureFieldAccessorsInitialized( 763 com.google.cloud.billing.budgets.v1.Budget.class, 764 com.google.cloud.billing.budgets.v1.Budget.Builder.class); 765 } 766 767 // Construct using com.google.cloud.billing.budgets.v1.Budget.newBuilder() Builder()768 private Builder() {} 769 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)770 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 771 super(parent); 772 } 773 774 @java.lang.Override clear()775 public Builder clear() { 776 super.clear(); 777 bitField0_ = 0; 778 name_ = ""; 779 displayName_ = ""; 780 budgetFilter_ = null; 781 if (budgetFilterBuilder_ != null) { 782 budgetFilterBuilder_.dispose(); 783 budgetFilterBuilder_ = null; 784 } 785 amount_ = null; 786 if (amountBuilder_ != null) { 787 amountBuilder_.dispose(); 788 amountBuilder_ = null; 789 } 790 if (thresholdRulesBuilder_ == null) { 791 thresholdRules_ = java.util.Collections.emptyList(); 792 } else { 793 thresholdRules_ = null; 794 thresholdRulesBuilder_.clear(); 795 } 796 bitField0_ = (bitField0_ & ~0x00000010); 797 notificationsRule_ = null; 798 if (notificationsRuleBuilder_ != null) { 799 notificationsRuleBuilder_.dispose(); 800 notificationsRuleBuilder_ = null; 801 } 802 etag_ = ""; 803 return this; 804 } 805 806 @java.lang.Override getDescriptorForType()807 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 808 return com.google.cloud.billing.budgets.v1.BudgetModelProto 809 .internal_static_google_cloud_billing_budgets_v1_Budget_descriptor; 810 } 811 812 @java.lang.Override getDefaultInstanceForType()813 public com.google.cloud.billing.budgets.v1.Budget getDefaultInstanceForType() { 814 return com.google.cloud.billing.budgets.v1.Budget.getDefaultInstance(); 815 } 816 817 @java.lang.Override build()818 public com.google.cloud.billing.budgets.v1.Budget build() { 819 com.google.cloud.billing.budgets.v1.Budget result = buildPartial(); 820 if (!result.isInitialized()) { 821 throw newUninitializedMessageException(result); 822 } 823 return result; 824 } 825 826 @java.lang.Override buildPartial()827 public com.google.cloud.billing.budgets.v1.Budget buildPartial() { 828 com.google.cloud.billing.budgets.v1.Budget result = 829 new com.google.cloud.billing.budgets.v1.Budget(this); 830 buildPartialRepeatedFields(result); 831 if (bitField0_ != 0) { 832 buildPartial0(result); 833 } 834 onBuilt(); 835 return result; 836 } 837 buildPartialRepeatedFields(com.google.cloud.billing.budgets.v1.Budget result)838 private void buildPartialRepeatedFields(com.google.cloud.billing.budgets.v1.Budget result) { 839 if (thresholdRulesBuilder_ == null) { 840 if (((bitField0_ & 0x00000010) != 0)) { 841 thresholdRules_ = java.util.Collections.unmodifiableList(thresholdRules_); 842 bitField0_ = (bitField0_ & ~0x00000010); 843 } 844 result.thresholdRules_ = thresholdRules_; 845 } else { 846 result.thresholdRules_ = thresholdRulesBuilder_.build(); 847 } 848 } 849 buildPartial0(com.google.cloud.billing.budgets.v1.Budget result)850 private void buildPartial0(com.google.cloud.billing.budgets.v1.Budget result) { 851 int from_bitField0_ = bitField0_; 852 if (((from_bitField0_ & 0x00000001) != 0)) { 853 result.name_ = name_; 854 } 855 if (((from_bitField0_ & 0x00000002) != 0)) { 856 result.displayName_ = displayName_; 857 } 858 if (((from_bitField0_ & 0x00000004) != 0)) { 859 result.budgetFilter_ = 860 budgetFilterBuilder_ == null ? budgetFilter_ : budgetFilterBuilder_.build(); 861 } 862 if (((from_bitField0_ & 0x00000008) != 0)) { 863 result.amount_ = amountBuilder_ == null ? amount_ : amountBuilder_.build(); 864 } 865 if (((from_bitField0_ & 0x00000020) != 0)) { 866 result.notificationsRule_ = 867 notificationsRuleBuilder_ == null 868 ? notificationsRule_ 869 : notificationsRuleBuilder_.build(); 870 } 871 if (((from_bitField0_ & 0x00000040) != 0)) { 872 result.etag_ = etag_; 873 } 874 } 875 876 @java.lang.Override clone()877 public Builder clone() { 878 return super.clone(); 879 } 880 881 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)882 public Builder setField( 883 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 884 return super.setField(field, value); 885 } 886 887 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)888 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 889 return super.clearField(field); 890 } 891 892 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)893 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 894 return super.clearOneof(oneof); 895 } 896 897 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)898 public Builder setRepeatedField( 899 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 900 return super.setRepeatedField(field, index, value); 901 } 902 903 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)904 public Builder addRepeatedField( 905 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 906 return super.addRepeatedField(field, value); 907 } 908 909 @java.lang.Override mergeFrom(com.google.protobuf.Message other)910 public Builder mergeFrom(com.google.protobuf.Message other) { 911 if (other instanceof com.google.cloud.billing.budgets.v1.Budget) { 912 return mergeFrom((com.google.cloud.billing.budgets.v1.Budget) other); 913 } else { 914 super.mergeFrom(other); 915 return this; 916 } 917 } 918 mergeFrom(com.google.cloud.billing.budgets.v1.Budget other)919 public Builder mergeFrom(com.google.cloud.billing.budgets.v1.Budget other) { 920 if (other == com.google.cloud.billing.budgets.v1.Budget.getDefaultInstance()) return this; 921 if (!other.getName().isEmpty()) { 922 name_ = other.name_; 923 bitField0_ |= 0x00000001; 924 onChanged(); 925 } 926 if (!other.getDisplayName().isEmpty()) { 927 displayName_ = other.displayName_; 928 bitField0_ |= 0x00000002; 929 onChanged(); 930 } 931 if (other.hasBudgetFilter()) { 932 mergeBudgetFilter(other.getBudgetFilter()); 933 } 934 if (other.hasAmount()) { 935 mergeAmount(other.getAmount()); 936 } 937 if (thresholdRulesBuilder_ == null) { 938 if (!other.thresholdRules_.isEmpty()) { 939 if (thresholdRules_.isEmpty()) { 940 thresholdRules_ = other.thresholdRules_; 941 bitField0_ = (bitField0_ & ~0x00000010); 942 } else { 943 ensureThresholdRulesIsMutable(); 944 thresholdRules_.addAll(other.thresholdRules_); 945 } 946 onChanged(); 947 } 948 } else { 949 if (!other.thresholdRules_.isEmpty()) { 950 if (thresholdRulesBuilder_.isEmpty()) { 951 thresholdRulesBuilder_.dispose(); 952 thresholdRulesBuilder_ = null; 953 thresholdRules_ = other.thresholdRules_; 954 bitField0_ = (bitField0_ & ~0x00000010); 955 thresholdRulesBuilder_ = 956 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 957 ? getThresholdRulesFieldBuilder() 958 : null; 959 } else { 960 thresholdRulesBuilder_.addAllMessages(other.thresholdRules_); 961 } 962 } 963 } 964 if (other.hasNotificationsRule()) { 965 mergeNotificationsRule(other.getNotificationsRule()); 966 } 967 if (!other.getEtag().isEmpty()) { 968 etag_ = other.etag_; 969 bitField0_ |= 0x00000040; 970 onChanged(); 971 } 972 this.mergeUnknownFields(other.getUnknownFields()); 973 onChanged(); 974 return this; 975 } 976 977 @java.lang.Override isInitialized()978 public final boolean isInitialized() { 979 return true; 980 } 981 982 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)983 public Builder mergeFrom( 984 com.google.protobuf.CodedInputStream input, 985 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 986 throws java.io.IOException { 987 if (extensionRegistry == null) { 988 throw new java.lang.NullPointerException(); 989 } 990 try { 991 boolean done = false; 992 while (!done) { 993 int tag = input.readTag(); 994 switch (tag) { 995 case 0: 996 done = true; 997 break; 998 case 10: 999 { 1000 name_ = input.readStringRequireUtf8(); 1001 bitField0_ |= 0x00000001; 1002 break; 1003 } // case 10 1004 case 18: 1005 { 1006 displayName_ = input.readStringRequireUtf8(); 1007 bitField0_ |= 0x00000002; 1008 break; 1009 } // case 18 1010 case 26: 1011 { 1012 input.readMessage(getBudgetFilterFieldBuilder().getBuilder(), extensionRegistry); 1013 bitField0_ |= 0x00000004; 1014 break; 1015 } // case 26 1016 case 34: 1017 { 1018 input.readMessage(getAmountFieldBuilder().getBuilder(), extensionRegistry); 1019 bitField0_ |= 0x00000008; 1020 break; 1021 } // case 34 1022 case 42: 1023 { 1024 com.google.cloud.billing.budgets.v1.ThresholdRule m = 1025 input.readMessage( 1026 com.google.cloud.billing.budgets.v1.ThresholdRule.parser(), 1027 extensionRegistry); 1028 if (thresholdRulesBuilder_ == null) { 1029 ensureThresholdRulesIsMutable(); 1030 thresholdRules_.add(m); 1031 } else { 1032 thresholdRulesBuilder_.addMessage(m); 1033 } 1034 break; 1035 } // case 42 1036 case 50: 1037 { 1038 input.readMessage( 1039 getNotificationsRuleFieldBuilder().getBuilder(), extensionRegistry); 1040 bitField0_ |= 0x00000020; 1041 break; 1042 } // case 50 1043 case 58: 1044 { 1045 etag_ = input.readStringRequireUtf8(); 1046 bitField0_ |= 0x00000040; 1047 break; 1048 } // case 58 1049 default: 1050 { 1051 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1052 done = true; // was an endgroup tag 1053 } 1054 break; 1055 } // default: 1056 } // switch (tag) 1057 } // while (!done) 1058 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1059 throw e.unwrapIOException(); 1060 } finally { 1061 onChanged(); 1062 } // finally 1063 return this; 1064 } 1065 1066 private int bitField0_; 1067 1068 private java.lang.Object name_ = ""; 1069 /** 1070 * 1071 * 1072 * <pre> 1073 * Output only. Resource name of the budget. 1074 * The resource name implies the scope of a budget. Values are of the form 1075 * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. 1076 * </pre> 1077 * 1078 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1079 * 1080 * @return The name. 1081 */ getName()1082 public java.lang.String getName() { 1083 java.lang.Object ref = name_; 1084 if (!(ref instanceof java.lang.String)) { 1085 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1086 java.lang.String s = bs.toStringUtf8(); 1087 name_ = s; 1088 return s; 1089 } else { 1090 return (java.lang.String) ref; 1091 } 1092 } 1093 /** 1094 * 1095 * 1096 * <pre> 1097 * Output only. Resource name of the budget. 1098 * The resource name implies the scope of a budget. Values are of the form 1099 * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. 1100 * </pre> 1101 * 1102 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1103 * 1104 * @return The bytes for name. 1105 */ getNameBytes()1106 public com.google.protobuf.ByteString getNameBytes() { 1107 java.lang.Object ref = name_; 1108 if (ref instanceof String) { 1109 com.google.protobuf.ByteString b = 1110 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1111 name_ = b; 1112 return b; 1113 } else { 1114 return (com.google.protobuf.ByteString) ref; 1115 } 1116 } 1117 /** 1118 * 1119 * 1120 * <pre> 1121 * Output only. Resource name of the budget. 1122 * The resource name implies the scope of a budget. Values are of the form 1123 * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. 1124 * </pre> 1125 * 1126 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1127 * 1128 * @param value The name to set. 1129 * @return This builder for chaining. 1130 */ setName(java.lang.String value)1131 public Builder setName(java.lang.String value) { 1132 if (value == null) { 1133 throw new NullPointerException(); 1134 } 1135 name_ = value; 1136 bitField0_ |= 0x00000001; 1137 onChanged(); 1138 return this; 1139 } 1140 /** 1141 * 1142 * 1143 * <pre> 1144 * Output only. Resource name of the budget. 1145 * The resource name implies the scope of a budget. Values are of the form 1146 * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. 1147 * </pre> 1148 * 1149 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1150 * 1151 * @return This builder for chaining. 1152 */ clearName()1153 public Builder clearName() { 1154 name_ = getDefaultInstance().getName(); 1155 bitField0_ = (bitField0_ & ~0x00000001); 1156 onChanged(); 1157 return this; 1158 } 1159 /** 1160 * 1161 * 1162 * <pre> 1163 * Output only. Resource name of the budget. 1164 * The resource name implies the scope of a budget. Values are of the form 1165 * `billingAccounts/{billingAccountId}/budgets/{budgetId}`. 1166 * </pre> 1167 * 1168 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1169 * 1170 * @param value The bytes for name to set. 1171 * @return This builder for chaining. 1172 */ setNameBytes(com.google.protobuf.ByteString value)1173 public Builder setNameBytes(com.google.protobuf.ByteString value) { 1174 if (value == null) { 1175 throw new NullPointerException(); 1176 } 1177 checkByteStringIsUtf8(value); 1178 name_ = value; 1179 bitField0_ |= 0x00000001; 1180 onChanged(); 1181 return this; 1182 } 1183 1184 private java.lang.Object displayName_ = ""; 1185 /** 1186 * 1187 * 1188 * <pre> 1189 * User data for display name in UI. The name must be less than or equal to 60 1190 * characters. 1191 * </pre> 1192 * 1193 * <code>string display_name = 2;</code> 1194 * 1195 * @return The displayName. 1196 */ getDisplayName()1197 public java.lang.String getDisplayName() { 1198 java.lang.Object ref = displayName_; 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 displayName_ = s; 1203 return s; 1204 } else { 1205 return (java.lang.String) ref; 1206 } 1207 } 1208 /** 1209 * 1210 * 1211 * <pre> 1212 * User data for display name in UI. The name must be less than or equal to 60 1213 * characters. 1214 * </pre> 1215 * 1216 * <code>string display_name = 2;</code> 1217 * 1218 * @return The bytes for displayName. 1219 */ getDisplayNameBytes()1220 public com.google.protobuf.ByteString getDisplayNameBytes() { 1221 java.lang.Object ref = displayName_; 1222 if (ref instanceof String) { 1223 com.google.protobuf.ByteString b = 1224 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1225 displayName_ = b; 1226 return b; 1227 } else { 1228 return (com.google.protobuf.ByteString) ref; 1229 } 1230 } 1231 /** 1232 * 1233 * 1234 * <pre> 1235 * User data for display name in UI. The name must be less than or equal to 60 1236 * characters. 1237 * </pre> 1238 * 1239 * <code>string display_name = 2;</code> 1240 * 1241 * @param value The displayName to set. 1242 * @return This builder for chaining. 1243 */ setDisplayName(java.lang.String value)1244 public Builder setDisplayName(java.lang.String value) { 1245 if (value == null) { 1246 throw new NullPointerException(); 1247 } 1248 displayName_ = value; 1249 bitField0_ |= 0x00000002; 1250 onChanged(); 1251 return this; 1252 } 1253 /** 1254 * 1255 * 1256 * <pre> 1257 * User data for display name in UI. The name must be less than or equal to 60 1258 * characters. 1259 * </pre> 1260 * 1261 * <code>string display_name = 2;</code> 1262 * 1263 * @return This builder for chaining. 1264 */ clearDisplayName()1265 public Builder clearDisplayName() { 1266 displayName_ = getDefaultInstance().getDisplayName(); 1267 bitField0_ = (bitField0_ & ~0x00000002); 1268 onChanged(); 1269 return this; 1270 } 1271 /** 1272 * 1273 * 1274 * <pre> 1275 * User data for display name in UI. The name must be less than or equal to 60 1276 * characters. 1277 * </pre> 1278 * 1279 * <code>string display_name = 2;</code> 1280 * 1281 * @param value The bytes for displayName to set. 1282 * @return This builder for chaining. 1283 */ setDisplayNameBytes(com.google.protobuf.ByteString value)1284 public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { 1285 if (value == null) { 1286 throw new NullPointerException(); 1287 } 1288 checkByteStringIsUtf8(value); 1289 displayName_ = value; 1290 bitField0_ |= 0x00000002; 1291 onChanged(); 1292 return this; 1293 } 1294 1295 private com.google.cloud.billing.budgets.v1.Filter budgetFilter_; 1296 private com.google.protobuf.SingleFieldBuilderV3< 1297 com.google.cloud.billing.budgets.v1.Filter, 1298 com.google.cloud.billing.budgets.v1.Filter.Builder, 1299 com.google.cloud.billing.budgets.v1.FilterOrBuilder> 1300 budgetFilterBuilder_; 1301 /** 1302 * 1303 * 1304 * <pre> 1305 * Optional. Filters that define which resources are used to compute the 1306 * actual spend against the budget amount, such as projects, services, and the 1307 * budget's time period, as well as other filters. 1308 * </pre> 1309 * 1310 * <code> 1311 * .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; 1312 * </code> 1313 * 1314 * @return Whether the budgetFilter field is set. 1315 */ hasBudgetFilter()1316 public boolean hasBudgetFilter() { 1317 return ((bitField0_ & 0x00000004) != 0); 1318 } 1319 /** 1320 * 1321 * 1322 * <pre> 1323 * Optional. Filters that define which resources are used to compute the 1324 * actual spend against the budget amount, such as projects, services, and the 1325 * budget's time period, as well as other filters. 1326 * </pre> 1327 * 1328 * <code> 1329 * .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; 1330 * </code> 1331 * 1332 * @return The budgetFilter. 1333 */ getBudgetFilter()1334 public com.google.cloud.billing.budgets.v1.Filter getBudgetFilter() { 1335 if (budgetFilterBuilder_ == null) { 1336 return budgetFilter_ == null 1337 ? com.google.cloud.billing.budgets.v1.Filter.getDefaultInstance() 1338 : budgetFilter_; 1339 } else { 1340 return budgetFilterBuilder_.getMessage(); 1341 } 1342 } 1343 /** 1344 * 1345 * 1346 * <pre> 1347 * Optional. Filters that define which resources are used to compute the 1348 * actual spend against the budget amount, such as projects, services, and the 1349 * budget's time period, as well as other filters. 1350 * </pre> 1351 * 1352 * <code> 1353 * .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; 1354 * </code> 1355 */ setBudgetFilter(com.google.cloud.billing.budgets.v1.Filter value)1356 public Builder setBudgetFilter(com.google.cloud.billing.budgets.v1.Filter value) { 1357 if (budgetFilterBuilder_ == null) { 1358 if (value == null) { 1359 throw new NullPointerException(); 1360 } 1361 budgetFilter_ = value; 1362 } else { 1363 budgetFilterBuilder_.setMessage(value); 1364 } 1365 bitField0_ |= 0x00000004; 1366 onChanged(); 1367 return this; 1368 } 1369 /** 1370 * 1371 * 1372 * <pre> 1373 * Optional. Filters that define which resources are used to compute the 1374 * actual spend against the budget amount, such as projects, services, and the 1375 * budget's time period, as well as other filters. 1376 * </pre> 1377 * 1378 * <code> 1379 * .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; 1380 * </code> 1381 */ setBudgetFilter( com.google.cloud.billing.budgets.v1.Filter.Builder builderForValue)1382 public Builder setBudgetFilter( 1383 com.google.cloud.billing.budgets.v1.Filter.Builder builderForValue) { 1384 if (budgetFilterBuilder_ == null) { 1385 budgetFilter_ = builderForValue.build(); 1386 } else { 1387 budgetFilterBuilder_.setMessage(builderForValue.build()); 1388 } 1389 bitField0_ |= 0x00000004; 1390 onChanged(); 1391 return this; 1392 } 1393 /** 1394 * 1395 * 1396 * <pre> 1397 * Optional. Filters that define which resources are used to compute the 1398 * actual spend against the budget amount, such as projects, services, and the 1399 * budget's time period, as well as other filters. 1400 * </pre> 1401 * 1402 * <code> 1403 * .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; 1404 * </code> 1405 */ mergeBudgetFilter(com.google.cloud.billing.budgets.v1.Filter value)1406 public Builder mergeBudgetFilter(com.google.cloud.billing.budgets.v1.Filter value) { 1407 if (budgetFilterBuilder_ == null) { 1408 if (((bitField0_ & 0x00000004) != 0) 1409 && budgetFilter_ != null 1410 && budgetFilter_ != com.google.cloud.billing.budgets.v1.Filter.getDefaultInstance()) { 1411 getBudgetFilterBuilder().mergeFrom(value); 1412 } else { 1413 budgetFilter_ = value; 1414 } 1415 } else { 1416 budgetFilterBuilder_.mergeFrom(value); 1417 } 1418 bitField0_ |= 0x00000004; 1419 onChanged(); 1420 return this; 1421 } 1422 /** 1423 * 1424 * 1425 * <pre> 1426 * Optional. Filters that define which resources are used to compute the 1427 * actual spend against the budget amount, such as projects, services, and the 1428 * budget's time period, as well as other filters. 1429 * </pre> 1430 * 1431 * <code> 1432 * .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; 1433 * </code> 1434 */ clearBudgetFilter()1435 public Builder clearBudgetFilter() { 1436 bitField0_ = (bitField0_ & ~0x00000004); 1437 budgetFilter_ = null; 1438 if (budgetFilterBuilder_ != null) { 1439 budgetFilterBuilder_.dispose(); 1440 budgetFilterBuilder_ = null; 1441 } 1442 onChanged(); 1443 return this; 1444 } 1445 /** 1446 * 1447 * 1448 * <pre> 1449 * Optional. Filters that define which resources are used to compute the 1450 * actual spend against the budget amount, such as projects, services, and the 1451 * budget's time period, as well as other filters. 1452 * </pre> 1453 * 1454 * <code> 1455 * .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; 1456 * </code> 1457 */ getBudgetFilterBuilder()1458 public com.google.cloud.billing.budgets.v1.Filter.Builder getBudgetFilterBuilder() { 1459 bitField0_ |= 0x00000004; 1460 onChanged(); 1461 return getBudgetFilterFieldBuilder().getBuilder(); 1462 } 1463 /** 1464 * 1465 * 1466 * <pre> 1467 * Optional. Filters that define which resources are used to compute the 1468 * actual spend against the budget amount, such as projects, services, and the 1469 * budget's time period, as well as other filters. 1470 * </pre> 1471 * 1472 * <code> 1473 * .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; 1474 * </code> 1475 */ getBudgetFilterOrBuilder()1476 public com.google.cloud.billing.budgets.v1.FilterOrBuilder getBudgetFilterOrBuilder() { 1477 if (budgetFilterBuilder_ != null) { 1478 return budgetFilterBuilder_.getMessageOrBuilder(); 1479 } else { 1480 return budgetFilter_ == null 1481 ? com.google.cloud.billing.budgets.v1.Filter.getDefaultInstance() 1482 : budgetFilter_; 1483 } 1484 } 1485 /** 1486 * 1487 * 1488 * <pre> 1489 * Optional. Filters that define which resources are used to compute the 1490 * actual spend against the budget amount, such as projects, services, and the 1491 * budget's time period, as well as other filters. 1492 * </pre> 1493 * 1494 * <code> 1495 * .google.cloud.billing.budgets.v1.Filter budget_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; 1496 * </code> 1497 */ 1498 private com.google.protobuf.SingleFieldBuilderV3< 1499 com.google.cloud.billing.budgets.v1.Filter, 1500 com.google.cloud.billing.budgets.v1.Filter.Builder, 1501 com.google.cloud.billing.budgets.v1.FilterOrBuilder> getBudgetFilterFieldBuilder()1502 getBudgetFilterFieldBuilder() { 1503 if (budgetFilterBuilder_ == null) { 1504 budgetFilterBuilder_ = 1505 new com.google.protobuf.SingleFieldBuilderV3< 1506 com.google.cloud.billing.budgets.v1.Filter, 1507 com.google.cloud.billing.budgets.v1.Filter.Builder, 1508 com.google.cloud.billing.budgets.v1.FilterOrBuilder>( 1509 getBudgetFilter(), getParentForChildren(), isClean()); 1510 budgetFilter_ = null; 1511 } 1512 return budgetFilterBuilder_; 1513 } 1514 1515 private com.google.cloud.billing.budgets.v1.BudgetAmount amount_; 1516 private com.google.protobuf.SingleFieldBuilderV3< 1517 com.google.cloud.billing.budgets.v1.BudgetAmount, 1518 com.google.cloud.billing.budgets.v1.BudgetAmount.Builder, 1519 com.google.cloud.billing.budgets.v1.BudgetAmountOrBuilder> 1520 amountBuilder_; 1521 /** 1522 * 1523 * 1524 * <pre> 1525 * Required. Budgeted amount. 1526 * </pre> 1527 * 1528 * <code> 1529 * .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; 1530 * </code> 1531 * 1532 * @return Whether the amount field is set. 1533 */ hasAmount()1534 public boolean hasAmount() { 1535 return ((bitField0_ & 0x00000008) != 0); 1536 } 1537 /** 1538 * 1539 * 1540 * <pre> 1541 * Required. Budgeted amount. 1542 * </pre> 1543 * 1544 * <code> 1545 * .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; 1546 * </code> 1547 * 1548 * @return The amount. 1549 */ getAmount()1550 public com.google.cloud.billing.budgets.v1.BudgetAmount getAmount() { 1551 if (amountBuilder_ == null) { 1552 return amount_ == null 1553 ? com.google.cloud.billing.budgets.v1.BudgetAmount.getDefaultInstance() 1554 : amount_; 1555 } else { 1556 return amountBuilder_.getMessage(); 1557 } 1558 } 1559 /** 1560 * 1561 * 1562 * <pre> 1563 * Required. Budgeted amount. 1564 * </pre> 1565 * 1566 * <code> 1567 * .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; 1568 * </code> 1569 */ setAmount(com.google.cloud.billing.budgets.v1.BudgetAmount value)1570 public Builder setAmount(com.google.cloud.billing.budgets.v1.BudgetAmount value) { 1571 if (amountBuilder_ == null) { 1572 if (value == null) { 1573 throw new NullPointerException(); 1574 } 1575 amount_ = value; 1576 } else { 1577 amountBuilder_.setMessage(value); 1578 } 1579 bitField0_ |= 0x00000008; 1580 onChanged(); 1581 return this; 1582 } 1583 /** 1584 * 1585 * 1586 * <pre> 1587 * Required. Budgeted amount. 1588 * </pre> 1589 * 1590 * <code> 1591 * .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; 1592 * </code> 1593 */ setAmount( com.google.cloud.billing.budgets.v1.BudgetAmount.Builder builderForValue)1594 public Builder setAmount( 1595 com.google.cloud.billing.budgets.v1.BudgetAmount.Builder builderForValue) { 1596 if (amountBuilder_ == null) { 1597 amount_ = builderForValue.build(); 1598 } else { 1599 amountBuilder_.setMessage(builderForValue.build()); 1600 } 1601 bitField0_ |= 0x00000008; 1602 onChanged(); 1603 return this; 1604 } 1605 /** 1606 * 1607 * 1608 * <pre> 1609 * Required. Budgeted amount. 1610 * </pre> 1611 * 1612 * <code> 1613 * .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; 1614 * </code> 1615 */ mergeAmount(com.google.cloud.billing.budgets.v1.BudgetAmount value)1616 public Builder mergeAmount(com.google.cloud.billing.budgets.v1.BudgetAmount value) { 1617 if (amountBuilder_ == null) { 1618 if (((bitField0_ & 0x00000008) != 0) 1619 && amount_ != null 1620 && amount_ != com.google.cloud.billing.budgets.v1.BudgetAmount.getDefaultInstance()) { 1621 getAmountBuilder().mergeFrom(value); 1622 } else { 1623 amount_ = value; 1624 } 1625 } else { 1626 amountBuilder_.mergeFrom(value); 1627 } 1628 bitField0_ |= 0x00000008; 1629 onChanged(); 1630 return this; 1631 } 1632 /** 1633 * 1634 * 1635 * <pre> 1636 * Required. Budgeted amount. 1637 * </pre> 1638 * 1639 * <code> 1640 * .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; 1641 * </code> 1642 */ clearAmount()1643 public Builder clearAmount() { 1644 bitField0_ = (bitField0_ & ~0x00000008); 1645 amount_ = null; 1646 if (amountBuilder_ != null) { 1647 amountBuilder_.dispose(); 1648 amountBuilder_ = null; 1649 } 1650 onChanged(); 1651 return this; 1652 } 1653 /** 1654 * 1655 * 1656 * <pre> 1657 * Required. Budgeted amount. 1658 * </pre> 1659 * 1660 * <code> 1661 * .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; 1662 * </code> 1663 */ getAmountBuilder()1664 public com.google.cloud.billing.budgets.v1.BudgetAmount.Builder getAmountBuilder() { 1665 bitField0_ |= 0x00000008; 1666 onChanged(); 1667 return getAmountFieldBuilder().getBuilder(); 1668 } 1669 /** 1670 * 1671 * 1672 * <pre> 1673 * Required. Budgeted amount. 1674 * </pre> 1675 * 1676 * <code> 1677 * .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; 1678 * </code> 1679 */ getAmountOrBuilder()1680 public com.google.cloud.billing.budgets.v1.BudgetAmountOrBuilder getAmountOrBuilder() { 1681 if (amountBuilder_ != null) { 1682 return amountBuilder_.getMessageOrBuilder(); 1683 } else { 1684 return amount_ == null 1685 ? com.google.cloud.billing.budgets.v1.BudgetAmount.getDefaultInstance() 1686 : amount_; 1687 } 1688 } 1689 /** 1690 * 1691 * 1692 * <pre> 1693 * Required. Budgeted amount. 1694 * </pre> 1695 * 1696 * <code> 1697 * .google.cloud.billing.budgets.v1.BudgetAmount amount = 4 [(.google.api.field_behavior) = REQUIRED]; 1698 * </code> 1699 */ 1700 private com.google.protobuf.SingleFieldBuilderV3< 1701 com.google.cloud.billing.budgets.v1.BudgetAmount, 1702 com.google.cloud.billing.budgets.v1.BudgetAmount.Builder, 1703 com.google.cloud.billing.budgets.v1.BudgetAmountOrBuilder> getAmountFieldBuilder()1704 getAmountFieldBuilder() { 1705 if (amountBuilder_ == null) { 1706 amountBuilder_ = 1707 new com.google.protobuf.SingleFieldBuilderV3< 1708 com.google.cloud.billing.budgets.v1.BudgetAmount, 1709 com.google.cloud.billing.budgets.v1.BudgetAmount.Builder, 1710 com.google.cloud.billing.budgets.v1.BudgetAmountOrBuilder>( 1711 getAmount(), getParentForChildren(), isClean()); 1712 amount_ = null; 1713 } 1714 return amountBuilder_; 1715 } 1716 1717 private java.util.List<com.google.cloud.billing.budgets.v1.ThresholdRule> thresholdRules_ = 1718 java.util.Collections.emptyList(); 1719 ensureThresholdRulesIsMutable()1720 private void ensureThresholdRulesIsMutable() { 1721 if (!((bitField0_ & 0x00000010) != 0)) { 1722 thresholdRules_ = 1723 new java.util.ArrayList<com.google.cloud.billing.budgets.v1.ThresholdRule>( 1724 thresholdRules_); 1725 bitField0_ |= 0x00000010; 1726 } 1727 } 1728 1729 private com.google.protobuf.RepeatedFieldBuilderV3< 1730 com.google.cloud.billing.budgets.v1.ThresholdRule, 1731 com.google.cloud.billing.budgets.v1.ThresholdRule.Builder, 1732 com.google.cloud.billing.budgets.v1.ThresholdRuleOrBuilder> 1733 thresholdRulesBuilder_; 1734 1735 /** 1736 * 1737 * 1738 * <pre> 1739 * Optional. Rules that trigger alerts (notifications of thresholds 1740 * being crossed) when spend exceeds the specified percentages of the budget. 1741 * </pre> 1742 * 1743 * <code> 1744 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 1745 * </code> 1746 */ 1747 public java.util.List<com.google.cloud.billing.budgets.v1.ThresholdRule> getThresholdRulesList()1748 getThresholdRulesList() { 1749 if (thresholdRulesBuilder_ == null) { 1750 return java.util.Collections.unmodifiableList(thresholdRules_); 1751 } else { 1752 return thresholdRulesBuilder_.getMessageList(); 1753 } 1754 } 1755 /** 1756 * 1757 * 1758 * <pre> 1759 * Optional. Rules that trigger alerts (notifications of thresholds 1760 * being crossed) when spend exceeds the specified percentages of the budget. 1761 * </pre> 1762 * 1763 * <code> 1764 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 1765 * </code> 1766 */ getThresholdRulesCount()1767 public int getThresholdRulesCount() { 1768 if (thresholdRulesBuilder_ == null) { 1769 return thresholdRules_.size(); 1770 } else { 1771 return thresholdRulesBuilder_.getCount(); 1772 } 1773 } 1774 /** 1775 * 1776 * 1777 * <pre> 1778 * Optional. Rules that trigger alerts (notifications of thresholds 1779 * being crossed) when spend exceeds the specified percentages of the budget. 1780 * </pre> 1781 * 1782 * <code> 1783 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 1784 * </code> 1785 */ getThresholdRules(int index)1786 public com.google.cloud.billing.budgets.v1.ThresholdRule getThresholdRules(int index) { 1787 if (thresholdRulesBuilder_ == null) { 1788 return thresholdRules_.get(index); 1789 } else { 1790 return thresholdRulesBuilder_.getMessage(index); 1791 } 1792 } 1793 /** 1794 * 1795 * 1796 * <pre> 1797 * Optional. Rules that trigger alerts (notifications of thresholds 1798 * being crossed) when spend exceeds the specified percentages of the budget. 1799 * </pre> 1800 * 1801 * <code> 1802 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 1803 * </code> 1804 */ setThresholdRules( int index, com.google.cloud.billing.budgets.v1.ThresholdRule value)1805 public Builder setThresholdRules( 1806 int index, com.google.cloud.billing.budgets.v1.ThresholdRule value) { 1807 if (thresholdRulesBuilder_ == null) { 1808 if (value == null) { 1809 throw new NullPointerException(); 1810 } 1811 ensureThresholdRulesIsMutable(); 1812 thresholdRules_.set(index, value); 1813 onChanged(); 1814 } else { 1815 thresholdRulesBuilder_.setMessage(index, value); 1816 } 1817 return this; 1818 } 1819 /** 1820 * 1821 * 1822 * <pre> 1823 * Optional. Rules that trigger alerts (notifications of thresholds 1824 * being crossed) when spend exceeds the specified percentages of the budget. 1825 * </pre> 1826 * 1827 * <code> 1828 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 1829 * </code> 1830 */ setThresholdRules( int index, com.google.cloud.billing.budgets.v1.ThresholdRule.Builder builderForValue)1831 public Builder setThresholdRules( 1832 int index, com.google.cloud.billing.budgets.v1.ThresholdRule.Builder builderForValue) { 1833 if (thresholdRulesBuilder_ == null) { 1834 ensureThresholdRulesIsMutable(); 1835 thresholdRules_.set(index, builderForValue.build()); 1836 onChanged(); 1837 } else { 1838 thresholdRulesBuilder_.setMessage(index, builderForValue.build()); 1839 } 1840 return this; 1841 } 1842 /** 1843 * 1844 * 1845 * <pre> 1846 * Optional. Rules that trigger alerts (notifications of thresholds 1847 * being crossed) when spend exceeds the specified percentages of the budget. 1848 * </pre> 1849 * 1850 * <code> 1851 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 1852 * </code> 1853 */ addThresholdRules(com.google.cloud.billing.budgets.v1.ThresholdRule value)1854 public Builder addThresholdRules(com.google.cloud.billing.budgets.v1.ThresholdRule value) { 1855 if (thresholdRulesBuilder_ == null) { 1856 if (value == null) { 1857 throw new NullPointerException(); 1858 } 1859 ensureThresholdRulesIsMutable(); 1860 thresholdRules_.add(value); 1861 onChanged(); 1862 } else { 1863 thresholdRulesBuilder_.addMessage(value); 1864 } 1865 return this; 1866 } 1867 /** 1868 * 1869 * 1870 * <pre> 1871 * Optional. Rules that trigger alerts (notifications of thresholds 1872 * being crossed) when spend exceeds the specified percentages of the budget. 1873 * </pre> 1874 * 1875 * <code> 1876 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 1877 * </code> 1878 */ addThresholdRules( int index, com.google.cloud.billing.budgets.v1.ThresholdRule value)1879 public Builder addThresholdRules( 1880 int index, com.google.cloud.billing.budgets.v1.ThresholdRule value) { 1881 if (thresholdRulesBuilder_ == null) { 1882 if (value == null) { 1883 throw new NullPointerException(); 1884 } 1885 ensureThresholdRulesIsMutable(); 1886 thresholdRules_.add(index, value); 1887 onChanged(); 1888 } else { 1889 thresholdRulesBuilder_.addMessage(index, value); 1890 } 1891 return this; 1892 } 1893 /** 1894 * 1895 * 1896 * <pre> 1897 * Optional. Rules that trigger alerts (notifications of thresholds 1898 * being crossed) when spend exceeds the specified percentages of the budget. 1899 * </pre> 1900 * 1901 * <code> 1902 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 1903 * </code> 1904 */ addThresholdRules( com.google.cloud.billing.budgets.v1.ThresholdRule.Builder builderForValue)1905 public Builder addThresholdRules( 1906 com.google.cloud.billing.budgets.v1.ThresholdRule.Builder builderForValue) { 1907 if (thresholdRulesBuilder_ == null) { 1908 ensureThresholdRulesIsMutable(); 1909 thresholdRules_.add(builderForValue.build()); 1910 onChanged(); 1911 } else { 1912 thresholdRulesBuilder_.addMessage(builderForValue.build()); 1913 } 1914 return this; 1915 } 1916 /** 1917 * 1918 * 1919 * <pre> 1920 * Optional. Rules that trigger alerts (notifications of thresholds 1921 * being crossed) when spend exceeds the specified percentages of the budget. 1922 * </pre> 1923 * 1924 * <code> 1925 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 1926 * </code> 1927 */ addThresholdRules( int index, com.google.cloud.billing.budgets.v1.ThresholdRule.Builder builderForValue)1928 public Builder addThresholdRules( 1929 int index, com.google.cloud.billing.budgets.v1.ThresholdRule.Builder builderForValue) { 1930 if (thresholdRulesBuilder_ == null) { 1931 ensureThresholdRulesIsMutable(); 1932 thresholdRules_.add(index, builderForValue.build()); 1933 onChanged(); 1934 } else { 1935 thresholdRulesBuilder_.addMessage(index, builderForValue.build()); 1936 } 1937 return this; 1938 } 1939 /** 1940 * 1941 * 1942 * <pre> 1943 * Optional. Rules that trigger alerts (notifications of thresholds 1944 * being crossed) when spend exceeds the specified percentages of the budget. 1945 * </pre> 1946 * 1947 * <code> 1948 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 1949 * </code> 1950 */ addAllThresholdRules( java.lang.Iterable<? extends com.google.cloud.billing.budgets.v1.ThresholdRule> values)1951 public Builder addAllThresholdRules( 1952 java.lang.Iterable<? extends com.google.cloud.billing.budgets.v1.ThresholdRule> values) { 1953 if (thresholdRulesBuilder_ == null) { 1954 ensureThresholdRulesIsMutable(); 1955 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, thresholdRules_); 1956 onChanged(); 1957 } else { 1958 thresholdRulesBuilder_.addAllMessages(values); 1959 } 1960 return this; 1961 } 1962 /** 1963 * 1964 * 1965 * <pre> 1966 * Optional. Rules that trigger alerts (notifications of thresholds 1967 * being crossed) when spend exceeds the specified percentages of the budget. 1968 * </pre> 1969 * 1970 * <code> 1971 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 1972 * </code> 1973 */ clearThresholdRules()1974 public Builder clearThresholdRules() { 1975 if (thresholdRulesBuilder_ == null) { 1976 thresholdRules_ = java.util.Collections.emptyList(); 1977 bitField0_ = (bitField0_ & ~0x00000010); 1978 onChanged(); 1979 } else { 1980 thresholdRulesBuilder_.clear(); 1981 } 1982 return this; 1983 } 1984 /** 1985 * 1986 * 1987 * <pre> 1988 * Optional. Rules that trigger alerts (notifications of thresholds 1989 * being crossed) when spend exceeds the specified percentages of the budget. 1990 * </pre> 1991 * 1992 * <code> 1993 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 1994 * </code> 1995 */ removeThresholdRules(int index)1996 public Builder removeThresholdRules(int index) { 1997 if (thresholdRulesBuilder_ == null) { 1998 ensureThresholdRulesIsMutable(); 1999 thresholdRules_.remove(index); 2000 onChanged(); 2001 } else { 2002 thresholdRulesBuilder_.remove(index); 2003 } 2004 return this; 2005 } 2006 /** 2007 * 2008 * 2009 * <pre> 2010 * Optional. Rules that trigger alerts (notifications of thresholds 2011 * being crossed) when spend exceeds the specified percentages of the budget. 2012 * </pre> 2013 * 2014 * <code> 2015 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 2016 * </code> 2017 */ getThresholdRulesBuilder( int index)2018 public com.google.cloud.billing.budgets.v1.ThresholdRule.Builder getThresholdRulesBuilder( 2019 int index) { 2020 return getThresholdRulesFieldBuilder().getBuilder(index); 2021 } 2022 /** 2023 * 2024 * 2025 * <pre> 2026 * Optional. Rules that trigger alerts (notifications of thresholds 2027 * being crossed) when spend exceeds the specified percentages of the budget. 2028 * </pre> 2029 * 2030 * <code> 2031 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 2032 * </code> 2033 */ getThresholdRulesOrBuilder( int index)2034 public com.google.cloud.billing.budgets.v1.ThresholdRuleOrBuilder getThresholdRulesOrBuilder( 2035 int index) { 2036 if (thresholdRulesBuilder_ == null) { 2037 return thresholdRules_.get(index); 2038 } else { 2039 return thresholdRulesBuilder_.getMessageOrBuilder(index); 2040 } 2041 } 2042 /** 2043 * 2044 * 2045 * <pre> 2046 * Optional. Rules that trigger alerts (notifications of thresholds 2047 * being crossed) when spend exceeds the specified percentages of the budget. 2048 * </pre> 2049 * 2050 * <code> 2051 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 2052 * </code> 2053 */ 2054 public java.util.List<? extends com.google.cloud.billing.budgets.v1.ThresholdRuleOrBuilder> getThresholdRulesOrBuilderList()2055 getThresholdRulesOrBuilderList() { 2056 if (thresholdRulesBuilder_ != null) { 2057 return thresholdRulesBuilder_.getMessageOrBuilderList(); 2058 } else { 2059 return java.util.Collections.unmodifiableList(thresholdRules_); 2060 } 2061 } 2062 /** 2063 * 2064 * 2065 * <pre> 2066 * Optional. Rules that trigger alerts (notifications of thresholds 2067 * being crossed) when spend exceeds the specified percentages of the budget. 2068 * </pre> 2069 * 2070 * <code> 2071 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 2072 * </code> 2073 */ addThresholdRulesBuilder()2074 public com.google.cloud.billing.budgets.v1.ThresholdRule.Builder addThresholdRulesBuilder() { 2075 return getThresholdRulesFieldBuilder() 2076 .addBuilder(com.google.cloud.billing.budgets.v1.ThresholdRule.getDefaultInstance()); 2077 } 2078 /** 2079 * 2080 * 2081 * <pre> 2082 * Optional. Rules that trigger alerts (notifications of thresholds 2083 * being crossed) when spend exceeds the specified percentages of the budget. 2084 * </pre> 2085 * 2086 * <code> 2087 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 2088 * </code> 2089 */ addThresholdRulesBuilder( int index)2090 public com.google.cloud.billing.budgets.v1.ThresholdRule.Builder addThresholdRulesBuilder( 2091 int index) { 2092 return getThresholdRulesFieldBuilder() 2093 .addBuilder( 2094 index, com.google.cloud.billing.budgets.v1.ThresholdRule.getDefaultInstance()); 2095 } 2096 /** 2097 * 2098 * 2099 * <pre> 2100 * Optional. Rules that trigger alerts (notifications of thresholds 2101 * being crossed) when spend exceeds the specified percentages of the budget. 2102 * </pre> 2103 * 2104 * <code> 2105 * repeated .google.cloud.billing.budgets.v1.ThresholdRule threshold_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; 2106 * </code> 2107 */ 2108 public java.util.List<com.google.cloud.billing.budgets.v1.ThresholdRule.Builder> getThresholdRulesBuilderList()2109 getThresholdRulesBuilderList() { 2110 return getThresholdRulesFieldBuilder().getBuilderList(); 2111 } 2112 2113 private com.google.protobuf.RepeatedFieldBuilderV3< 2114 com.google.cloud.billing.budgets.v1.ThresholdRule, 2115 com.google.cloud.billing.budgets.v1.ThresholdRule.Builder, 2116 com.google.cloud.billing.budgets.v1.ThresholdRuleOrBuilder> getThresholdRulesFieldBuilder()2117 getThresholdRulesFieldBuilder() { 2118 if (thresholdRulesBuilder_ == null) { 2119 thresholdRulesBuilder_ = 2120 new com.google.protobuf.RepeatedFieldBuilderV3< 2121 com.google.cloud.billing.budgets.v1.ThresholdRule, 2122 com.google.cloud.billing.budgets.v1.ThresholdRule.Builder, 2123 com.google.cloud.billing.budgets.v1.ThresholdRuleOrBuilder>( 2124 thresholdRules_, 2125 ((bitField0_ & 0x00000010) != 0), 2126 getParentForChildren(), 2127 isClean()); 2128 thresholdRules_ = null; 2129 } 2130 return thresholdRulesBuilder_; 2131 } 2132 2133 private com.google.cloud.billing.budgets.v1.NotificationsRule notificationsRule_; 2134 private com.google.protobuf.SingleFieldBuilderV3< 2135 com.google.cloud.billing.budgets.v1.NotificationsRule, 2136 com.google.cloud.billing.budgets.v1.NotificationsRule.Builder, 2137 com.google.cloud.billing.budgets.v1.NotificationsRuleOrBuilder> 2138 notificationsRuleBuilder_; 2139 /** 2140 * 2141 * 2142 * <pre> 2143 * Optional. Rules to apply to notifications sent based on budget spend and 2144 * thresholds. 2145 * </pre> 2146 * 2147 * <code> 2148 * .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; 2149 * </code> 2150 * 2151 * @return Whether the notificationsRule field is set. 2152 */ hasNotificationsRule()2153 public boolean hasNotificationsRule() { 2154 return ((bitField0_ & 0x00000020) != 0); 2155 } 2156 /** 2157 * 2158 * 2159 * <pre> 2160 * Optional. Rules to apply to notifications sent based on budget spend and 2161 * thresholds. 2162 * </pre> 2163 * 2164 * <code> 2165 * .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; 2166 * </code> 2167 * 2168 * @return The notificationsRule. 2169 */ getNotificationsRule()2170 public com.google.cloud.billing.budgets.v1.NotificationsRule getNotificationsRule() { 2171 if (notificationsRuleBuilder_ == null) { 2172 return notificationsRule_ == null 2173 ? com.google.cloud.billing.budgets.v1.NotificationsRule.getDefaultInstance() 2174 : notificationsRule_; 2175 } else { 2176 return notificationsRuleBuilder_.getMessage(); 2177 } 2178 } 2179 /** 2180 * 2181 * 2182 * <pre> 2183 * Optional. Rules to apply to notifications sent based on budget spend and 2184 * thresholds. 2185 * </pre> 2186 * 2187 * <code> 2188 * .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; 2189 * </code> 2190 */ setNotificationsRule( com.google.cloud.billing.budgets.v1.NotificationsRule value)2191 public Builder setNotificationsRule( 2192 com.google.cloud.billing.budgets.v1.NotificationsRule value) { 2193 if (notificationsRuleBuilder_ == null) { 2194 if (value == null) { 2195 throw new NullPointerException(); 2196 } 2197 notificationsRule_ = value; 2198 } else { 2199 notificationsRuleBuilder_.setMessage(value); 2200 } 2201 bitField0_ |= 0x00000020; 2202 onChanged(); 2203 return this; 2204 } 2205 /** 2206 * 2207 * 2208 * <pre> 2209 * Optional. Rules to apply to notifications sent based on budget spend and 2210 * thresholds. 2211 * </pre> 2212 * 2213 * <code> 2214 * .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; 2215 * </code> 2216 */ setNotificationsRule( com.google.cloud.billing.budgets.v1.NotificationsRule.Builder builderForValue)2217 public Builder setNotificationsRule( 2218 com.google.cloud.billing.budgets.v1.NotificationsRule.Builder builderForValue) { 2219 if (notificationsRuleBuilder_ == null) { 2220 notificationsRule_ = builderForValue.build(); 2221 } else { 2222 notificationsRuleBuilder_.setMessage(builderForValue.build()); 2223 } 2224 bitField0_ |= 0x00000020; 2225 onChanged(); 2226 return this; 2227 } 2228 /** 2229 * 2230 * 2231 * <pre> 2232 * Optional. Rules to apply to notifications sent based on budget spend and 2233 * thresholds. 2234 * </pre> 2235 * 2236 * <code> 2237 * .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; 2238 * </code> 2239 */ mergeNotificationsRule( com.google.cloud.billing.budgets.v1.NotificationsRule value)2240 public Builder mergeNotificationsRule( 2241 com.google.cloud.billing.budgets.v1.NotificationsRule value) { 2242 if (notificationsRuleBuilder_ == null) { 2243 if (((bitField0_ & 0x00000020) != 0) 2244 && notificationsRule_ != null 2245 && notificationsRule_ 2246 != com.google.cloud.billing.budgets.v1.NotificationsRule.getDefaultInstance()) { 2247 getNotificationsRuleBuilder().mergeFrom(value); 2248 } else { 2249 notificationsRule_ = value; 2250 } 2251 } else { 2252 notificationsRuleBuilder_.mergeFrom(value); 2253 } 2254 bitField0_ |= 0x00000020; 2255 onChanged(); 2256 return this; 2257 } 2258 /** 2259 * 2260 * 2261 * <pre> 2262 * Optional. Rules to apply to notifications sent based on budget spend and 2263 * thresholds. 2264 * </pre> 2265 * 2266 * <code> 2267 * .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; 2268 * </code> 2269 */ clearNotificationsRule()2270 public Builder clearNotificationsRule() { 2271 bitField0_ = (bitField0_ & ~0x00000020); 2272 notificationsRule_ = null; 2273 if (notificationsRuleBuilder_ != null) { 2274 notificationsRuleBuilder_.dispose(); 2275 notificationsRuleBuilder_ = null; 2276 } 2277 onChanged(); 2278 return this; 2279 } 2280 /** 2281 * 2282 * 2283 * <pre> 2284 * Optional. Rules to apply to notifications sent based on budget spend and 2285 * thresholds. 2286 * </pre> 2287 * 2288 * <code> 2289 * .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; 2290 * </code> 2291 */ 2292 public com.google.cloud.billing.budgets.v1.NotificationsRule.Builder getNotificationsRuleBuilder()2293 getNotificationsRuleBuilder() { 2294 bitField0_ |= 0x00000020; 2295 onChanged(); 2296 return getNotificationsRuleFieldBuilder().getBuilder(); 2297 } 2298 /** 2299 * 2300 * 2301 * <pre> 2302 * Optional. Rules to apply to notifications sent based on budget spend and 2303 * thresholds. 2304 * </pre> 2305 * 2306 * <code> 2307 * .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; 2308 * </code> 2309 */ 2310 public com.google.cloud.billing.budgets.v1.NotificationsRuleOrBuilder getNotificationsRuleOrBuilder()2311 getNotificationsRuleOrBuilder() { 2312 if (notificationsRuleBuilder_ != null) { 2313 return notificationsRuleBuilder_.getMessageOrBuilder(); 2314 } else { 2315 return notificationsRule_ == null 2316 ? com.google.cloud.billing.budgets.v1.NotificationsRule.getDefaultInstance() 2317 : notificationsRule_; 2318 } 2319 } 2320 /** 2321 * 2322 * 2323 * <pre> 2324 * Optional. Rules to apply to notifications sent based on budget spend and 2325 * thresholds. 2326 * </pre> 2327 * 2328 * <code> 2329 * .google.cloud.billing.budgets.v1.NotificationsRule notifications_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; 2330 * </code> 2331 */ 2332 private com.google.protobuf.SingleFieldBuilderV3< 2333 com.google.cloud.billing.budgets.v1.NotificationsRule, 2334 com.google.cloud.billing.budgets.v1.NotificationsRule.Builder, 2335 com.google.cloud.billing.budgets.v1.NotificationsRuleOrBuilder> getNotificationsRuleFieldBuilder()2336 getNotificationsRuleFieldBuilder() { 2337 if (notificationsRuleBuilder_ == null) { 2338 notificationsRuleBuilder_ = 2339 new com.google.protobuf.SingleFieldBuilderV3< 2340 com.google.cloud.billing.budgets.v1.NotificationsRule, 2341 com.google.cloud.billing.budgets.v1.NotificationsRule.Builder, 2342 com.google.cloud.billing.budgets.v1.NotificationsRuleOrBuilder>( 2343 getNotificationsRule(), getParentForChildren(), isClean()); 2344 notificationsRule_ = null; 2345 } 2346 return notificationsRuleBuilder_; 2347 } 2348 2349 private java.lang.Object etag_ = ""; 2350 /** 2351 * 2352 * 2353 * <pre> 2354 * Optional. Etag to validate that the object is unchanged for a 2355 * read-modify-write operation. 2356 * An empty etag will cause an update to overwrite other changes. 2357 * </pre> 2358 * 2359 * <code>string etag = 7 [(.google.api.field_behavior) = OPTIONAL];</code> 2360 * 2361 * @return The etag. 2362 */ getEtag()2363 public java.lang.String getEtag() { 2364 java.lang.Object ref = etag_; 2365 if (!(ref instanceof java.lang.String)) { 2366 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2367 java.lang.String s = bs.toStringUtf8(); 2368 etag_ = s; 2369 return s; 2370 } else { 2371 return (java.lang.String) ref; 2372 } 2373 } 2374 /** 2375 * 2376 * 2377 * <pre> 2378 * Optional. Etag to validate that the object is unchanged for a 2379 * read-modify-write operation. 2380 * An empty etag will cause an update to overwrite other changes. 2381 * </pre> 2382 * 2383 * <code>string etag = 7 [(.google.api.field_behavior) = OPTIONAL];</code> 2384 * 2385 * @return The bytes for etag. 2386 */ getEtagBytes()2387 public com.google.protobuf.ByteString getEtagBytes() { 2388 java.lang.Object ref = etag_; 2389 if (ref instanceof String) { 2390 com.google.protobuf.ByteString b = 2391 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2392 etag_ = b; 2393 return b; 2394 } else { 2395 return (com.google.protobuf.ByteString) ref; 2396 } 2397 } 2398 /** 2399 * 2400 * 2401 * <pre> 2402 * Optional. Etag to validate that the object is unchanged for a 2403 * read-modify-write operation. 2404 * An empty etag will cause an update to overwrite other changes. 2405 * </pre> 2406 * 2407 * <code>string etag = 7 [(.google.api.field_behavior) = OPTIONAL];</code> 2408 * 2409 * @param value The etag to set. 2410 * @return This builder for chaining. 2411 */ setEtag(java.lang.String value)2412 public Builder setEtag(java.lang.String value) { 2413 if (value == null) { 2414 throw new NullPointerException(); 2415 } 2416 etag_ = value; 2417 bitField0_ |= 0x00000040; 2418 onChanged(); 2419 return this; 2420 } 2421 /** 2422 * 2423 * 2424 * <pre> 2425 * Optional. Etag to validate that the object is unchanged for a 2426 * read-modify-write operation. 2427 * An empty etag will cause an update to overwrite other changes. 2428 * </pre> 2429 * 2430 * <code>string etag = 7 [(.google.api.field_behavior) = OPTIONAL];</code> 2431 * 2432 * @return This builder for chaining. 2433 */ clearEtag()2434 public Builder clearEtag() { 2435 etag_ = getDefaultInstance().getEtag(); 2436 bitField0_ = (bitField0_ & ~0x00000040); 2437 onChanged(); 2438 return this; 2439 } 2440 /** 2441 * 2442 * 2443 * <pre> 2444 * Optional. Etag to validate that the object is unchanged for a 2445 * read-modify-write operation. 2446 * An empty etag will cause an update to overwrite other changes. 2447 * </pre> 2448 * 2449 * <code>string etag = 7 [(.google.api.field_behavior) = OPTIONAL];</code> 2450 * 2451 * @param value The bytes for etag to set. 2452 * @return This builder for chaining. 2453 */ setEtagBytes(com.google.protobuf.ByteString value)2454 public Builder setEtagBytes(com.google.protobuf.ByteString value) { 2455 if (value == null) { 2456 throw new NullPointerException(); 2457 } 2458 checkByteStringIsUtf8(value); 2459 etag_ = value; 2460 bitField0_ |= 0x00000040; 2461 onChanged(); 2462 return this; 2463 } 2464 2465 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2466 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2467 return super.setUnknownFields(unknownFields); 2468 } 2469 2470 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2471 public final Builder mergeUnknownFields( 2472 final com.google.protobuf.UnknownFieldSet unknownFields) { 2473 return super.mergeUnknownFields(unknownFields); 2474 } 2475 2476 // @@protoc_insertion_point(builder_scope:google.cloud.billing.budgets.v1.Budget) 2477 } 2478 2479 // @@protoc_insertion_point(class_scope:google.cloud.billing.budgets.v1.Budget) 2480 private static final com.google.cloud.billing.budgets.v1.Budget DEFAULT_INSTANCE; 2481 2482 static { 2483 DEFAULT_INSTANCE = new com.google.cloud.billing.budgets.v1.Budget(); 2484 } 2485 getDefaultInstance()2486 public static com.google.cloud.billing.budgets.v1.Budget getDefaultInstance() { 2487 return DEFAULT_INSTANCE; 2488 } 2489 2490 private static final com.google.protobuf.Parser<Budget> PARSER = 2491 new com.google.protobuf.AbstractParser<Budget>() { 2492 @java.lang.Override 2493 public Budget parsePartialFrom( 2494 com.google.protobuf.CodedInputStream input, 2495 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2496 throws com.google.protobuf.InvalidProtocolBufferException { 2497 Builder builder = newBuilder(); 2498 try { 2499 builder.mergeFrom(input, extensionRegistry); 2500 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2501 throw e.setUnfinishedMessage(builder.buildPartial()); 2502 } catch (com.google.protobuf.UninitializedMessageException e) { 2503 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2504 } catch (java.io.IOException e) { 2505 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2506 .setUnfinishedMessage(builder.buildPartial()); 2507 } 2508 return builder.buildPartial(); 2509 } 2510 }; 2511 parser()2512 public static com.google.protobuf.Parser<Budget> parser() { 2513 return PARSER; 2514 } 2515 2516 @java.lang.Override getParserForType()2517 public com.google.protobuf.Parser<Budget> getParserForType() { 2518 return PARSER; 2519 } 2520 2521 @java.lang.Override getDefaultInstanceForType()2522 public com.google.cloud.billing.budgets.v1.Budget getDefaultInstanceForType() { 2523 return DEFAULT_INSTANCE; 2524 } 2525 } 2526