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/datacatalog/v1/usage.proto 18 19 package com.google.cloud.datacatalog.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Detailed statistics on the entry's usage. 26 * Usage statistics have the following limitations: 27 * - Only BigQuery tables have them. 28 * - They only include BigQuery query jobs. 29 * - They might be underestimated because wildcard table references 30 * are not yet counted. For more information, see 31 * [Querying multiple tables using a wildcard table] 32 * (https://cloud.google.com/bigquery/docs/querying-wildcard-tables) 33 * </pre> 34 * 35 * Protobuf type {@code google.cloud.datacatalog.v1.UsageStats} 36 */ 37 public final class UsageStats extends com.google.protobuf.GeneratedMessageV3 38 implements 39 // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.UsageStats) 40 UsageStatsOrBuilder { 41 private static final long serialVersionUID = 0L; 42 // Use UsageStats.newBuilder() to construct. UsageStats(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)43 private UsageStats(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 44 super(builder); 45 } 46 UsageStats()47 private UsageStats() {} 48 49 @java.lang.Override 50 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)51 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 52 return new UsageStats(); 53 } 54 55 @java.lang.Override getUnknownFields()56 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 57 return this.unknownFields; 58 } 59 getDescriptor()60 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 61 return com.google.cloud.datacatalog.v1.Usage 62 .internal_static_google_cloud_datacatalog_v1_UsageStats_descriptor; 63 } 64 65 @java.lang.Override 66 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()67 internalGetFieldAccessorTable() { 68 return com.google.cloud.datacatalog.v1.Usage 69 .internal_static_google_cloud_datacatalog_v1_UsageStats_fieldAccessorTable 70 .ensureFieldAccessorsInitialized( 71 com.google.cloud.datacatalog.v1.UsageStats.class, 72 com.google.cloud.datacatalog.v1.UsageStats.Builder.class); 73 } 74 75 public static final int TOTAL_COMPLETIONS_FIELD_NUMBER = 1; 76 private float totalCompletions_ = 0F; 77 /** 78 * 79 * 80 * <pre> 81 * The number of successful uses of the underlying entry. 82 * </pre> 83 * 84 * <code>float total_completions = 1;</code> 85 * 86 * @return The totalCompletions. 87 */ 88 @java.lang.Override getTotalCompletions()89 public float getTotalCompletions() { 90 return totalCompletions_; 91 } 92 93 public static final int TOTAL_FAILURES_FIELD_NUMBER = 2; 94 private float totalFailures_ = 0F; 95 /** 96 * 97 * 98 * <pre> 99 * The number of failed attempts to use the underlying entry. 100 * </pre> 101 * 102 * <code>float total_failures = 2;</code> 103 * 104 * @return The totalFailures. 105 */ 106 @java.lang.Override getTotalFailures()107 public float getTotalFailures() { 108 return totalFailures_; 109 } 110 111 public static final int TOTAL_CANCELLATIONS_FIELD_NUMBER = 3; 112 private float totalCancellations_ = 0F; 113 /** 114 * 115 * 116 * <pre> 117 * The number of cancelled attempts to use the underlying entry. 118 * </pre> 119 * 120 * <code>float total_cancellations = 3;</code> 121 * 122 * @return The totalCancellations. 123 */ 124 @java.lang.Override getTotalCancellations()125 public float getTotalCancellations() { 126 return totalCancellations_; 127 } 128 129 public static final int TOTAL_EXECUTION_TIME_FOR_COMPLETIONS_MILLIS_FIELD_NUMBER = 4; 130 private float totalExecutionTimeForCompletionsMillis_ = 0F; 131 /** 132 * 133 * 134 * <pre> 135 * Total time spent only on successful uses, in milliseconds. 136 * </pre> 137 * 138 * <code>float total_execution_time_for_completions_millis = 4;</code> 139 * 140 * @return The totalExecutionTimeForCompletionsMillis. 141 */ 142 @java.lang.Override getTotalExecutionTimeForCompletionsMillis()143 public float getTotalExecutionTimeForCompletionsMillis() { 144 return totalExecutionTimeForCompletionsMillis_; 145 } 146 147 private byte memoizedIsInitialized = -1; 148 149 @java.lang.Override isInitialized()150 public final boolean isInitialized() { 151 byte isInitialized = memoizedIsInitialized; 152 if (isInitialized == 1) return true; 153 if (isInitialized == 0) return false; 154 155 memoizedIsInitialized = 1; 156 return true; 157 } 158 159 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)160 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 161 if (java.lang.Float.floatToRawIntBits(totalCompletions_) != 0) { 162 output.writeFloat(1, totalCompletions_); 163 } 164 if (java.lang.Float.floatToRawIntBits(totalFailures_) != 0) { 165 output.writeFloat(2, totalFailures_); 166 } 167 if (java.lang.Float.floatToRawIntBits(totalCancellations_) != 0) { 168 output.writeFloat(3, totalCancellations_); 169 } 170 if (java.lang.Float.floatToRawIntBits(totalExecutionTimeForCompletionsMillis_) != 0) { 171 output.writeFloat(4, totalExecutionTimeForCompletionsMillis_); 172 } 173 getUnknownFields().writeTo(output); 174 } 175 176 @java.lang.Override getSerializedSize()177 public int getSerializedSize() { 178 int size = memoizedSize; 179 if (size != -1) return size; 180 181 size = 0; 182 if (java.lang.Float.floatToRawIntBits(totalCompletions_) != 0) { 183 size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, totalCompletions_); 184 } 185 if (java.lang.Float.floatToRawIntBits(totalFailures_) != 0) { 186 size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, totalFailures_); 187 } 188 if (java.lang.Float.floatToRawIntBits(totalCancellations_) != 0) { 189 size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, totalCancellations_); 190 } 191 if (java.lang.Float.floatToRawIntBits(totalExecutionTimeForCompletionsMillis_) != 0) { 192 size += 193 com.google.protobuf.CodedOutputStream.computeFloatSize( 194 4, totalExecutionTimeForCompletionsMillis_); 195 } 196 size += getUnknownFields().getSerializedSize(); 197 memoizedSize = size; 198 return size; 199 } 200 201 @java.lang.Override equals(final java.lang.Object obj)202 public boolean equals(final java.lang.Object obj) { 203 if (obj == this) { 204 return true; 205 } 206 if (!(obj instanceof com.google.cloud.datacatalog.v1.UsageStats)) { 207 return super.equals(obj); 208 } 209 com.google.cloud.datacatalog.v1.UsageStats other = 210 (com.google.cloud.datacatalog.v1.UsageStats) obj; 211 212 if (java.lang.Float.floatToIntBits(getTotalCompletions()) 213 != java.lang.Float.floatToIntBits(other.getTotalCompletions())) return false; 214 if (java.lang.Float.floatToIntBits(getTotalFailures()) 215 != java.lang.Float.floatToIntBits(other.getTotalFailures())) return false; 216 if (java.lang.Float.floatToIntBits(getTotalCancellations()) 217 != java.lang.Float.floatToIntBits(other.getTotalCancellations())) return false; 218 if (java.lang.Float.floatToIntBits(getTotalExecutionTimeForCompletionsMillis()) 219 != java.lang.Float.floatToIntBits(other.getTotalExecutionTimeForCompletionsMillis())) 220 return false; 221 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 222 return true; 223 } 224 225 @java.lang.Override hashCode()226 public int hashCode() { 227 if (memoizedHashCode != 0) { 228 return memoizedHashCode; 229 } 230 int hash = 41; 231 hash = (19 * hash) + getDescriptor().hashCode(); 232 hash = (37 * hash) + TOTAL_COMPLETIONS_FIELD_NUMBER; 233 hash = (53 * hash) + java.lang.Float.floatToIntBits(getTotalCompletions()); 234 hash = (37 * hash) + TOTAL_FAILURES_FIELD_NUMBER; 235 hash = (53 * hash) + java.lang.Float.floatToIntBits(getTotalFailures()); 236 hash = (37 * hash) + TOTAL_CANCELLATIONS_FIELD_NUMBER; 237 hash = (53 * hash) + java.lang.Float.floatToIntBits(getTotalCancellations()); 238 hash = (37 * hash) + TOTAL_EXECUTION_TIME_FOR_COMPLETIONS_MILLIS_FIELD_NUMBER; 239 hash = 240 (53 * hash) + java.lang.Float.floatToIntBits(getTotalExecutionTimeForCompletionsMillis()); 241 hash = (29 * hash) + getUnknownFields().hashCode(); 242 memoizedHashCode = hash; 243 return hash; 244 } 245 parseFrom(java.nio.ByteBuffer data)246 public static com.google.cloud.datacatalog.v1.UsageStats parseFrom(java.nio.ByteBuffer data) 247 throws com.google.protobuf.InvalidProtocolBufferException { 248 return PARSER.parseFrom(data); 249 } 250 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)251 public static com.google.cloud.datacatalog.v1.UsageStats parseFrom( 252 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 253 throws com.google.protobuf.InvalidProtocolBufferException { 254 return PARSER.parseFrom(data, extensionRegistry); 255 } 256 parseFrom( com.google.protobuf.ByteString data)257 public static com.google.cloud.datacatalog.v1.UsageStats parseFrom( 258 com.google.protobuf.ByteString data) 259 throws com.google.protobuf.InvalidProtocolBufferException { 260 return PARSER.parseFrom(data); 261 } 262 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)263 public static com.google.cloud.datacatalog.v1.UsageStats parseFrom( 264 com.google.protobuf.ByteString data, 265 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 266 throws com.google.protobuf.InvalidProtocolBufferException { 267 return PARSER.parseFrom(data, extensionRegistry); 268 } 269 parseFrom(byte[] data)270 public static com.google.cloud.datacatalog.v1.UsageStats parseFrom(byte[] data) 271 throws com.google.protobuf.InvalidProtocolBufferException { 272 return PARSER.parseFrom(data); 273 } 274 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)275 public static com.google.cloud.datacatalog.v1.UsageStats parseFrom( 276 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 277 throws com.google.protobuf.InvalidProtocolBufferException { 278 return PARSER.parseFrom(data, extensionRegistry); 279 } 280 parseFrom(java.io.InputStream input)281 public static com.google.cloud.datacatalog.v1.UsageStats parseFrom(java.io.InputStream input) 282 throws java.io.IOException { 283 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 284 } 285 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)286 public static com.google.cloud.datacatalog.v1.UsageStats parseFrom( 287 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 288 throws java.io.IOException { 289 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 290 PARSER, input, extensionRegistry); 291 } 292 parseDelimitedFrom( java.io.InputStream input)293 public static com.google.cloud.datacatalog.v1.UsageStats parseDelimitedFrom( 294 java.io.InputStream input) throws java.io.IOException { 295 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 296 } 297 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)298 public static com.google.cloud.datacatalog.v1.UsageStats parseDelimitedFrom( 299 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 300 throws java.io.IOException { 301 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 302 PARSER, input, extensionRegistry); 303 } 304 parseFrom( com.google.protobuf.CodedInputStream input)305 public static com.google.cloud.datacatalog.v1.UsageStats parseFrom( 306 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 307 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 308 } 309 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)310 public static com.google.cloud.datacatalog.v1.UsageStats parseFrom( 311 com.google.protobuf.CodedInputStream input, 312 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 313 throws java.io.IOException { 314 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 315 PARSER, input, extensionRegistry); 316 } 317 318 @java.lang.Override newBuilderForType()319 public Builder newBuilderForType() { 320 return newBuilder(); 321 } 322 newBuilder()323 public static Builder newBuilder() { 324 return DEFAULT_INSTANCE.toBuilder(); 325 } 326 newBuilder(com.google.cloud.datacatalog.v1.UsageStats prototype)327 public static Builder newBuilder(com.google.cloud.datacatalog.v1.UsageStats prototype) { 328 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 329 } 330 331 @java.lang.Override toBuilder()332 public Builder toBuilder() { 333 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 334 } 335 336 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)337 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 338 Builder builder = new Builder(parent); 339 return builder; 340 } 341 /** 342 * 343 * 344 * <pre> 345 * Detailed statistics on the entry's usage. 346 * Usage statistics have the following limitations: 347 * - Only BigQuery tables have them. 348 * - They only include BigQuery query jobs. 349 * - They might be underestimated because wildcard table references 350 * are not yet counted. For more information, see 351 * [Querying multiple tables using a wildcard table] 352 * (https://cloud.google.com/bigquery/docs/querying-wildcard-tables) 353 * </pre> 354 * 355 * Protobuf type {@code google.cloud.datacatalog.v1.UsageStats} 356 */ 357 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 358 implements 359 // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.UsageStats) 360 com.google.cloud.datacatalog.v1.UsageStatsOrBuilder { getDescriptor()361 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 362 return com.google.cloud.datacatalog.v1.Usage 363 .internal_static_google_cloud_datacatalog_v1_UsageStats_descriptor; 364 } 365 366 @java.lang.Override 367 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()368 internalGetFieldAccessorTable() { 369 return com.google.cloud.datacatalog.v1.Usage 370 .internal_static_google_cloud_datacatalog_v1_UsageStats_fieldAccessorTable 371 .ensureFieldAccessorsInitialized( 372 com.google.cloud.datacatalog.v1.UsageStats.class, 373 com.google.cloud.datacatalog.v1.UsageStats.Builder.class); 374 } 375 376 // Construct using com.google.cloud.datacatalog.v1.UsageStats.newBuilder() Builder()377 private Builder() {} 378 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)379 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 380 super(parent); 381 } 382 383 @java.lang.Override clear()384 public Builder clear() { 385 super.clear(); 386 bitField0_ = 0; 387 totalCompletions_ = 0F; 388 totalFailures_ = 0F; 389 totalCancellations_ = 0F; 390 totalExecutionTimeForCompletionsMillis_ = 0F; 391 return this; 392 } 393 394 @java.lang.Override getDescriptorForType()395 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 396 return com.google.cloud.datacatalog.v1.Usage 397 .internal_static_google_cloud_datacatalog_v1_UsageStats_descriptor; 398 } 399 400 @java.lang.Override getDefaultInstanceForType()401 public com.google.cloud.datacatalog.v1.UsageStats getDefaultInstanceForType() { 402 return com.google.cloud.datacatalog.v1.UsageStats.getDefaultInstance(); 403 } 404 405 @java.lang.Override build()406 public com.google.cloud.datacatalog.v1.UsageStats build() { 407 com.google.cloud.datacatalog.v1.UsageStats result = buildPartial(); 408 if (!result.isInitialized()) { 409 throw newUninitializedMessageException(result); 410 } 411 return result; 412 } 413 414 @java.lang.Override buildPartial()415 public com.google.cloud.datacatalog.v1.UsageStats buildPartial() { 416 com.google.cloud.datacatalog.v1.UsageStats result = 417 new com.google.cloud.datacatalog.v1.UsageStats(this); 418 if (bitField0_ != 0) { 419 buildPartial0(result); 420 } 421 onBuilt(); 422 return result; 423 } 424 buildPartial0(com.google.cloud.datacatalog.v1.UsageStats result)425 private void buildPartial0(com.google.cloud.datacatalog.v1.UsageStats result) { 426 int from_bitField0_ = bitField0_; 427 if (((from_bitField0_ & 0x00000001) != 0)) { 428 result.totalCompletions_ = totalCompletions_; 429 } 430 if (((from_bitField0_ & 0x00000002) != 0)) { 431 result.totalFailures_ = totalFailures_; 432 } 433 if (((from_bitField0_ & 0x00000004) != 0)) { 434 result.totalCancellations_ = totalCancellations_; 435 } 436 if (((from_bitField0_ & 0x00000008) != 0)) { 437 result.totalExecutionTimeForCompletionsMillis_ = totalExecutionTimeForCompletionsMillis_; 438 } 439 } 440 441 @java.lang.Override clone()442 public Builder clone() { 443 return super.clone(); 444 } 445 446 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)447 public Builder setField( 448 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 449 return super.setField(field, value); 450 } 451 452 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)453 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 454 return super.clearField(field); 455 } 456 457 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)458 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 459 return super.clearOneof(oneof); 460 } 461 462 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)463 public Builder setRepeatedField( 464 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 465 return super.setRepeatedField(field, index, value); 466 } 467 468 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)469 public Builder addRepeatedField( 470 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 471 return super.addRepeatedField(field, value); 472 } 473 474 @java.lang.Override mergeFrom(com.google.protobuf.Message other)475 public Builder mergeFrom(com.google.protobuf.Message other) { 476 if (other instanceof com.google.cloud.datacatalog.v1.UsageStats) { 477 return mergeFrom((com.google.cloud.datacatalog.v1.UsageStats) other); 478 } else { 479 super.mergeFrom(other); 480 return this; 481 } 482 } 483 mergeFrom(com.google.cloud.datacatalog.v1.UsageStats other)484 public Builder mergeFrom(com.google.cloud.datacatalog.v1.UsageStats other) { 485 if (other == com.google.cloud.datacatalog.v1.UsageStats.getDefaultInstance()) return this; 486 if (other.getTotalCompletions() != 0F) { 487 setTotalCompletions(other.getTotalCompletions()); 488 } 489 if (other.getTotalFailures() != 0F) { 490 setTotalFailures(other.getTotalFailures()); 491 } 492 if (other.getTotalCancellations() != 0F) { 493 setTotalCancellations(other.getTotalCancellations()); 494 } 495 if (other.getTotalExecutionTimeForCompletionsMillis() != 0F) { 496 setTotalExecutionTimeForCompletionsMillis( 497 other.getTotalExecutionTimeForCompletionsMillis()); 498 } 499 this.mergeUnknownFields(other.getUnknownFields()); 500 onChanged(); 501 return this; 502 } 503 504 @java.lang.Override isInitialized()505 public final boolean isInitialized() { 506 return true; 507 } 508 509 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)510 public Builder mergeFrom( 511 com.google.protobuf.CodedInputStream input, 512 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 513 throws java.io.IOException { 514 if (extensionRegistry == null) { 515 throw new java.lang.NullPointerException(); 516 } 517 try { 518 boolean done = false; 519 while (!done) { 520 int tag = input.readTag(); 521 switch (tag) { 522 case 0: 523 done = true; 524 break; 525 case 13: 526 { 527 totalCompletions_ = input.readFloat(); 528 bitField0_ |= 0x00000001; 529 break; 530 } // case 13 531 case 21: 532 { 533 totalFailures_ = input.readFloat(); 534 bitField0_ |= 0x00000002; 535 break; 536 } // case 21 537 case 29: 538 { 539 totalCancellations_ = input.readFloat(); 540 bitField0_ |= 0x00000004; 541 break; 542 } // case 29 543 case 37: 544 { 545 totalExecutionTimeForCompletionsMillis_ = input.readFloat(); 546 bitField0_ |= 0x00000008; 547 break; 548 } // case 37 549 default: 550 { 551 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 552 done = true; // was an endgroup tag 553 } 554 break; 555 } // default: 556 } // switch (tag) 557 } // while (!done) 558 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 559 throw e.unwrapIOException(); 560 } finally { 561 onChanged(); 562 } // finally 563 return this; 564 } 565 566 private int bitField0_; 567 568 private float totalCompletions_; 569 /** 570 * 571 * 572 * <pre> 573 * The number of successful uses of the underlying entry. 574 * </pre> 575 * 576 * <code>float total_completions = 1;</code> 577 * 578 * @return The totalCompletions. 579 */ 580 @java.lang.Override getTotalCompletions()581 public float getTotalCompletions() { 582 return totalCompletions_; 583 } 584 /** 585 * 586 * 587 * <pre> 588 * The number of successful uses of the underlying entry. 589 * </pre> 590 * 591 * <code>float total_completions = 1;</code> 592 * 593 * @param value The totalCompletions to set. 594 * @return This builder for chaining. 595 */ setTotalCompletions(float value)596 public Builder setTotalCompletions(float value) { 597 598 totalCompletions_ = value; 599 bitField0_ |= 0x00000001; 600 onChanged(); 601 return this; 602 } 603 /** 604 * 605 * 606 * <pre> 607 * The number of successful uses of the underlying entry. 608 * </pre> 609 * 610 * <code>float total_completions = 1;</code> 611 * 612 * @return This builder for chaining. 613 */ clearTotalCompletions()614 public Builder clearTotalCompletions() { 615 bitField0_ = (bitField0_ & ~0x00000001); 616 totalCompletions_ = 0F; 617 onChanged(); 618 return this; 619 } 620 621 private float totalFailures_; 622 /** 623 * 624 * 625 * <pre> 626 * The number of failed attempts to use the underlying entry. 627 * </pre> 628 * 629 * <code>float total_failures = 2;</code> 630 * 631 * @return The totalFailures. 632 */ 633 @java.lang.Override getTotalFailures()634 public float getTotalFailures() { 635 return totalFailures_; 636 } 637 /** 638 * 639 * 640 * <pre> 641 * The number of failed attempts to use the underlying entry. 642 * </pre> 643 * 644 * <code>float total_failures = 2;</code> 645 * 646 * @param value The totalFailures to set. 647 * @return This builder for chaining. 648 */ setTotalFailures(float value)649 public Builder setTotalFailures(float value) { 650 651 totalFailures_ = value; 652 bitField0_ |= 0x00000002; 653 onChanged(); 654 return this; 655 } 656 /** 657 * 658 * 659 * <pre> 660 * The number of failed attempts to use the underlying entry. 661 * </pre> 662 * 663 * <code>float total_failures = 2;</code> 664 * 665 * @return This builder for chaining. 666 */ clearTotalFailures()667 public Builder clearTotalFailures() { 668 bitField0_ = (bitField0_ & ~0x00000002); 669 totalFailures_ = 0F; 670 onChanged(); 671 return this; 672 } 673 674 private float totalCancellations_; 675 /** 676 * 677 * 678 * <pre> 679 * The number of cancelled attempts to use the underlying entry. 680 * </pre> 681 * 682 * <code>float total_cancellations = 3;</code> 683 * 684 * @return The totalCancellations. 685 */ 686 @java.lang.Override getTotalCancellations()687 public float getTotalCancellations() { 688 return totalCancellations_; 689 } 690 /** 691 * 692 * 693 * <pre> 694 * The number of cancelled attempts to use the underlying entry. 695 * </pre> 696 * 697 * <code>float total_cancellations = 3;</code> 698 * 699 * @param value The totalCancellations to set. 700 * @return This builder for chaining. 701 */ setTotalCancellations(float value)702 public Builder setTotalCancellations(float value) { 703 704 totalCancellations_ = value; 705 bitField0_ |= 0x00000004; 706 onChanged(); 707 return this; 708 } 709 /** 710 * 711 * 712 * <pre> 713 * The number of cancelled attempts to use the underlying entry. 714 * </pre> 715 * 716 * <code>float total_cancellations = 3;</code> 717 * 718 * @return This builder for chaining. 719 */ clearTotalCancellations()720 public Builder clearTotalCancellations() { 721 bitField0_ = (bitField0_ & ~0x00000004); 722 totalCancellations_ = 0F; 723 onChanged(); 724 return this; 725 } 726 727 private float totalExecutionTimeForCompletionsMillis_; 728 /** 729 * 730 * 731 * <pre> 732 * Total time spent only on successful uses, in milliseconds. 733 * </pre> 734 * 735 * <code>float total_execution_time_for_completions_millis = 4;</code> 736 * 737 * @return The totalExecutionTimeForCompletionsMillis. 738 */ 739 @java.lang.Override getTotalExecutionTimeForCompletionsMillis()740 public float getTotalExecutionTimeForCompletionsMillis() { 741 return totalExecutionTimeForCompletionsMillis_; 742 } 743 /** 744 * 745 * 746 * <pre> 747 * Total time spent only on successful uses, in milliseconds. 748 * </pre> 749 * 750 * <code>float total_execution_time_for_completions_millis = 4;</code> 751 * 752 * @param value The totalExecutionTimeForCompletionsMillis to set. 753 * @return This builder for chaining. 754 */ setTotalExecutionTimeForCompletionsMillis(float value)755 public Builder setTotalExecutionTimeForCompletionsMillis(float value) { 756 757 totalExecutionTimeForCompletionsMillis_ = value; 758 bitField0_ |= 0x00000008; 759 onChanged(); 760 return this; 761 } 762 /** 763 * 764 * 765 * <pre> 766 * Total time spent only on successful uses, in milliseconds. 767 * </pre> 768 * 769 * <code>float total_execution_time_for_completions_millis = 4;</code> 770 * 771 * @return This builder for chaining. 772 */ clearTotalExecutionTimeForCompletionsMillis()773 public Builder clearTotalExecutionTimeForCompletionsMillis() { 774 bitField0_ = (bitField0_ & ~0x00000008); 775 totalExecutionTimeForCompletionsMillis_ = 0F; 776 onChanged(); 777 return this; 778 } 779 780 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)781 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 782 return super.setUnknownFields(unknownFields); 783 } 784 785 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)786 public final Builder mergeUnknownFields( 787 final com.google.protobuf.UnknownFieldSet unknownFields) { 788 return super.mergeUnknownFields(unknownFields); 789 } 790 791 // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.UsageStats) 792 } 793 794 // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.UsageStats) 795 private static final com.google.cloud.datacatalog.v1.UsageStats DEFAULT_INSTANCE; 796 797 static { 798 DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.UsageStats(); 799 } 800 getDefaultInstance()801 public static com.google.cloud.datacatalog.v1.UsageStats getDefaultInstance() { 802 return DEFAULT_INSTANCE; 803 } 804 805 private static final com.google.protobuf.Parser<UsageStats> PARSER = 806 new com.google.protobuf.AbstractParser<UsageStats>() { 807 @java.lang.Override 808 public UsageStats parsePartialFrom( 809 com.google.protobuf.CodedInputStream input, 810 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 811 throws com.google.protobuf.InvalidProtocolBufferException { 812 Builder builder = newBuilder(); 813 try { 814 builder.mergeFrom(input, extensionRegistry); 815 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 816 throw e.setUnfinishedMessage(builder.buildPartial()); 817 } catch (com.google.protobuf.UninitializedMessageException e) { 818 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 819 } catch (java.io.IOException e) { 820 throw new com.google.protobuf.InvalidProtocolBufferException(e) 821 .setUnfinishedMessage(builder.buildPartial()); 822 } 823 return builder.buildPartial(); 824 } 825 }; 826 parser()827 public static com.google.protobuf.Parser<UsageStats> parser() { 828 return PARSER; 829 } 830 831 @java.lang.Override getParserForType()832 public com.google.protobuf.Parser<UsageStats> getParserForType() { 833 return PARSER; 834 } 835 836 @java.lang.Override getDefaultInstanceForType()837 public com.google.cloud.datacatalog.v1.UsageStats getDefaultInstanceForType() { 838 return DEFAULT_INSTANCE; 839 } 840 } 841