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