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/privacy/dlp/v2/dlp.proto 18 19 package com.google.privacy.dlp.v2; 20 21 /** 22 * 23 * 24 * <pre> 25 * DeidentifyTemplates contains instructions on how to de-identify content. 26 * See https://cloud.google.com/dlp/docs/concepts-templates to learn more. 27 * </pre> 28 * 29 * Protobuf type {@code google.privacy.dlp.v2.DeidentifyTemplate} 30 */ 31 public final class DeidentifyTemplate extends com.google.protobuf.GeneratedMessageV3 32 implements 33 // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeidentifyTemplate) 34 DeidentifyTemplateOrBuilder { 35 private static final long serialVersionUID = 0L; 36 // Use DeidentifyTemplate.newBuilder() to construct. DeidentifyTemplate(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37 private DeidentifyTemplate(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 38 super(builder); 39 } 40 DeidentifyTemplate()41 private DeidentifyTemplate() { 42 name_ = ""; 43 displayName_ = ""; 44 description_ = ""; 45 } 46 47 @java.lang.Override 48 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)49 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 50 return new DeidentifyTemplate(); 51 } 52 53 @java.lang.Override getUnknownFields()54 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 55 return this.unknownFields; 56 } 57 getDescriptor()58 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 59 return com.google.privacy.dlp.v2.DlpProto 60 .internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor; 61 } 62 63 @java.lang.Override 64 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()65 internalGetFieldAccessorTable() { 66 return com.google.privacy.dlp.v2.DlpProto 67 .internal_static_google_privacy_dlp_v2_DeidentifyTemplate_fieldAccessorTable 68 .ensureFieldAccessorsInitialized( 69 com.google.privacy.dlp.v2.DeidentifyTemplate.class, 70 com.google.privacy.dlp.v2.DeidentifyTemplate.Builder.class); 71 } 72 73 public static final int NAME_FIELD_NUMBER = 1; 74 75 @SuppressWarnings("serial") 76 private volatile java.lang.Object name_ = ""; 77 /** 78 * 79 * 80 * <pre> 81 * Output only. The template name. 82 * The template will have one of the following formats: 83 * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR 84 * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` 85 * </pre> 86 * 87 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 88 * 89 * @return The name. 90 */ 91 @java.lang.Override getName()92 public java.lang.String getName() { 93 java.lang.Object ref = name_; 94 if (ref instanceof java.lang.String) { 95 return (java.lang.String) ref; 96 } else { 97 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 98 java.lang.String s = bs.toStringUtf8(); 99 name_ = s; 100 return s; 101 } 102 } 103 /** 104 * 105 * 106 * <pre> 107 * Output only. The template name. 108 * The template will have one of the following formats: 109 * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR 110 * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` 111 * </pre> 112 * 113 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 114 * 115 * @return The bytes for name. 116 */ 117 @java.lang.Override getNameBytes()118 public com.google.protobuf.ByteString getNameBytes() { 119 java.lang.Object ref = name_; 120 if (ref instanceof java.lang.String) { 121 com.google.protobuf.ByteString b = 122 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 123 name_ = b; 124 return b; 125 } else { 126 return (com.google.protobuf.ByteString) ref; 127 } 128 } 129 130 public static final int DISPLAY_NAME_FIELD_NUMBER = 2; 131 132 @SuppressWarnings("serial") 133 private volatile java.lang.Object displayName_ = ""; 134 /** 135 * 136 * 137 * <pre> 138 * Display name (max 256 chars). 139 * </pre> 140 * 141 * <code>string display_name = 2;</code> 142 * 143 * @return The displayName. 144 */ 145 @java.lang.Override getDisplayName()146 public java.lang.String getDisplayName() { 147 java.lang.Object ref = displayName_; 148 if (ref instanceof java.lang.String) { 149 return (java.lang.String) ref; 150 } else { 151 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 152 java.lang.String s = bs.toStringUtf8(); 153 displayName_ = s; 154 return s; 155 } 156 } 157 /** 158 * 159 * 160 * <pre> 161 * Display name (max 256 chars). 162 * </pre> 163 * 164 * <code>string display_name = 2;</code> 165 * 166 * @return The bytes for displayName. 167 */ 168 @java.lang.Override getDisplayNameBytes()169 public com.google.protobuf.ByteString getDisplayNameBytes() { 170 java.lang.Object ref = displayName_; 171 if (ref instanceof java.lang.String) { 172 com.google.protobuf.ByteString b = 173 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 174 displayName_ = b; 175 return b; 176 } else { 177 return (com.google.protobuf.ByteString) ref; 178 } 179 } 180 181 public static final int DESCRIPTION_FIELD_NUMBER = 3; 182 183 @SuppressWarnings("serial") 184 private volatile java.lang.Object description_ = ""; 185 /** 186 * 187 * 188 * <pre> 189 * Short description (max 256 chars). 190 * </pre> 191 * 192 * <code>string description = 3;</code> 193 * 194 * @return The description. 195 */ 196 @java.lang.Override getDescription()197 public java.lang.String getDescription() { 198 java.lang.Object ref = description_; 199 if (ref instanceof java.lang.String) { 200 return (java.lang.String) ref; 201 } else { 202 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 203 java.lang.String s = bs.toStringUtf8(); 204 description_ = s; 205 return s; 206 } 207 } 208 /** 209 * 210 * 211 * <pre> 212 * Short description (max 256 chars). 213 * </pre> 214 * 215 * <code>string description = 3;</code> 216 * 217 * @return The bytes for description. 218 */ 219 @java.lang.Override getDescriptionBytes()220 public com.google.protobuf.ByteString getDescriptionBytes() { 221 java.lang.Object ref = description_; 222 if (ref instanceof java.lang.String) { 223 com.google.protobuf.ByteString b = 224 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 225 description_ = b; 226 return b; 227 } else { 228 return (com.google.protobuf.ByteString) ref; 229 } 230 } 231 232 public static final int CREATE_TIME_FIELD_NUMBER = 4; 233 private com.google.protobuf.Timestamp createTime_; 234 /** 235 * 236 * 237 * <pre> 238 * Output only. The creation timestamp of an inspectTemplate. 239 * </pre> 240 * 241 * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 242 * </code> 243 * 244 * @return Whether the createTime field is set. 245 */ 246 @java.lang.Override hasCreateTime()247 public boolean hasCreateTime() { 248 return createTime_ != null; 249 } 250 /** 251 * 252 * 253 * <pre> 254 * Output only. The creation timestamp of an inspectTemplate. 255 * </pre> 256 * 257 * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 258 * </code> 259 * 260 * @return The createTime. 261 */ 262 @java.lang.Override getCreateTime()263 public com.google.protobuf.Timestamp getCreateTime() { 264 return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; 265 } 266 /** 267 * 268 * 269 * <pre> 270 * Output only. The creation timestamp of an inspectTemplate. 271 * </pre> 272 * 273 * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 274 * </code> 275 */ 276 @java.lang.Override getCreateTimeOrBuilder()277 public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { 278 return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; 279 } 280 281 public static final int UPDATE_TIME_FIELD_NUMBER = 5; 282 private com.google.protobuf.Timestamp updateTime_; 283 /** 284 * 285 * 286 * <pre> 287 * Output only. The last update timestamp of an inspectTemplate. 288 * </pre> 289 * 290 * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 291 * </code> 292 * 293 * @return Whether the updateTime field is set. 294 */ 295 @java.lang.Override hasUpdateTime()296 public boolean hasUpdateTime() { 297 return updateTime_ != null; 298 } 299 /** 300 * 301 * 302 * <pre> 303 * Output only. The last update timestamp of an inspectTemplate. 304 * </pre> 305 * 306 * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 307 * </code> 308 * 309 * @return The updateTime. 310 */ 311 @java.lang.Override getUpdateTime()312 public com.google.protobuf.Timestamp getUpdateTime() { 313 return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; 314 } 315 /** 316 * 317 * 318 * <pre> 319 * Output only. The last update timestamp of an inspectTemplate. 320 * </pre> 321 * 322 * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 323 * </code> 324 */ 325 @java.lang.Override getUpdateTimeOrBuilder()326 public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { 327 return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; 328 } 329 330 public static final int DEIDENTIFY_CONFIG_FIELD_NUMBER = 6; 331 private com.google.privacy.dlp.v2.DeidentifyConfig deidentifyConfig_; 332 /** 333 * 334 * 335 * <pre> 336 * The core content of the template. 337 * </pre> 338 * 339 * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6;</code> 340 * 341 * @return Whether the deidentifyConfig field is set. 342 */ 343 @java.lang.Override hasDeidentifyConfig()344 public boolean hasDeidentifyConfig() { 345 return deidentifyConfig_ != null; 346 } 347 /** 348 * 349 * 350 * <pre> 351 * The core content of the template. 352 * </pre> 353 * 354 * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6;</code> 355 * 356 * @return The deidentifyConfig. 357 */ 358 @java.lang.Override getDeidentifyConfig()359 public com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig() { 360 return deidentifyConfig_ == null 361 ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() 362 : deidentifyConfig_; 363 } 364 /** 365 * 366 * 367 * <pre> 368 * The core content of the template. 369 * </pre> 370 * 371 * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6;</code> 372 */ 373 @java.lang.Override getDeidentifyConfigOrBuilder()374 public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder() { 375 return deidentifyConfig_ == null 376 ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() 377 : deidentifyConfig_; 378 } 379 380 private byte memoizedIsInitialized = -1; 381 382 @java.lang.Override isInitialized()383 public final boolean isInitialized() { 384 byte isInitialized = memoizedIsInitialized; 385 if (isInitialized == 1) return true; 386 if (isInitialized == 0) return false; 387 388 memoizedIsInitialized = 1; 389 return true; 390 } 391 392 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)393 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 394 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 395 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); 396 } 397 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { 398 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); 399 } 400 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { 401 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); 402 } 403 if (createTime_ != null) { 404 output.writeMessage(4, getCreateTime()); 405 } 406 if (updateTime_ != null) { 407 output.writeMessage(5, getUpdateTime()); 408 } 409 if (deidentifyConfig_ != null) { 410 output.writeMessage(6, getDeidentifyConfig()); 411 } 412 getUnknownFields().writeTo(output); 413 } 414 415 @java.lang.Override getSerializedSize()416 public int getSerializedSize() { 417 int size = memoizedSize; 418 if (size != -1) return size; 419 420 size = 0; 421 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 422 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); 423 } 424 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { 425 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); 426 } 427 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { 428 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); 429 } 430 if (createTime_ != null) { 431 size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); 432 } 433 if (updateTime_ != null) { 434 size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); 435 } 436 if (deidentifyConfig_ != null) { 437 size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDeidentifyConfig()); 438 } 439 size += getUnknownFields().getSerializedSize(); 440 memoizedSize = size; 441 return size; 442 } 443 444 @java.lang.Override equals(final java.lang.Object obj)445 public boolean equals(final java.lang.Object obj) { 446 if (obj == this) { 447 return true; 448 } 449 if (!(obj instanceof com.google.privacy.dlp.v2.DeidentifyTemplate)) { 450 return super.equals(obj); 451 } 452 com.google.privacy.dlp.v2.DeidentifyTemplate other = 453 (com.google.privacy.dlp.v2.DeidentifyTemplate) obj; 454 455 if (!getName().equals(other.getName())) return false; 456 if (!getDisplayName().equals(other.getDisplayName())) return false; 457 if (!getDescription().equals(other.getDescription())) return false; 458 if (hasCreateTime() != other.hasCreateTime()) return false; 459 if (hasCreateTime()) { 460 if (!getCreateTime().equals(other.getCreateTime())) return false; 461 } 462 if (hasUpdateTime() != other.hasUpdateTime()) return false; 463 if (hasUpdateTime()) { 464 if (!getUpdateTime().equals(other.getUpdateTime())) return false; 465 } 466 if (hasDeidentifyConfig() != other.hasDeidentifyConfig()) return false; 467 if (hasDeidentifyConfig()) { 468 if (!getDeidentifyConfig().equals(other.getDeidentifyConfig())) return false; 469 } 470 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 471 return true; 472 } 473 474 @java.lang.Override hashCode()475 public int hashCode() { 476 if (memoizedHashCode != 0) { 477 return memoizedHashCode; 478 } 479 int hash = 41; 480 hash = (19 * hash) + getDescriptor().hashCode(); 481 hash = (37 * hash) + NAME_FIELD_NUMBER; 482 hash = (53 * hash) + getName().hashCode(); 483 hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; 484 hash = (53 * hash) + getDisplayName().hashCode(); 485 hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; 486 hash = (53 * hash) + getDescription().hashCode(); 487 if (hasCreateTime()) { 488 hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; 489 hash = (53 * hash) + getCreateTime().hashCode(); 490 } 491 if (hasUpdateTime()) { 492 hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; 493 hash = (53 * hash) + getUpdateTime().hashCode(); 494 } 495 if (hasDeidentifyConfig()) { 496 hash = (37 * hash) + DEIDENTIFY_CONFIG_FIELD_NUMBER; 497 hash = (53 * hash) + getDeidentifyConfig().hashCode(); 498 } 499 hash = (29 * hash) + getUnknownFields().hashCode(); 500 memoizedHashCode = hash; 501 return hash; 502 } 503 parseFrom(java.nio.ByteBuffer data)504 public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom(java.nio.ByteBuffer data) 505 throws com.google.protobuf.InvalidProtocolBufferException { 506 return PARSER.parseFrom(data); 507 } 508 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)509 public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( 510 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 511 throws com.google.protobuf.InvalidProtocolBufferException { 512 return PARSER.parseFrom(data, extensionRegistry); 513 } 514 parseFrom( com.google.protobuf.ByteString data)515 public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( 516 com.google.protobuf.ByteString data) 517 throws com.google.protobuf.InvalidProtocolBufferException { 518 return PARSER.parseFrom(data); 519 } 520 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)521 public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( 522 com.google.protobuf.ByteString data, 523 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 524 throws com.google.protobuf.InvalidProtocolBufferException { 525 return PARSER.parseFrom(data, extensionRegistry); 526 } 527 parseFrom(byte[] data)528 public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom(byte[] data) 529 throws com.google.protobuf.InvalidProtocolBufferException { 530 return PARSER.parseFrom(data); 531 } 532 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)533 public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( 534 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 535 throws com.google.protobuf.InvalidProtocolBufferException { 536 return PARSER.parseFrom(data, extensionRegistry); 537 } 538 parseFrom(java.io.InputStream input)539 public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom(java.io.InputStream input) 540 throws java.io.IOException { 541 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 542 } 543 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)544 public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( 545 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 546 throws java.io.IOException { 547 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 548 PARSER, input, extensionRegistry); 549 } 550 parseDelimitedFrom( java.io.InputStream input)551 public static com.google.privacy.dlp.v2.DeidentifyTemplate parseDelimitedFrom( 552 java.io.InputStream input) throws java.io.IOException { 553 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 554 } 555 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)556 public static com.google.privacy.dlp.v2.DeidentifyTemplate parseDelimitedFrom( 557 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 558 throws java.io.IOException { 559 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 560 PARSER, input, extensionRegistry); 561 } 562 parseFrom( com.google.protobuf.CodedInputStream input)563 public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( 564 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 565 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 566 } 567 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)568 public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( 569 com.google.protobuf.CodedInputStream input, 570 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 571 throws java.io.IOException { 572 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 573 PARSER, input, extensionRegistry); 574 } 575 576 @java.lang.Override newBuilderForType()577 public Builder newBuilderForType() { 578 return newBuilder(); 579 } 580 newBuilder()581 public static Builder newBuilder() { 582 return DEFAULT_INSTANCE.toBuilder(); 583 } 584 newBuilder(com.google.privacy.dlp.v2.DeidentifyTemplate prototype)585 public static Builder newBuilder(com.google.privacy.dlp.v2.DeidentifyTemplate prototype) { 586 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 587 } 588 589 @java.lang.Override toBuilder()590 public Builder toBuilder() { 591 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 592 } 593 594 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)595 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 596 Builder builder = new Builder(parent); 597 return builder; 598 } 599 /** 600 * 601 * 602 * <pre> 603 * DeidentifyTemplates contains instructions on how to de-identify content. 604 * See https://cloud.google.com/dlp/docs/concepts-templates to learn more. 605 * </pre> 606 * 607 * Protobuf type {@code google.privacy.dlp.v2.DeidentifyTemplate} 608 */ 609 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 610 implements 611 // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeidentifyTemplate) 612 com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder { getDescriptor()613 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 614 return com.google.privacy.dlp.v2.DlpProto 615 .internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor; 616 } 617 618 @java.lang.Override 619 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()620 internalGetFieldAccessorTable() { 621 return com.google.privacy.dlp.v2.DlpProto 622 .internal_static_google_privacy_dlp_v2_DeidentifyTemplate_fieldAccessorTable 623 .ensureFieldAccessorsInitialized( 624 com.google.privacy.dlp.v2.DeidentifyTemplate.class, 625 com.google.privacy.dlp.v2.DeidentifyTemplate.Builder.class); 626 } 627 628 // Construct using com.google.privacy.dlp.v2.DeidentifyTemplate.newBuilder() Builder()629 private Builder() {} 630 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)631 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 632 super(parent); 633 } 634 635 @java.lang.Override clear()636 public Builder clear() { 637 super.clear(); 638 bitField0_ = 0; 639 name_ = ""; 640 displayName_ = ""; 641 description_ = ""; 642 createTime_ = null; 643 if (createTimeBuilder_ != null) { 644 createTimeBuilder_.dispose(); 645 createTimeBuilder_ = null; 646 } 647 updateTime_ = null; 648 if (updateTimeBuilder_ != null) { 649 updateTimeBuilder_.dispose(); 650 updateTimeBuilder_ = null; 651 } 652 deidentifyConfig_ = null; 653 if (deidentifyConfigBuilder_ != null) { 654 deidentifyConfigBuilder_.dispose(); 655 deidentifyConfigBuilder_ = null; 656 } 657 return this; 658 } 659 660 @java.lang.Override getDescriptorForType()661 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 662 return com.google.privacy.dlp.v2.DlpProto 663 .internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor; 664 } 665 666 @java.lang.Override getDefaultInstanceForType()667 public com.google.privacy.dlp.v2.DeidentifyTemplate getDefaultInstanceForType() { 668 return com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance(); 669 } 670 671 @java.lang.Override build()672 public com.google.privacy.dlp.v2.DeidentifyTemplate build() { 673 com.google.privacy.dlp.v2.DeidentifyTemplate result = buildPartial(); 674 if (!result.isInitialized()) { 675 throw newUninitializedMessageException(result); 676 } 677 return result; 678 } 679 680 @java.lang.Override buildPartial()681 public com.google.privacy.dlp.v2.DeidentifyTemplate buildPartial() { 682 com.google.privacy.dlp.v2.DeidentifyTemplate result = 683 new com.google.privacy.dlp.v2.DeidentifyTemplate(this); 684 if (bitField0_ != 0) { 685 buildPartial0(result); 686 } 687 onBuilt(); 688 return result; 689 } 690 buildPartial0(com.google.privacy.dlp.v2.DeidentifyTemplate result)691 private void buildPartial0(com.google.privacy.dlp.v2.DeidentifyTemplate result) { 692 int from_bitField0_ = bitField0_; 693 if (((from_bitField0_ & 0x00000001) != 0)) { 694 result.name_ = name_; 695 } 696 if (((from_bitField0_ & 0x00000002) != 0)) { 697 result.displayName_ = displayName_; 698 } 699 if (((from_bitField0_ & 0x00000004) != 0)) { 700 result.description_ = description_; 701 } 702 if (((from_bitField0_ & 0x00000008) != 0)) { 703 result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); 704 } 705 if (((from_bitField0_ & 0x00000010) != 0)) { 706 result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); 707 } 708 if (((from_bitField0_ & 0x00000020) != 0)) { 709 result.deidentifyConfig_ = 710 deidentifyConfigBuilder_ == null ? deidentifyConfig_ : deidentifyConfigBuilder_.build(); 711 } 712 } 713 714 @java.lang.Override clone()715 public Builder clone() { 716 return super.clone(); 717 } 718 719 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)720 public Builder setField( 721 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 722 return super.setField(field, value); 723 } 724 725 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)726 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 727 return super.clearField(field); 728 } 729 730 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)731 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 732 return super.clearOneof(oneof); 733 } 734 735 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)736 public Builder setRepeatedField( 737 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 738 return super.setRepeatedField(field, index, value); 739 } 740 741 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)742 public Builder addRepeatedField( 743 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 744 return super.addRepeatedField(field, value); 745 } 746 747 @java.lang.Override mergeFrom(com.google.protobuf.Message other)748 public Builder mergeFrom(com.google.protobuf.Message other) { 749 if (other instanceof com.google.privacy.dlp.v2.DeidentifyTemplate) { 750 return mergeFrom((com.google.privacy.dlp.v2.DeidentifyTemplate) other); 751 } else { 752 super.mergeFrom(other); 753 return this; 754 } 755 } 756 mergeFrom(com.google.privacy.dlp.v2.DeidentifyTemplate other)757 public Builder mergeFrom(com.google.privacy.dlp.v2.DeidentifyTemplate other) { 758 if (other == com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance()) return this; 759 if (!other.getName().isEmpty()) { 760 name_ = other.name_; 761 bitField0_ |= 0x00000001; 762 onChanged(); 763 } 764 if (!other.getDisplayName().isEmpty()) { 765 displayName_ = other.displayName_; 766 bitField0_ |= 0x00000002; 767 onChanged(); 768 } 769 if (!other.getDescription().isEmpty()) { 770 description_ = other.description_; 771 bitField0_ |= 0x00000004; 772 onChanged(); 773 } 774 if (other.hasCreateTime()) { 775 mergeCreateTime(other.getCreateTime()); 776 } 777 if (other.hasUpdateTime()) { 778 mergeUpdateTime(other.getUpdateTime()); 779 } 780 if (other.hasDeidentifyConfig()) { 781 mergeDeidentifyConfig(other.getDeidentifyConfig()); 782 } 783 this.mergeUnknownFields(other.getUnknownFields()); 784 onChanged(); 785 return this; 786 } 787 788 @java.lang.Override isInitialized()789 public final boolean isInitialized() { 790 return true; 791 } 792 793 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)794 public Builder mergeFrom( 795 com.google.protobuf.CodedInputStream input, 796 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 797 throws java.io.IOException { 798 if (extensionRegistry == null) { 799 throw new java.lang.NullPointerException(); 800 } 801 try { 802 boolean done = false; 803 while (!done) { 804 int tag = input.readTag(); 805 switch (tag) { 806 case 0: 807 done = true; 808 break; 809 case 10: 810 { 811 name_ = input.readStringRequireUtf8(); 812 bitField0_ |= 0x00000001; 813 break; 814 } // case 10 815 case 18: 816 { 817 displayName_ = input.readStringRequireUtf8(); 818 bitField0_ |= 0x00000002; 819 break; 820 } // case 18 821 case 26: 822 { 823 description_ = input.readStringRequireUtf8(); 824 bitField0_ |= 0x00000004; 825 break; 826 } // case 26 827 case 34: 828 { 829 input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); 830 bitField0_ |= 0x00000008; 831 break; 832 } // case 34 833 case 42: 834 { 835 input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); 836 bitField0_ |= 0x00000010; 837 break; 838 } // case 42 839 case 50: 840 { 841 input.readMessage( 842 getDeidentifyConfigFieldBuilder().getBuilder(), extensionRegistry); 843 bitField0_ |= 0x00000020; 844 break; 845 } // case 50 846 default: 847 { 848 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 849 done = true; // was an endgroup tag 850 } 851 break; 852 } // default: 853 } // switch (tag) 854 } // while (!done) 855 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 856 throw e.unwrapIOException(); 857 } finally { 858 onChanged(); 859 } // finally 860 return this; 861 } 862 863 private int bitField0_; 864 865 private java.lang.Object name_ = ""; 866 /** 867 * 868 * 869 * <pre> 870 * Output only. The template name. 871 * The template will have one of the following formats: 872 * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR 873 * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` 874 * </pre> 875 * 876 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 877 * 878 * @return The name. 879 */ getName()880 public java.lang.String getName() { 881 java.lang.Object ref = name_; 882 if (!(ref instanceof java.lang.String)) { 883 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 884 java.lang.String s = bs.toStringUtf8(); 885 name_ = s; 886 return s; 887 } else { 888 return (java.lang.String) ref; 889 } 890 } 891 /** 892 * 893 * 894 * <pre> 895 * Output only. The template name. 896 * The template will have one of the following formats: 897 * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR 898 * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` 899 * </pre> 900 * 901 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 902 * 903 * @return The bytes for name. 904 */ getNameBytes()905 public com.google.protobuf.ByteString getNameBytes() { 906 java.lang.Object ref = name_; 907 if (ref instanceof String) { 908 com.google.protobuf.ByteString b = 909 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 910 name_ = b; 911 return b; 912 } else { 913 return (com.google.protobuf.ByteString) ref; 914 } 915 } 916 /** 917 * 918 * 919 * <pre> 920 * Output only. The template name. 921 * The template will have one of the following formats: 922 * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR 923 * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` 924 * </pre> 925 * 926 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 927 * 928 * @param value The name to set. 929 * @return This builder for chaining. 930 */ setName(java.lang.String value)931 public Builder setName(java.lang.String value) { 932 if (value == null) { 933 throw new NullPointerException(); 934 } 935 name_ = value; 936 bitField0_ |= 0x00000001; 937 onChanged(); 938 return this; 939 } 940 /** 941 * 942 * 943 * <pre> 944 * Output only. The template name. 945 * The template will have one of the following formats: 946 * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR 947 * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` 948 * </pre> 949 * 950 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 951 * 952 * @return This builder for chaining. 953 */ clearName()954 public Builder clearName() { 955 name_ = getDefaultInstance().getName(); 956 bitField0_ = (bitField0_ & ~0x00000001); 957 onChanged(); 958 return this; 959 } 960 /** 961 * 962 * 963 * <pre> 964 * Output only. The template name. 965 * The template will have one of the following formats: 966 * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR 967 * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` 968 * </pre> 969 * 970 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 971 * 972 * @param value The bytes for name to set. 973 * @return This builder for chaining. 974 */ setNameBytes(com.google.protobuf.ByteString value)975 public Builder setNameBytes(com.google.protobuf.ByteString value) { 976 if (value == null) { 977 throw new NullPointerException(); 978 } 979 checkByteStringIsUtf8(value); 980 name_ = value; 981 bitField0_ |= 0x00000001; 982 onChanged(); 983 return this; 984 } 985 986 private java.lang.Object displayName_ = ""; 987 /** 988 * 989 * 990 * <pre> 991 * Display name (max 256 chars). 992 * </pre> 993 * 994 * <code>string display_name = 2;</code> 995 * 996 * @return The displayName. 997 */ getDisplayName()998 public java.lang.String getDisplayName() { 999 java.lang.Object ref = displayName_; 1000 if (!(ref instanceof java.lang.String)) { 1001 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1002 java.lang.String s = bs.toStringUtf8(); 1003 displayName_ = s; 1004 return s; 1005 } else { 1006 return (java.lang.String) ref; 1007 } 1008 } 1009 /** 1010 * 1011 * 1012 * <pre> 1013 * Display name (max 256 chars). 1014 * </pre> 1015 * 1016 * <code>string display_name = 2;</code> 1017 * 1018 * @return The bytes for displayName. 1019 */ getDisplayNameBytes()1020 public com.google.protobuf.ByteString getDisplayNameBytes() { 1021 java.lang.Object ref = displayName_; 1022 if (ref instanceof String) { 1023 com.google.protobuf.ByteString b = 1024 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1025 displayName_ = b; 1026 return b; 1027 } else { 1028 return (com.google.protobuf.ByteString) ref; 1029 } 1030 } 1031 /** 1032 * 1033 * 1034 * <pre> 1035 * Display name (max 256 chars). 1036 * </pre> 1037 * 1038 * <code>string display_name = 2;</code> 1039 * 1040 * @param value The displayName to set. 1041 * @return This builder for chaining. 1042 */ setDisplayName(java.lang.String value)1043 public Builder setDisplayName(java.lang.String value) { 1044 if (value == null) { 1045 throw new NullPointerException(); 1046 } 1047 displayName_ = value; 1048 bitField0_ |= 0x00000002; 1049 onChanged(); 1050 return this; 1051 } 1052 /** 1053 * 1054 * 1055 * <pre> 1056 * Display name (max 256 chars). 1057 * </pre> 1058 * 1059 * <code>string display_name = 2;</code> 1060 * 1061 * @return This builder for chaining. 1062 */ clearDisplayName()1063 public Builder clearDisplayName() { 1064 displayName_ = getDefaultInstance().getDisplayName(); 1065 bitField0_ = (bitField0_ & ~0x00000002); 1066 onChanged(); 1067 return this; 1068 } 1069 /** 1070 * 1071 * 1072 * <pre> 1073 * Display name (max 256 chars). 1074 * </pre> 1075 * 1076 * <code>string display_name = 2;</code> 1077 * 1078 * @param value The bytes for displayName to set. 1079 * @return This builder for chaining. 1080 */ setDisplayNameBytes(com.google.protobuf.ByteString value)1081 public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { 1082 if (value == null) { 1083 throw new NullPointerException(); 1084 } 1085 checkByteStringIsUtf8(value); 1086 displayName_ = value; 1087 bitField0_ |= 0x00000002; 1088 onChanged(); 1089 return this; 1090 } 1091 1092 private java.lang.Object description_ = ""; 1093 /** 1094 * 1095 * 1096 * <pre> 1097 * Short description (max 256 chars). 1098 * </pre> 1099 * 1100 * <code>string description = 3;</code> 1101 * 1102 * @return The description. 1103 */ getDescription()1104 public java.lang.String getDescription() { 1105 java.lang.Object ref = description_; 1106 if (!(ref instanceof java.lang.String)) { 1107 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1108 java.lang.String s = bs.toStringUtf8(); 1109 description_ = s; 1110 return s; 1111 } else { 1112 return (java.lang.String) ref; 1113 } 1114 } 1115 /** 1116 * 1117 * 1118 * <pre> 1119 * Short description (max 256 chars). 1120 * </pre> 1121 * 1122 * <code>string description = 3;</code> 1123 * 1124 * @return The bytes for description. 1125 */ getDescriptionBytes()1126 public com.google.protobuf.ByteString getDescriptionBytes() { 1127 java.lang.Object ref = description_; 1128 if (ref instanceof String) { 1129 com.google.protobuf.ByteString b = 1130 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1131 description_ = b; 1132 return b; 1133 } else { 1134 return (com.google.protobuf.ByteString) ref; 1135 } 1136 } 1137 /** 1138 * 1139 * 1140 * <pre> 1141 * Short description (max 256 chars). 1142 * </pre> 1143 * 1144 * <code>string description = 3;</code> 1145 * 1146 * @param value The description to set. 1147 * @return This builder for chaining. 1148 */ setDescription(java.lang.String value)1149 public Builder setDescription(java.lang.String value) { 1150 if (value == null) { 1151 throw new NullPointerException(); 1152 } 1153 description_ = value; 1154 bitField0_ |= 0x00000004; 1155 onChanged(); 1156 return this; 1157 } 1158 /** 1159 * 1160 * 1161 * <pre> 1162 * Short description (max 256 chars). 1163 * </pre> 1164 * 1165 * <code>string description = 3;</code> 1166 * 1167 * @return This builder for chaining. 1168 */ clearDescription()1169 public Builder clearDescription() { 1170 description_ = getDefaultInstance().getDescription(); 1171 bitField0_ = (bitField0_ & ~0x00000004); 1172 onChanged(); 1173 return this; 1174 } 1175 /** 1176 * 1177 * 1178 * <pre> 1179 * Short description (max 256 chars). 1180 * </pre> 1181 * 1182 * <code>string description = 3;</code> 1183 * 1184 * @param value The bytes for description to set. 1185 * @return This builder for chaining. 1186 */ setDescriptionBytes(com.google.protobuf.ByteString value)1187 public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { 1188 if (value == null) { 1189 throw new NullPointerException(); 1190 } 1191 checkByteStringIsUtf8(value); 1192 description_ = value; 1193 bitField0_ |= 0x00000004; 1194 onChanged(); 1195 return this; 1196 } 1197 1198 private com.google.protobuf.Timestamp createTime_; 1199 private com.google.protobuf.SingleFieldBuilderV3< 1200 com.google.protobuf.Timestamp, 1201 com.google.protobuf.Timestamp.Builder, 1202 com.google.protobuf.TimestampOrBuilder> 1203 createTimeBuilder_; 1204 /** 1205 * 1206 * 1207 * <pre> 1208 * Output only. The creation timestamp of an inspectTemplate. 1209 * </pre> 1210 * 1211 * <code> 1212 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1213 * </code> 1214 * 1215 * @return Whether the createTime field is set. 1216 */ hasCreateTime()1217 public boolean hasCreateTime() { 1218 return ((bitField0_ & 0x00000008) != 0); 1219 } 1220 /** 1221 * 1222 * 1223 * <pre> 1224 * Output only. The creation timestamp of an inspectTemplate. 1225 * </pre> 1226 * 1227 * <code> 1228 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1229 * </code> 1230 * 1231 * @return The createTime. 1232 */ getCreateTime()1233 public com.google.protobuf.Timestamp getCreateTime() { 1234 if (createTimeBuilder_ == null) { 1235 return createTime_ == null 1236 ? com.google.protobuf.Timestamp.getDefaultInstance() 1237 : createTime_; 1238 } else { 1239 return createTimeBuilder_.getMessage(); 1240 } 1241 } 1242 /** 1243 * 1244 * 1245 * <pre> 1246 * Output only. The creation timestamp of an inspectTemplate. 1247 * </pre> 1248 * 1249 * <code> 1250 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1251 * </code> 1252 */ setCreateTime(com.google.protobuf.Timestamp value)1253 public Builder setCreateTime(com.google.protobuf.Timestamp value) { 1254 if (createTimeBuilder_ == null) { 1255 if (value == null) { 1256 throw new NullPointerException(); 1257 } 1258 createTime_ = value; 1259 } else { 1260 createTimeBuilder_.setMessage(value); 1261 } 1262 bitField0_ |= 0x00000008; 1263 onChanged(); 1264 return this; 1265 } 1266 /** 1267 * 1268 * 1269 * <pre> 1270 * Output only. The creation timestamp of an inspectTemplate. 1271 * </pre> 1272 * 1273 * <code> 1274 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1275 * </code> 1276 */ setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)1277 public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { 1278 if (createTimeBuilder_ == null) { 1279 createTime_ = builderForValue.build(); 1280 } else { 1281 createTimeBuilder_.setMessage(builderForValue.build()); 1282 } 1283 bitField0_ |= 0x00000008; 1284 onChanged(); 1285 return this; 1286 } 1287 /** 1288 * 1289 * 1290 * <pre> 1291 * Output only. The creation timestamp of an inspectTemplate. 1292 * </pre> 1293 * 1294 * <code> 1295 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1296 * </code> 1297 */ mergeCreateTime(com.google.protobuf.Timestamp value)1298 public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { 1299 if (createTimeBuilder_ == null) { 1300 if (((bitField0_ & 0x00000008) != 0) 1301 && createTime_ != null 1302 && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 1303 getCreateTimeBuilder().mergeFrom(value); 1304 } else { 1305 createTime_ = value; 1306 } 1307 } else { 1308 createTimeBuilder_.mergeFrom(value); 1309 } 1310 bitField0_ |= 0x00000008; 1311 onChanged(); 1312 return this; 1313 } 1314 /** 1315 * 1316 * 1317 * <pre> 1318 * Output only. The creation timestamp of an inspectTemplate. 1319 * </pre> 1320 * 1321 * <code> 1322 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1323 * </code> 1324 */ clearCreateTime()1325 public Builder clearCreateTime() { 1326 bitField0_ = (bitField0_ & ~0x00000008); 1327 createTime_ = null; 1328 if (createTimeBuilder_ != null) { 1329 createTimeBuilder_.dispose(); 1330 createTimeBuilder_ = null; 1331 } 1332 onChanged(); 1333 return this; 1334 } 1335 /** 1336 * 1337 * 1338 * <pre> 1339 * Output only. The creation timestamp of an inspectTemplate. 1340 * </pre> 1341 * 1342 * <code> 1343 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1344 * </code> 1345 */ getCreateTimeBuilder()1346 public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { 1347 bitField0_ |= 0x00000008; 1348 onChanged(); 1349 return getCreateTimeFieldBuilder().getBuilder(); 1350 } 1351 /** 1352 * 1353 * 1354 * <pre> 1355 * Output only. The creation timestamp of an inspectTemplate. 1356 * </pre> 1357 * 1358 * <code> 1359 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1360 * </code> 1361 */ getCreateTimeOrBuilder()1362 public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { 1363 if (createTimeBuilder_ != null) { 1364 return createTimeBuilder_.getMessageOrBuilder(); 1365 } else { 1366 return createTime_ == null 1367 ? com.google.protobuf.Timestamp.getDefaultInstance() 1368 : createTime_; 1369 } 1370 } 1371 /** 1372 * 1373 * 1374 * <pre> 1375 * Output only. The creation timestamp of an inspectTemplate. 1376 * </pre> 1377 * 1378 * <code> 1379 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1380 * </code> 1381 */ 1382 private com.google.protobuf.SingleFieldBuilderV3< 1383 com.google.protobuf.Timestamp, 1384 com.google.protobuf.Timestamp.Builder, 1385 com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder()1386 getCreateTimeFieldBuilder() { 1387 if (createTimeBuilder_ == null) { 1388 createTimeBuilder_ = 1389 new com.google.protobuf.SingleFieldBuilderV3< 1390 com.google.protobuf.Timestamp, 1391 com.google.protobuf.Timestamp.Builder, 1392 com.google.protobuf.TimestampOrBuilder>( 1393 getCreateTime(), getParentForChildren(), isClean()); 1394 createTime_ = null; 1395 } 1396 return createTimeBuilder_; 1397 } 1398 1399 private com.google.protobuf.Timestamp updateTime_; 1400 private com.google.protobuf.SingleFieldBuilderV3< 1401 com.google.protobuf.Timestamp, 1402 com.google.protobuf.Timestamp.Builder, 1403 com.google.protobuf.TimestampOrBuilder> 1404 updateTimeBuilder_; 1405 /** 1406 * 1407 * 1408 * <pre> 1409 * Output only. The last update timestamp of an inspectTemplate. 1410 * </pre> 1411 * 1412 * <code> 1413 * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1414 * </code> 1415 * 1416 * @return Whether the updateTime field is set. 1417 */ hasUpdateTime()1418 public boolean hasUpdateTime() { 1419 return ((bitField0_ & 0x00000010) != 0); 1420 } 1421 /** 1422 * 1423 * 1424 * <pre> 1425 * Output only. The last update timestamp of an inspectTemplate. 1426 * </pre> 1427 * 1428 * <code> 1429 * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1430 * </code> 1431 * 1432 * @return The updateTime. 1433 */ getUpdateTime()1434 public com.google.protobuf.Timestamp getUpdateTime() { 1435 if (updateTimeBuilder_ == null) { 1436 return updateTime_ == null 1437 ? com.google.protobuf.Timestamp.getDefaultInstance() 1438 : updateTime_; 1439 } else { 1440 return updateTimeBuilder_.getMessage(); 1441 } 1442 } 1443 /** 1444 * 1445 * 1446 * <pre> 1447 * Output only. The last update timestamp of an inspectTemplate. 1448 * </pre> 1449 * 1450 * <code> 1451 * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1452 * </code> 1453 */ setUpdateTime(com.google.protobuf.Timestamp value)1454 public Builder setUpdateTime(com.google.protobuf.Timestamp value) { 1455 if (updateTimeBuilder_ == null) { 1456 if (value == null) { 1457 throw new NullPointerException(); 1458 } 1459 updateTime_ = value; 1460 } else { 1461 updateTimeBuilder_.setMessage(value); 1462 } 1463 bitField0_ |= 0x00000010; 1464 onChanged(); 1465 return this; 1466 } 1467 /** 1468 * 1469 * 1470 * <pre> 1471 * Output only. The last update timestamp of an inspectTemplate. 1472 * </pre> 1473 * 1474 * <code> 1475 * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1476 * </code> 1477 */ setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)1478 public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { 1479 if (updateTimeBuilder_ == null) { 1480 updateTime_ = builderForValue.build(); 1481 } else { 1482 updateTimeBuilder_.setMessage(builderForValue.build()); 1483 } 1484 bitField0_ |= 0x00000010; 1485 onChanged(); 1486 return this; 1487 } 1488 /** 1489 * 1490 * 1491 * <pre> 1492 * Output only. The last update timestamp of an inspectTemplate. 1493 * </pre> 1494 * 1495 * <code> 1496 * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1497 * </code> 1498 */ mergeUpdateTime(com.google.protobuf.Timestamp value)1499 public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { 1500 if (updateTimeBuilder_ == null) { 1501 if (((bitField0_ & 0x00000010) != 0) 1502 && updateTime_ != null 1503 && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 1504 getUpdateTimeBuilder().mergeFrom(value); 1505 } else { 1506 updateTime_ = value; 1507 } 1508 } else { 1509 updateTimeBuilder_.mergeFrom(value); 1510 } 1511 bitField0_ |= 0x00000010; 1512 onChanged(); 1513 return this; 1514 } 1515 /** 1516 * 1517 * 1518 * <pre> 1519 * Output only. The last update timestamp of an inspectTemplate. 1520 * </pre> 1521 * 1522 * <code> 1523 * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1524 * </code> 1525 */ clearUpdateTime()1526 public Builder clearUpdateTime() { 1527 bitField0_ = (bitField0_ & ~0x00000010); 1528 updateTime_ = null; 1529 if (updateTimeBuilder_ != null) { 1530 updateTimeBuilder_.dispose(); 1531 updateTimeBuilder_ = null; 1532 } 1533 onChanged(); 1534 return this; 1535 } 1536 /** 1537 * 1538 * 1539 * <pre> 1540 * Output only. The last update timestamp of an inspectTemplate. 1541 * </pre> 1542 * 1543 * <code> 1544 * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1545 * </code> 1546 */ getUpdateTimeBuilder()1547 public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { 1548 bitField0_ |= 0x00000010; 1549 onChanged(); 1550 return getUpdateTimeFieldBuilder().getBuilder(); 1551 } 1552 /** 1553 * 1554 * 1555 * <pre> 1556 * Output only. The last update timestamp of an inspectTemplate. 1557 * </pre> 1558 * 1559 * <code> 1560 * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1561 * </code> 1562 */ getUpdateTimeOrBuilder()1563 public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { 1564 if (updateTimeBuilder_ != null) { 1565 return updateTimeBuilder_.getMessageOrBuilder(); 1566 } else { 1567 return updateTime_ == null 1568 ? com.google.protobuf.Timestamp.getDefaultInstance() 1569 : updateTime_; 1570 } 1571 } 1572 /** 1573 * 1574 * 1575 * <pre> 1576 * Output only. The last update timestamp of an inspectTemplate. 1577 * </pre> 1578 * 1579 * <code> 1580 * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1581 * </code> 1582 */ 1583 private com.google.protobuf.SingleFieldBuilderV3< 1584 com.google.protobuf.Timestamp, 1585 com.google.protobuf.Timestamp.Builder, 1586 com.google.protobuf.TimestampOrBuilder> getUpdateTimeFieldBuilder()1587 getUpdateTimeFieldBuilder() { 1588 if (updateTimeBuilder_ == null) { 1589 updateTimeBuilder_ = 1590 new com.google.protobuf.SingleFieldBuilderV3< 1591 com.google.protobuf.Timestamp, 1592 com.google.protobuf.Timestamp.Builder, 1593 com.google.protobuf.TimestampOrBuilder>( 1594 getUpdateTime(), getParentForChildren(), isClean()); 1595 updateTime_ = null; 1596 } 1597 return updateTimeBuilder_; 1598 } 1599 1600 private com.google.privacy.dlp.v2.DeidentifyConfig deidentifyConfig_; 1601 private com.google.protobuf.SingleFieldBuilderV3< 1602 com.google.privacy.dlp.v2.DeidentifyConfig, 1603 com.google.privacy.dlp.v2.DeidentifyConfig.Builder, 1604 com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder> 1605 deidentifyConfigBuilder_; 1606 /** 1607 * 1608 * 1609 * <pre> 1610 * The core content of the template. 1611 * </pre> 1612 * 1613 * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6;</code> 1614 * 1615 * @return Whether the deidentifyConfig field is set. 1616 */ hasDeidentifyConfig()1617 public boolean hasDeidentifyConfig() { 1618 return ((bitField0_ & 0x00000020) != 0); 1619 } 1620 /** 1621 * 1622 * 1623 * <pre> 1624 * The core content of the template. 1625 * </pre> 1626 * 1627 * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6;</code> 1628 * 1629 * @return The deidentifyConfig. 1630 */ getDeidentifyConfig()1631 public com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig() { 1632 if (deidentifyConfigBuilder_ == null) { 1633 return deidentifyConfig_ == null 1634 ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() 1635 : deidentifyConfig_; 1636 } else { 1637 return deidentifyConfigBuilder_.getMessage(); 1638 } 1639 } 1640 /** 1641 * 1642 * 1643 * <pre> 1644 * The core content of the template. 1645 * </pre> 1646 * 1647 * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6;</code> 1648 */ setDeidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value)1649 public Builder setDeidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) { 1650 if (deidentifyConfigBuilder_ == null) { 1651 if (value == null) { 1652 throw new NullPointerException(); 1653 } 1654 deidentifyConfig_ = value; 1655 } else { 1656 deidentifyConfigBuilder_.setMessage(value); 1657 } 1658 bitField0_ |= 0x00000020; 1659 onChanged(); 1660 return this; 1661 } 1662 /** 1663 * 1664 * 1665 * <pre> 1666 * The core content of the template. 1667 * </pre> 1668 * 1669 * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6;</code> 1670 */ setDeidentifyConfig( com.google.privacy.dlp.v2.DeidentifyConfig.Builder builderForValue)1671 public Builder setDeidentifyConfig( 1672 com.google.privacy.dlp.v2.DeidentifyConfig.Builder builderForValue) { 1673 if (deidentifyConfigBuilder_ == null) { 1674 deidentifyConfig_ = builderForValue.build(); 1675 } else { 1676 deidentifyConfigBuilder_.setMessage(builderForValue.build()); 1677 } 1678 bitField0_ |= 0x00000020; 1679 onChanged(); 1680 return this; 1681 } 1682 /** 1683 * 1684 * 1685 * <pre> 1686 * The core content of the template. 1687 * </pre> 1688 * 1689 * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6;</code> 1690 */ mergeDeidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value)1691 public Builder mergeDeidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) { 1692 if (deidentifyConfigBuilder_ == null) { 1693 if (((bitField0_ & 0x00000020) != 0) 1694 && deidentifyConfig_ != null 1695 && deidentifyConfig_ 1696 != com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance()) { 1697 getDeidentifyConfigBuilder().mergeFrom(value); 1698 } else { 1699 deidentifyConfig_ = value; 1700 } 1701 } else { 1702 deidentifyConfigBuilder_.mergeFrom(value); 1703 } 1704 bitField0_ |= 0x00000020; 1705 onChanged(); 1706 return this; 1707 } 1708 /** 1709 * 1710 * 1711 * <pre> 1712 * The core content of the template. 1713 * </pre> 1714 * 1715 * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6;</code> 1716 */ clearDeidentifyConfig()1717 public Builder clearDeidentifyConfig() { 1718 bitField0_ = (bitField0_ & ~0x00000020); 1719 deidentifyConfig_ = null; 1720 if (deidentifyConfigBuilder_ != null) { 1721 deidentifyConfigBuilder_.dispose(); 1722 deidentifyConfigBuilder_ = null; 1723 } 1724 onChanged(); 1725 return this; 1726 } 1727 /** 1728 * 1729 * 1730 * <pre> 1731 * The core content of the template. 1732 * </pre> 1733 * 1734 * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6;</code> 1735 */ getDeidentifyConfigBuilder()1736 public com.google.privacy.dlp.v2.DeidentifyConfig.Builder getDeidentifyConfigBuilder() { 1737 bitField0_ |= 0x00000020; 1738 onChanged(); 1739 return getDeidentifyConfigFieldBuilder().getBuilder(); 1740 } 1741 /** 1742 * 1743 * 1744 * <pre> 1745 * The core content of the template. 1746 * </pre> 1747 * 1748 * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6;</code> 1749 */ getDeidentifyConfigOrBuilder()1750 public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder() { 1751 if (deidentifyConfigBuilder_ != null) { 1752 return deidentifyConfigBuilder_.getMessageOrBuilder(); 1753 } else { 1754 return deidentifyConfig_ == null 1755 ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() 1756 : deidentifyConfig_; 1757 } 1758 } 1759 /** 1760 * 1761 * 1762 * <pre> 1763 * The core content of the template. 1764 * </pre> 1765 * 1766 * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6;</code> 1767 */ 1768 private com.google.protobuf.SingleFieldBuilderV3< 1769 com.google.privacy.dlp.v2.DeidentifyConfig, 1770 com.google.privacy.dlp.v2.DeidentifyConfig.Builder, 1771 com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder> getDeidentifyConfigFieldBuilder()1772 getDeidentifyConfigFieldBuilder() { 1773 if (deidentifyConfigBuilder_ == null) { 1774 deidentifyConfigBuilder_ = 1775 new com.google.protobuf.SingleFieldBuilderV3< 1776 com.google.privacy.dlp.v2.DeidentifyConfig, 1777 com.google.privacy.dlp.v2.DeidentifyConfig.Builder, 1778 com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder>( 1779 getDeidentifyConfig(), getParentForChildren(), isClean()); 1780 deidentifyConfig_ = null; 1781 } 1782 return deidentifyConfigBuilder_; 1783 } 1784 1785 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1786 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1787 return super.setUnknownFields(unknownFields); 1788 } 1789 1790 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1791 public final Builder mergeUnknownFields( 1792 final com.google.protobuf.UnknownFieldSet unknownFields) { 1793 return super.mergeUnknownFields(unknownFields); 1794 } 1795 1796 // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeidentifyTemplate) 1797 } 1798 1799 // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeidentifyTemplate) 1800 private static final com.google.privacy.dlp.v2.DeidentifyTemplate DEFAULT_INSTANCE; 1801 1802 static { 1803 DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeidentifyTemplate(); 1804 } 1805 getDefaultInstance()1806 public static com.google.privacy.dlp.v2.DeidentifyTemplate getDefaultInstance() { 1807 return DEFAULT_INSTANCE; 1808 } 1809 1810 private static final com.google.protobuf.Parser<DeidentifyTemplate> PARSER = 1811 new com.google.protobuf.AbstractParser<DeidentifyTemplate>() { 1812 @java.lang.Override 1813 public DeidentifyTemplate parsePartialFrom( 1814 com.google.protobuf.CodedInputStream input, 1815 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1816 throws com.google.protobuf.InvalidProtocolBufferException { 1817 Builder builder = newBuilder(); 1818 try { 1819 builder.mergeFrom(input, extensionRegistry); 1820 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1821 throw e.setUnfinishedMessage(builder.buildPartial()); 1822 } catch (com.google.protobuf.UninitializedMessageException e) { 1823 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1824 } catch (java.io.IOException e) { 1825 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1826 .setUnfinishedMessage(builder.buildPartial()); 1827 } 1828 return builder.buildPartial(); 1829 } 1830 }; 1831 parser()1832 public static com.google.protobuf.Parser<DeidentifyTemplate> parser() { 1833 return PARSER; 1834 } 1835 1836 @java.lang.Override getParserForType()1837 public com.google.protobuf.Parser<DeidentifyTemplate> getParserForType() { 1838 return PARSER; 1839 } 1840 1841 @java.lang.Override getDefaultInstanceForType()1842 public com.google.privacy.dlp.v2.DeidentifyTemplate getDefaultInstanceForType() { 1843 return DEFAULT_INSTANCE; 1844 } 1845 } 1846