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