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/gcs_fileset_spec.proto 18 19 package com.google.cloud.datacatalog.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Specification of a single file in Cloud Storage. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.datacatalog.v1.GcsFileSpec} 29 */ 30 public final class GcsFileSpec extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.GcsFileSpec) 33 GcsFileSpecOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use GcsFileSpec.newBuilder() to construct. GcsFileSpec(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private GcsFileSpec(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 GcsFileSpec()40 private GcsFileSpec() { 41 filePath_ = ""; 42 } 43 44 @java.lang.Override 45 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)46 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 47 return new GcsFileSpec(); 48 } 49 50 @java.lang.Override getUnknownFields()51 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 52 return this.unknownFields; 53 } 54 getDescriptor()55 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 56 return com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass 57 .internal_static_google_cloud_datacatalog_v1_GcsFileSpec_descriptor; 58 } 59 60 @java.lang.Override 61 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()62 internalGetFieldAccessorTable() { 63 return com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass 64 .internal_static_google_cloud_datacatalog_v1_GcsFileSpec_fieldAccessorTable 65 .ensureFieldAccessorsInitialized( 66 com.google.cloud.datacatalog.v1.GcsFileSpec.class, 67 com.google.cloud.datacatalog.v1.GcsFileSpec.Builder.class); 68 } 69 70 public static final int FILE_PATH_FIELD_NUMBER = 1; 71 72 @SuppressWarnings("serial") 73 private volatile java.lang.Object filePath_ = ""; 74 /** 75 * 76 * 77 * <pre> 78 * Required. Full file path. Example: `gs://bucket_name/a/b.txt`. 79 * </pre> 80 * 81 * <code>string file_path = 1 [(.google.api.field_behavior) = REQUIRED];</code> 82 * 83 * @return The filePath. 84 */ 85 @java.lang.Override getFilePath()86 public java.lang.String getFilePath() { 87 java.lang.Object ref = filePath_; 88 if (ref instanceof java.lang.String) { 89 return (java.lang.String) ref; 90 } else { 91 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 92 java.lang.String s = bs.toStringUtf8(); 93 filePath_ = s; 94 return s; 95 } 96 } 97 /** 98 * 99 * 100 * <pre> 101 * Required. Full file path. Example: `gs://bucket_name/a/b.txt`. 102 * </pre> 103 * 104 * <code>string file_path = 1 [(.google.api.field_behavior) = REQUIRED];</code> 105 * 106 * @return The bytes for filePath. 107 */ 108 @java.lang.Override getFilePathBytes()109 public com.google.protobuf.ByteString getFilePathBytes() { 110 java.lang.Object ref = filePath_; 111 if (ref instanceof java.lang.String) { 112 com.google.protobuf.ByteString b = 113 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 114 filePath_ = b; 115 return b; 116 } else { 117 return (com.google.protobuf.ByteString) ref; 118 } 119 } 120 121 public static final int GCS_TIMESTAMPS_FIELD_NUMBER = 2; 122 private com.google.cloud.datacatalog.v1.SystemTimestamps gcsTimestamps_; 123 /** 124 * 125 * 126 * <pre> 127 * Output only. Creation, modification, and expiration timestamps of a Cloud 128 * Storage file. 129 * </pre> 130 * 131 * <code> 132 * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; 133 * </code> 134 * 135 * @return Whether the gcsTimestamps field is set. 136 */ 137 @java.lang.Override hasGcsTimestamps()138 public boolean hasGcsTimestamps() { 139 return gcsTimestamps_ != null; 140 } 141 /** 142 * 143 * 144 * <pre> 145 * Output only. Creation, modification, and expiration timestamps of a Cloud 146 * Storage file. 147 * </pre> 148 * 149 * <code> 150 * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; 151 * </code> 152 * 153 * @return The gcsTimestamps. 154 */ 155 @java.lang.Override getGcsTimestamps()156 public com.google.cloud.datacatalog.v1.SystemTimestamps getGcsTimestamps() { 157 return gcsTimestamps_ == null 158 ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() 159 : gcsTimestamps_; 160 } 161 /** 162 * 163 * 164 * <pre> 165 * Output only. Creation, modification, and expiration timestamps of a Cloud 166 * Storage file. 167 * </pre> 168 * 169 * <code> 170 * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; 171 * </code> 172 */ 173 @java.lang.Override getGcsTimestampsOrBuilder()174 public com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder getGcsTimestampsOrBuilder() { 175 return gcsTimestamps_ == null 176 ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() 177 : gcsTimestamps_; 178 } 179 180 public static final int SIZE_BYTES_FIELD_NUMBER = 4; 181 private long sizeBytes_ = 0L; 182 /** 183 * 184 * 185 * <pre> 186 * Output only. File size in bytes. 187 * </pre> 188 * 189 * <code>int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 190 * 191 * @return The sizeBytes. 192 */ 193 @java.lang.Override getSizeBytes()194 public long getSizeBytes() { 195 return sizeBytes_; 196 } 197 198 private byte memoizedIsInitialized = -1; 199 200 @java.lang.Override isInitialized()201 public final boolean isInitialized() { 202 byte isInitialized = memoizedIsInitialized; 203 if (isInitialized == 1) return true; 204 if (isInitialized == 0) return false; 205 206 memoizedIsInitialized = 1; 207 return true; 208 } 209 210 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)211 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 212 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) { 213 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filePath_); 214 } 215 if (gcsTimestamps_ != null) { 216 output.writeMessage(2, getGcsTimestamps()); 217 } 218 if (sizeBytes_ != 0L) { 219 output.writeInt64(4, sizeBytes_); 220 } 221 getUnknownFields().writeTo(output); 222 } 223 224 @java.lang.Override getSerializedSize()225 public int getSerializedSize() { 226 int size = memoizedSize; 227 if (size != -1) return size; 228 229 size = 0; 230 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) { 231 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filePath_); 232 } 233 if (gcsTimestamps_ != null) { 234 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getGcsTimestamps()); 235 } 236 if (sizeBytes_ != 0L) { 237 size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, sizeBytes_); 238 } 239 size += getUnknownFields().getSerializedSize(); 240 memoizedSize = size; 241 return size; 242 } 243 244 @java.lang.Override equals(final java.lang.Object obj)245 public boolean equals(final java.lang.Object obj) { 246 if (obj == this) { 247 return true; 248 } 249 if (!(obj instanceof com.google.cloud.datacatalog.v1.GcsFileSpec)) { 250 return super.equals(obj); 251 } 252 com.google.cloud.datacatalog.v1.GcsFileSpec other = 253 (com.google.cloud.datacatalog.v1.GcsFileSpec) obj; 254 255 if (!getFilePath().equals(other.getFilePath())) return false; 256 if (hasGcsTimestamps() != other.hasGcsTimestamps()) return false; 257 if (hasGcsTimestamps()) { 258 if (!getGcsTimestamps().equals(other.getGcsTimestamps())) return false; 259 } 260 if (getSizeBytes() != other.getSizeBytes()) return false; 261 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 262 return true; 263 } 264 265 @java.lang.Override hashCode()266 public int hashCode() { 267 if (memoizedHashCode != 0) { 268 return memoizedHashCode; 269 } 270 int hash = 41; 271 hash = (19 * hash) + getDescriptor().hashCode(); 272 hash = (37 * hash) + FILE_PATH_FIELD_NUMBER; 273 hash = (53 * hash) + getFilePath().hashCode(); 274 if (hasGcsTimestamps()) { 275 hash = (37 * hash) + GCS_TIMESTAMPS_FIELD_NUMBER; 276 hash = (53 * hash) + getGcsTimestamps().hashCode(); 277 } 278 hash = (37 * hash) + SIZE_BYTES_FIELD_NUMBER; 279 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSizeBytes()); 280 hash = (29 * hash) + getUnknownFields().hashCode(); 281 memoizedHashCode = hash; 282 return hash; 283 } 284 parseFrom(java.nio.ByteBuffer data)285 public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom(java.nio.ByteBuffer data) 286 throws com.google.protobuf.InvalidProtocolBufferException { 287 return PARSER.parseFrom(data); 288 } 289 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)290 public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom( 291 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 292 throws com.google.protobuf.InvalidProtocolBufferException { 293 return PARSER.parseFrom(data, extensionRegistry); 294 } 295 parseFrom( com.google.protobuf.ByteString data)296 public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom( 297 com.google.protobuf.ByteString data) 298 throws com.google.protobuf.InvalidProtocolBufferException { 299 return PARSER.parseFrom(data); 300 } 301 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)302 public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom( 303 com.google.protobuf.ByteString data, 304 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 305 throws com.google.protobuf.InvalidProtocolBufferException { 306 return PARSER.parseFrom(data, extensionRegistry); 307 } 308 parseFrom(byte[] data)309 public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom(byte[] data) 310 throws com.google.protobuf.InvalidProtocolBufferException { 311 return PARSER.parseFrom(data); 312 } 313 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)314 public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom( 315 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 316 throws com.google.protobuf.InvalidProtocolBufferException { 317 return PARSER.parseFrom(data, extensionRegistry); 318 } 319 parseFrom(java.io.InputStream input)320 public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom(java.io.InputStream input) 321 throws java.io.IOException { 322 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 323 } 324 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)325 public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom( 326 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 327 throws java.io.IOException { 328 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 329 PARSER, input, extensionRegistry); 330 } 331 parseDelimitedFrom( java.io.InputStream input)332 public static com.google.cloud.datacatalog.v1.GcsFileSpec parseDelimitedFrom( 333 java.io.InputStream input) throws java.io.IOException { 334 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 335 } 336 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)337 public static com.google.cloud.datacatalog.v1.GcsFileSpec parseDelimitedFrom( 338 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 339 throws java.io.IOException { 340 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 341 PARSER, input, extensionRegistry); 342 } 343 parseFrom( com.google.protobuf.CodedInputStream input)344 public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom( 345 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 346 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 347 } 348 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)349 public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom( 350 com.google.protobuf.CodedInputStream input, 351 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 352 throws java.io.IOException { 353 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 354 PARSER, input, extensionRegistry); 355 } 356 357 @java.lang.Override newBuilderForType()358 public Builder newBuilderForType() { 359 return newBuilder(); 360 } 361 newBuilder()362 public static Builder newBuilder() { 363 return DEFAULT_INSTANCE.toBuilder(); 364 } 365 newBuilder(com.google.cloud.datacatalog.v1.GcsFileSpec prototype)366 public static Builder newBuilder(com.google.cloud.datacatalog.v1.GcsFileSpec prototype) { 367 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 368 } 369 370 @java.lang.Override toBuilder()371 public Builder toBuilder() { 372 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 373 } 374 375 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)376 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 377 Builder builder = new Builder(parent); 378 return builder; 379 } 380 /** 381 * 382 * 383 * <pre> 384 * Specification of a single file in Cloud Storage. 385 * </pre> 386 * 387 * Protobuf type {@code google.cloud.datacatalog.v1.GcsFileSpec} 388 */ 389 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 390 implements 391 // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.GcsFileSpec) 392 com.google.cloud.datacatalog.v1.GcsFileSpecOrBuilder { getDescriptor()393 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 394 return com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass 395 .internal_static_google_cloud_datacatalog_v1_GcsFileSpec_descriptor; 396 } 397 398 @java.lang.Override 399 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()400 internalGetFieldAccessorTable() { 401 return com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass 402 .internal_static_google_cloud_datacatalog_v1_GcsFileSpec_fieldAccessorTable 403 .ensureFieldAccessorsInitialized( 404 com.google.cloud.datacatalog.v1.GcsFileSpec.class, 405 com.google.cloud.datacatalog.v1.GcsFileSpec.Builder.class); 406 } 407 408 // Construct using com.google.cloud.datacatalog.v1.GcsFileSpec.newBuilder() Builder()409 private Builder() {} 410 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)411 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 412 super(parent); 413 } 414 415 @java.lang.Override clear()416 public Builder clear() { 417 super.clear(); 418 bitField0_ = 0; 419 filePath_ = ""; 420 gcsTimestamps_ = null; 421 if (gcsTimestampsBuilder_ != null) { 422 gcsTimestampsBuilder_.dispose(); 423 gcsTimestampsBuilder_ = null; 424 } 425 sizeBytes_ = 0L; 426 return this; 427 } 428 429 @java.lang.Override getDescriptorForType()430 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 431 return com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass 432 .internal_static_google_cloud_datacatalog_v1_GcsFileSpec_descriptor; 433 } 434 435 @java.lang.Override getDefaultInstanceForType()436 public com.google.cloud.datacatalog.v1.GcsFileSpec getDefaultInstanceForType() { 437 return com.google.cloud.datacatalog.v1.GcsFileSpec.getDefaultInstance(); 438 } 439 440 @java.lang.Override build()441 public com.google.cloud.datacatalog.v1.GcsFileSpec build() { 442 com.google.cloud.datacatalog.v1.GcsFileSpec result = buildPartial(); 443 if (!result.isInitialized()) { 444 throw newUninitializedMessageException(result); 445 } 446 return result; 447 } 448 449 @java.lang.Override buildPartial()450 public com.google.cloud.datacatalog.v1.GcsFileSpec buildPartial() { 451 com.google.cloud.datacatalog.v1.GcsFileSpec result = 452 new com.google.cloud.datacatalog.v1.GcsFileSpec(this); 453 if (bitField0_ != 0) { 454 buildPartial0(result); 455 } 456 onBuilt(); 457 return result; 458 } 459 buildPartial0(com.google.cloud.datacatalog.v1.GcsFileSpec result)460 private void buildPartial0(com.google.cloud.datacatalog.v1.GcsFileSpec result) { 461 int from_bitField0_ = bitField0_; 462 if (((from_bitField0_ & 0x00000001) != 0)) { 463 result.filePath_ = filePath_; 464 } 465 if (((from_bitField0_ & 0x00000002) != 0)) { 466 result.gcsTimestamps_ = 467 gcsTimestampsBuilder_ == null ? gcsTimestamps_ : gcsTimestampsBuilder_.build(); 468 } 469 if (((from_bitField0_ & 0x00000004) != 0)) { 470 result.sizeBytes_ = sizeBytes_; 471 } 472 } 473 474 @java.lang.Override clone()475 public Builder clone() { 476 return super.clone(); 477 } 478 479 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)480 public Builder setField( 481 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 482 return super.setField(field, value); 483 } 484 485 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)486 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 487 return super.clearField(field); 488 } 489 490 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)491 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 492 return super.clearOneof(oneof); 493 } 494 495 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)496 public Builder setRepeatedField( 497 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 498 return super.setRepeatedField(field, index, value); 499 } 500 501 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)502 public Builder addRepeatedField( 503 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 504 return super.addRepeatedField(field, value); 505 } 506 507 @java.lang.Override mergeFrom(com.google.protobuf.Message other)508 public Builder mergeFrom(com.google.protobuf.Message other) { 509 if (other instanceof com.google.cloud.datacatalog.v1.GcsFileSpec) { 510 return mergeFrom((com.google.cloud.datacatalog.v1.GcsFileSpec) other); 511 } else { 512 super.mergeFrom(other); 513 return this; 514 } 515 } 516 mergeFrom(com.google.cloud.datacatalog.v1.GcsFileSpec other)517 public Builder mergeFrom(com.google.cloud.datacatalog.v1.GcsFileSpec other) { 518 if (other == com.google.cloud.datacatalog.v1.GcsFileSpec.getDefaultInstance()) return this; 519 if (!other.getFilePath().isEmpty()) { 520 filePath_ = other.filePath_; 521 bitField0_ |= 0x00000001; 522 onChanged(); 523 } 524 if (other.hasGcsTimestamps()) { 525 mergeGcsTimestamps(other.getGcsTimestamps()); 526 } 527 if (other.getSizeBytes() != 0L) { 528 setSizeBytes(other.getSizeBytes()); 529 } 530 this.mergeUnknownFields(other.getUnknownFields()); 531 onChanged(); 532 return this; 533 } 534 535 @java.lang.Override isInitialized()536 public final boolean isInitialized() { 537 return true; 538 } 539 540 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)541 public Builder mergeFrom( 542 com.google.protobuf.CodedInputStream input, 543 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 544 throws java.io.IOException { 545 if (extensionRegistry == null) { 546 throw new java.lang.NullPointerException(); 547 } 548 try { 549 boolean done = false; 550 while (!done) { 551 int tag = input.readTag(); 552 switch (tag) { 553 case 0: 554 done = true; 555 break; 556 case 10: 557 { 558 filePath_ = input.readStringRequireUtf8(); 559 bitField0_ |= 0x00000001; 560 break; 561 } // case 10 562 case 18: 563 { 564 input.readMessage(getGcsTimestampsFieldBuilder().getBuilder(), extensionRegistry); 565 bitField0_ |= 0x00000002; 566 break; 567 } // case 18 568 case 32: 569 { 570 sizeBytes_ = input.readInt64(); 571 bitField0_ |= 0x00000004; 572 break; 573 } // case 32 574 default: 575 { 576 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 577 done = true; // was an endgroup tag 578 } 579 break; 580 } // default: 581 } // switch (tag) 582 } // while (!done) 583 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 584 throw e.unwrapIOException(); 585 } finally { 586 onChanged(); 587 } // finally 588 return this; 589 } 590 591 private int bitField0_; 592 593 private java.lang.Object filePath_ = ""; 594 /** 595 * 596 * 597 * <pre> 598 * Required. Full file path. Example: `gs://bucket_name/a/b.txt`. 599 * </pre> 600 * 601 * <code>string file_path = 1 [(.google.api.field_behavior) = REQUIRED];</code> 602 * 603 * @return The filePath. 604 */ getFilePath()605 public java.lang.String getFilePath() { 606 java.lang.Object ref = filePath_; 607 if (!(ref instanceof java.lang.String)) { 608 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 609 java.lang.String s = bs.toStringUtf8(); 610 filePath_ = s; 611 return s; 612 } else { 613 return (java.lang.String) ref; 614 } 615 } 616 /** 617 * 618 * 619 * <pre> 620 * Required. Full file path. Example: `gs://bucket_name/a/b.txt`. 621 * </pre> 622 * 623 * <code>string file_path = 1 [(.google.api.field_behavior) = REQUIRED];</code> 624 * 625 * @return The bytes for filePath. 626 */ getFilePathBytes()627 public com.google.protobuf.ByteString getFilePathBytes() { 628 java.lang.Object ref = filePath_; 629 if (ref instanceof String) { 630 com.google.protobuf.ByteString b = 631 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 632 filePath_ = b; 633 return b; 634 } else { 635 return (com.google.protobuf.ByteString) ref; 636 } 637 } 638 /** 639 * 640 * 641 * <pre> 642 * Required. Full file path. Example: `gs://bucket_name/a/b.txt`. 643 * </pre> 644 * 645 * <code>string file_path = 1 [(.google.api.field_behavior) = REQUIRED];</code> 646 * 647 * @param value The filePath to set. 648 * @return This builder for chaining. 649 */ setFilePath(java.lang.String value)650 public Builder setFilePath(java.lang.String value) { 651 if (value == null) { 652 throw new NullPointerException(); 653 } 654 filePath_ = value; 655 bitField0_ |= 0x00000001; 656 onChanged(); 657 return this; 658 } 659 /** 660 * 661 * 662 * <pre> 663 * Required. Full file path. Example: `gs://bucket_name/a/b.txt`. 664 * </pre> 665 * 666 * <code>string file_path = 1 [(.google.api.field_behavior) = REQUIRED];</code> 667 * 668 * @return This builder for chaining. 669 */ clearFilePath()670 public Builder clearFilePath() { 671 filePath_ = getDefaultInstance().getFilePath(); 672 bitField0_ = (bitField0_ & ~0x00000001); 673 onChanged(); 674 return this; 675 } 676 /** 677 * 678 * 679 * <pre> 680 * Required. Full file path. Example: `gs://bucket_name/a/b.txt`. 681 * </pre> 682 * 683 * <code>string file_path = 1 [(.google.api.field_behavior) = REQUIRED];</code> 684 * 685 * @param value The bytes for filePath to set. 686 * @return This builder for chaining. 687 */ setFilePathBytes(com.google.protobuf.ByteString value)688 public Builder setFilePathBytes(com.google.protobuf.ByteString value) { 689 if (value == null) { 690 throw new NullPointerException(); 691 } 692 checkByteStringIsUtf8(value); 693 filePath_ = value; 694 bitField0_ |= 0x00000001; 695 onChanged(); 696 return this; 697 } 698 699 private com.google.cloud.datacatalog.v1.SystemTimestamps gcsTimestamps_; 700 private com.google.protobuf.SingleFieldBuilderV3< 701 com.google.cloud.datacatalog.v1.SystemTimestamps, 702 com.google.cloud.datacatalog.v1.SystemTimestamps.Builder, 703 com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder> 704 gcsTimestampsBuilder_; 705 /** 706 * 707 * 708 * <pre> 709 * Output only. Creation, modification, and expiration timestamps of a Cloud 710 * Storage file. 711 * </pre> 712 * 713 * <code> 714 * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; 715 * </code> 716 * 717 * @return Whether the gcsTimestamps field is set. 718 */ hasGcsTimestamps()719 public boolean hasGcsTimestamps() { 720 return ((bitField0_ & 0x00000002) != 0); 721 } 722 /** 723 * 724 * 725 * <pre> 726 * Output only. Creation, modification, and expiration timestamps of a Cloud 727 * Storage file. 728 * </pre> 729 * 730 * <code> 731 * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; 732 * </code> 733 * 734 * @return The gcsTimestamps. 735 */ getGcsTimestamps()736 public com.google.cloud.datacatalog.v1.SystemTimestamps getGcsTimestamps() { 737 if (gcsTimestampsBuilder_ == null) { 738 return gcsTimestamps_ == null 739 ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() 740 : gcsTimestamps_; 741 } else { 742 return gcsTimestampsBuilder_.getMessage(); 743 } 744 } 745 /** 746 * 747 * 748 * <pre> 749 * Output only. Creation, modification, and expiration timestamps of a Cloud 750 * Storage file. 751 * </pre> 752 * 753 * <code> 754 * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; 755 * </code> 756 */ setGcsTimestamps(com.google.cloud.datacatalog.v1.SystemTimestamps value)757 public Builder setGcsTimestamps(com.google.cloud.datacatalog.v1.SystemTimestamps value) { 758 if (gcsTimestampsBuilder_ == null) { 759 if (value == null) { 760 throw new NullPointerException(); 761 } 762 gcsTimestamps_ = value; 763 } else { 764 gcsTimestampsBuilder_.setMessage(value); 765 } 766 bitField0_ |= 0x00000002; 767 onChanged(); 768 return this; 769 } 770 /** 771 * 772 * 773 * <pre> 774 * Output only. Creation, modification, and expiration timestamps of a Cloud 775 * Storage file. 776 * </pre> 777 * 778 * <code> 779 * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; 780 * </code> 781 */ setGcsTimestamps( com.google.cloud.datacatalog.v1.SystemTimestamps.Builder builderForValue)782 public Builder setGcsTimestamps( 783 com.google.cloud.datacatalog.v1.SystemTimestamps.Builder builderForValue) { 784 if (gcsTimestampsBuilder_ == null) { 785 gcsTimestamps_ = builderForValue.build(); 786 } else { 787 gcsTimestampsBuilder_.setMessage(builderForValue.build()); 788 } 789 bitField0_ |= 0x00000002; 790 onChanged(); 791 return this; 792 } 793 /** 794 * 795 * 796 * <pre> 797 * Output only. Creation, modification, and expiration timestamps of a Cloud 798 * Storage file. 799 * </pre> 800 * 801 * <code> 802 * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; 803 * </code> 804 */ mergeGcsTimestamps(com.google.cloud.datacatalog.v1.SystemTimestamps value)805 public Builder mergeGcsTimestamps(com.google.cloud.datacatalog.v1.SystemTimestamps value) { 806 if (gcsTimestampsBuilder_ == null) { 807 if (((bitField0_ & 0x00000002) != 0) 808 && gcsTimestamps_ != null 809 && gcsTimestamps_ 810 != com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance()) { 811 getGcsTimestampsBuilder().mergeFrom(value); 812 } else { 813 gcsTimestamps_ = value; 814 } 815 } else { 816 gcsTimestampsBuilder_.mergeFrom(value); 817 } 818 bitField0_ |= 0x00000002; 819 onChanged(); 820 return this; 821 } 822 /** 823 * 824 * 825 * <pre> 826 * Output only. Creation, modification, and expiration timestamps of a Cloud 827 * Storage file. 828 * </pre> 829 * 830 * <code> 831 * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; 832 * </code> 833 */ clearGcsTimestamps()834 public Builder clearGcsTimestamps() { 835 bitField0_ = (bitField0_ & ~0x00000002); 836 gcsTimestamps_ = null; 837 if (gcsTimestampsBuilder_ != null) { 838 gcsTimestampsBuilder_.dispose(); 839 gcsTimestampsBuilder_ = null; 840 } 841 onChanged(); 842 return this; 843 } 844 /** 845 * 846 * 847 * <pre> 848 * Output only. Creation, modification, and expiration timestamps of a Cloud 849 * Storage file. 850 * </pre> 851 * 852 * <code> 853 * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; 854 * </code> 855 */ getGcsTimestampsBuilder()856 public com.google.cloud.datacatalog.v1.SystemTimestamps.Builder getGcsTimestampsBuilder() { 857 bitField0_ |= 0x00000002; 858 onChanged(); 859 return getGcsTimestampsFieldBuilder().getBuilder(); 860 } 861 /** 862 * 863 * 864 * <pre> 865 * Output only. Creation, modification, and expiration timestamps of a Cloud 866 * Storage file. 867 * </pre> 868 * 869 * <code> 870 * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; 871 * </code> 872 */ getGcsTimestampsOrBuilder()873 public com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder getGcsTimestampsOrBuilder() { 874 if (gcsTimestampsBuilder_ != null) { 875 return gcsTimestampsBuilder_.getMessageOrBuilder(); 876 } else { 877 return gcsTimestamps_ == null 878 ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() 879 : gcsTimestamps_; 880 } 881 } 882 /** 883 * 884 * 885 * <pre> 886 * Output only. Creation, modification, and expiration timestamps of a Cloud 887 * Storage file. 888 * </pre> 889 * 890 * <code> 891 * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; 892 * </code> 893 */ 894 private com.google.protobuf.SingleFieldBuilderV3< 895 com.google.cloud.datacatalog.v1.SystemTimestamps, 896 com.google.cloud.datacatalog.v1.SystemTimestamps.Builder, 897 com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder> getGcsTimestampsFieldBuilder()898 getGcsTimestampsFieldBuilder() { 899 if (gcsTimestampsBuilder_ == null) { 900 gcsTimestampsBuilder_ = 901 new com.google.protobuf.SingleFieldBuilderV3< 902 com.google.cloud.datacatalog.v1.SystemTimestamps, 903 com.google.cloud.datacatalog.v1.SystemTimestamps.Builder, 904 com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder>( 905 getGcsTimestamps(), getParentForChildren(), isClean()); 906 gcsTimestamps_ = null; 907 } 908 return gcsTimestampsBuilder_; 909 } 910 911 private long sizeBytes_; 912 /** 913 * 914 * 915 * <pre> 916 * Output only. File size in bytes. 917 * </pre> 918 * 919 * <code>int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 920 * 921 * @return The sizeBytes. 922 */ 923 @java.lang.Override getSizeBytes()924 public long getSizeBytes() { 925 return sizeBytes_; 926 } 927 /** 928 * 929 * 930 * <pre> 931 * Output only. File size in bytes. 932 * </pre> 933 * 934 * <code>int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 935 * 936 * @param value The sizeBytes to set. 937 * @return This builder for chaining. 938 */ setSizeBytes(long value)939 public Builder setSizeBytes(long value) { 940 941 sizeBytes_ = value; 942 bitField0_ |= 0x00000004; 943 onChanged(); 944 return this; 945 } 946 /** 947 * 948 * 949 * <pre> 950 * Output only. File size in bytes. 951 * </pre> 952 * 953 * <code>int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 954 * 955 * @return This builder for chaining. 956 */ clearSizeBytes()957 public Builder clearSizeBytes() { 958 bitField0_ = (bitField0_ & ~0x00000004); 959 sizeBytes_ = 0L; 960 onChanged(); 961 return this; 962 } 963 964 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)965 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 966 return super.setUnknownFields(unknownFields); 967 } 968 969 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)970 public final Builder mergeUnknownFields( 971 final com.google.protobuf.UnknownFieldSet unknownFields) { 972 return super.mergeUnknownFields(unknownFields); 973 } 974 975 // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.GcsFileSpec) 976 } 977 978 // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.GcsFileSpec) 979 private static final com.google.cloud.datacatalog.v1.GcsFileSpec DEFAULT_INSTANCE; 980 981 static { 982 DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.GcsFileSpec(); 983 } 984 getDefaultInstance()985 public static com.google.cloud.datacatalog.v1.GcsFileSpec getDefaultInstance() { 986 return DEFAULT_INSTANCE; 987 } 988 989 private static final com.google.protobuf.Parser<GcsFileSpec> PARSER = 990 new com.google.protobuf.AbstractParser<GcsFileSpec>() { 991 @java.lang.Override 992 public GcsFileSpec parsePartialFrom( 993 com.google.protobuf.CodedInputStream input, 994 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 995 throws com.google.protobuf.InvalidProtocolBufferException { 996 Builder builder = newBuilder(); 997 try { 998 builder.mergeFrom(input, extensionRegistry); 999 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1000 throw e.setUnfinishedMessage(builder.buildPartial()); 1001 } catch (com.google.protobuf.UninitializedMessageException e) { 1002 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1003 } catch (java.io.IOException e) { 1004 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1005 .setUnfinishedMessage(builder.buildPartial()); 1006 } 1007 return builder.buildPartial(); 1008 } 1009 }; 1010 parser()1011 public static com.google.protobuf.Parser<GcsFileSpec> parser() { 1012 return PARSER; 1013 } 1014 1015 @java.lang.Override getParserForType()1016 public com.google.protobuf.Parser<GcsFileSpec> getParserForType() { 1017 return PARSER; 1018 } 1019 1020 @java.lang.Override getDefaultInstanceForType()1021 public com.google.cloud.datacatalog.v1.GcsFileSpec getDefaultInstanceForType() { 1022 return DEFAULT_INSTANCE; 1023 } 1024 } 1025