/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/asset/v1/assets.proto

package com.google.cloud.asset.v1;

/**
 *
 *
 * <pre>
 * A result of Resource Search, containing information of a cloud resource.
 * Next ID: 32
 * </pre>
 *
 * Protobuf type {@code google.cloud.asset.v1.ResourceSearchResult}
 */
public final class ResourceSearchResult extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ResourceSearchResult)
    ResourceSearchResultOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use ResourceSearchResult.newBuilder() to construct.
  private ResourceSearchResult(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private ResourceSearchResult() {
    name_ = "";
    assetType_ = "";
    project_ = "";
    folders_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    organization_ = "";
    displayName_ = "";
    description_ = "";
    location_ = "";
    networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    kmsKey_ = "";
    kmsKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    state_ = "";
    parentFullResourceName_ = "";
    versionedResources_ = java.util.Collections.emptyList();
    attachedResources_ = java.util.Collections.emptyList();
    tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    tagValues_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    tagValueIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    parentAssetType_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new ResourceSearchResult();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.asset.v1.AssetProto
        .internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(int number) {
    switch (number) {
      case 7:
        return internalGetLabels();
      case 21:
        return internalGetRelationships();
      default:
        throw new RuntimeException("Invalid map field number: " + number);
    }
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.asset.v1.AssetProto
        .internal_static_google_cloud_asset_v1_ResourceSearchResult_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.asset.v1.ResourceSearchResult.class,
            com.google.cloud.asset.v1.ResourceSearchResult.Builder.class);
  }

  public static final int NAME_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * The full resource name of this resource. Example:
   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
   * See [Cloud Asset Inventory Resource Name
   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
   * for more information.
   * To search against the `name`:
   * * Use a field query. Example: `name:instance1`
   * * Use a free text query. Example: `instance1`
   * </pre>
   *
   * <code>string name = 1;</code>
   *
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The full resource name of this resource. Example:
   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
   * See [Cloud Asset Inventory Resource Name
   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
   * for more information.
   * To search against the `name`:
   * * Use a field query. Example: `name:instance1`
   * * Use a free text query. Example: `instance1`
   * </pre>
   *
   * <code>string name = 1;</code>
   *
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ASSET_TYPE_FIELD_NUMBER = 2;

  @SuppressWarnings("serial")
  private volatile java.lang.Object assetType_ = "";
  /**
   *
   *
   * <pre>
   * The type of this resource. Example: `compute.googleapis.com/Disk`.
   * To search against the `asset_type`:
   * * Specify the `asset_type` field in your search request.
   * </pre>
   *
   * <code>string asset_type = 2;</code>
   *
   * @return The assetType.
   */
  @java.lang.Override
  public java.lang.String getAssetType() {
    java.lang.Object ref = assetType_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      assetType_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The type of this resource. Example: `compute.googleapis.com/Disk`.
   * To search against the `asset_type`:
   * * Specify the `asset_type` field in your search request.
   * </pre>
   *
   * <code>string asset_type = 2;</code>
   *
   * @return The bytes for assetType.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getAssetTypeBytes() {
    java.lang.Object ref = assetType_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      assetType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PROJECT_FIELD_NUMBER = 3;

  @SuppressWarnings("serial")
  private volatile java.lang.Object project_ = "";
  /**
   *
   *
   * <pre>
   * The project that this resource belongs to, in the form of
   * projects/{PROJECT_NUMBER}. This field is available when the resource
   * belongs to a project.
   * To search against `project`:
   * * Use a field query. Example: `project:12345`
   * * Use a free text query. Example: `12345`
   * * Specify the `scope` field as this project in your search request.
   * </pre>
   *
   * <code>string project = 3;</code>
   *
   * @return The project.
   */
  @java.lang.Override
  public java.lang.String getProject() {
    java.lang.Object ref = project_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      project_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The project that this resource belongs to, in the form of
   * projects/{PROJECT_NUMBER}. This field is available when the resource
   * belongs to a project.
   * To search against `project`:
   * * Use a field query. Example: `project:12345`
   * * Use a free text query. Example: `12345`
   * * Specify the `scope` field as this project in your search request.
   * </pre>
   *
   * <code>string project = 3;</code>
   *
   * @return The bytes for project.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getProjectBytes() {
    java.lang.Object ref = project_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      project_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FOLDERS_FIELD_NUMBER = 17;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList folders_;
  /**
   *
   *
   * <pre>
   * The folder(s) that this resource belongs to, in the form of
   * folders/{FOLDER_NUMBER}. This field is available when the resource
   * belongs to one or more folders.
   * To search against `folders`:
   * * Use a field query. Example: `folders:(123 OR 456)`
   * * Use a free text query. Example: `123`
   * * Specify the `scope` field as this folder in your search request.
   * </pre>
   *
   * <code>repeated string folders = 17;</code>
   *
   * @return A list containing the folders.
   */
  public com.google.protobuf.ProtocolStringList getFoldersList() {
    return folders_;
  }
  /**
   *
   *
   * <pre>
   * The folder(s) that this resource belongs to, in the form of
   * folders/{FOLDER_NUMBER}. This field is available when the resource
   * belongs to one or more folders.
   * To search against `folders`:
   * * Use a field query. Example: `folders:(123 OR 456)`
   * * Use a free text query. Example: `123`
   * * Specify the `scope` field as this folder in your search request.
   * </pre>
   *
   * <code>repeated string folders = 17;</code>
   *
   * @return The count of folders.
   */
  public int getFoldersCount() {
    return folders_.size();
  }
  /**
   *
   *
   * <pre>
   * The folder(s) that this resource belongs to, in the form of
   * folders/{FOLDER_NUMBER}. This field is available when the resource
   * belongs to one or more folders.
   * To search against `folders`:
   * * Use a field query. Example: `folders:(123 OR 456)`
   * * Use a free text query. Example: `123`
   * * Specify the `scope` field as this folder in your search request.
   * </pre>
   *
   * <code>repeated string folders = 17;</code>
   *
   * @param index The index of the element to return.
   * @return The folders at the given index.
   */
  public java.lang.String getFolders(int index) {
    return folders_.get(index);
  }
  /**
   *
   *
   * <pre>
   * The folder(s) that this resource belongs to, in the form of
   * folders/{FOLDER_NUMBER}. This field is available when the resource
   * belongs to one or more folders.
   * To search against `folders`:
   * * Use a field query. Example: `folders:(123 OR 456)`
   * * Use a free text query. Example: `123`
   * * Specify the `scope` field as this folder in your search request.
   * </pre>
   *
   * <code>repeated string folders = 17;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the folders at the given index.
   */
  public com.google.protobuf.ByteString getFoldersBytes(int index) {
    return folders_.getByteString(index);
  }

  public static final int ORGANIZATION_FIELD_NUMBER = 18;

  @SuppressWarnings("serial")
  private volatile java.lang.Object organization_ = "";
  /**
   *
   *
   * <pre>
   * The organization that this resource belongs to, in the form of
   * organizations/{ORGANIZATION_NUMBER}. This field is available when the
   * resource belongs to an organization.
   * To search against `organization`:
   * * Use a field query. Example: `organization:123`
   * * Use a free text query. Example: `123`
   * * Specify the `scope` field as this organization in your search request.
   * </pre>
   *
   * <code>string organization = 18;</code>
   *
   * @return The organization.
   */
  @java.lang.Override
  public java.lang.String getOrganization() {
    java.lang.Object ref = organization_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      organization_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The organization that this resource belongs to, in the form of
   * organizations/{ORGANIZATION_NUMBER}. This field is available when the
   * resource belongs to an organization.
   * To search against `organization`:
   * * Use a field query. Example: `organization:123`
   * * Use a free text query. Example: `123`
   * * Specify the `scope` field as this organization in your search request.
   * </pre>
   *
   * <code>string organization = 18;</code>
   *
   * @return The bytes for organization.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getOrganizationBytes() {
    java.lang.Object ref = organization_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      organization_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DISPLAY_NAME_FIELD_NUMBER = 4;

  @SuppressWarnings("serial")
  private volatile java.lang.Object displayName_ = "";
  /**
   *
   *
   * <pre>
   * The display name of this resource. This field is available only when the
   * resource's Protobuf contains it.
   * To search against the `display_name`:
   * * Use a field query. Example: `displayName:"My Instance"`
   * * Use a free text query. Example: `"My Instance"`
   * </pre>
   *
   * <code>string display_name = 4;</code>
   *
   * @return The displayName.
   */
  @java.lang.Override
  public java.lang.String getDisplayName() {
    java.lang.Object ref = displayName_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      displayName_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The display name of this resource. This field is available only when the
   * resource's Protobuf contains it.
   * To search against the `display_name`:
   * * Use a field query. Example: `displayName:"My Instance"`
   * * Use a free text query. Example: `"My Instance"`
   * </pre>
   *
   * <code>string display_name = 4;</code>
   *
   * @return The bytes for displayName.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getDisplayNameBytes() {
    java.lang.Object ref = displayName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      displayName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DESCRIPTION_FIELD_NUMBER = 5;

  @SuppressWarnings("serial")
  private volatile java.lang.Object description_ = "";
  /**
   *
   *
   * <pre>
   * One or more paragraphs of text description of this resource. Maximum length
   * could be up to 1M bytes. This field is available only when the resource's
   * Protobuf contains it.
   * To search against the `description`:
   * * Use a field query. Example: `description:"important instance"`
   * * Use a free text query. Example: `"important instance"`
   * </pre>
   *
   * <code>string description = 5;</code>
   *
   * @return The description.
   */
  @java.lang.Override
  public java.lang.String getDescription() {
    java.lang.Object ref = description_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      description_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * One or more paragraphs of text description of this resource. Maximum length
   * could be up to 1M bytes. This field is available only when the resource's
   * Protobuf contains it.
   * To search against the `description`:
   * * Use a field query. Example: `description:"important instance"`
   * * Use a free text query. Example: `"important instance"`
   * </pre>
   *
   * <code>string description = 5;</code>
   *
   * @return The bytes for description.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getDescriptionBytes() {
    java.lang.Object ref = description_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      description_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int LOCATION_FIELD_NUMBER = 6;

  @SuppressWarnings("serial")
  private volatile java.lang.Object location_ = "";
  /**
   *
   *
   * <pre>
   * Location can be `global`, regional like `us-east1`, or zonal like
   * `us-west1-b`. This field is available only when the resource's Protobuf
   * contains it.
   * To search against the `location`:
   * * Use a field query. Example: `location:us-west*`
   * * Use a free text query. Example: `us-west*`
   * </pre>
   *
   * <code>string location = 6;</code>
   *
   * @return The location.
   */
  @java.lang.Override
  public java.lang.String getLocation() {
    java.lang.Object ref = location_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      location_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Location can be `global`, regional like `us-east1`, or zonal like
   * `us-west1-b`. This field is available only when the resource's Protobuf
   * contains it.
   * To search against the `location`:
   * * Use a field query. Example: `location:us-west*`
   * * Use a free text query. Example: `us-west*`
   * </pre>
   *
   * <code>string location = 6;</code>
   *
   * @return The bytes for location.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getLocationBytes() {
    java.lang.Object ref = location_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      location_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int LABELS_FIELD_NUMBER = 7;

  private static final class LabelsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
        com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
            com.google.cloud.asset.v1.AssetProto
                .internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;

  private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
    if (labels_ == null) {
      return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
    }
    return labels_;
  }

  public int getLabelsCount() {
    return internalGetLabels().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * Labels associated with this resource. See [Labelling and grouping Google
   * Cloud
   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
   * for more information. This field is available only when the resource's
   * Protobuf contains it.
   * To search against the `labels`:
   * * Use a field query:
   *     - query on any label's key or value. Example: `labels:prod`
   *     - query by a given label. Example: `labels.env:prod`
   *     - query by a given label's existence. Example: `labels.env:*`
   * * Use a free text query. Example: `prod`
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 7;</code>
   */
  @java.lang.Override
  public boolean containsLabels(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetLabels().getMap().containsKey(key);
  }
  /** Use {@link #getLabelsMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getLabels() {
    return getLabelsMap();
  }
  /**
   *
   *
   * <pre>
   * Labels associated with this resource. See [Labelling and grouping Google
   * Cloud
   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
   * for more information. This field is available only when the resource's
   * Protobuf contains it.
   * To search against the `labels`:
   * * Use a field query:
   *     - query on any label's key or value. Example: `labels:prod`
   *     - query by a given label. Example: `labels.env:prod`
   *     - query by a given label's existence. Example: `labels.env:*`
   * * Use a free text query. Example: `prod`
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 7;</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
    return internalGetLabels().getMap();
  }
  /**
   *
   *
   * <pre>
   * Labels associated with this resource. See [Labelling and grouping Google
   * Cloud
   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
   * for more information. This field is available only when the resource's
   * Protobuf contains it.
   * To search against the `labels`:
   * * Use a field query:
   *     - query on any label's key or value. Example: `labels:prod`
   *     - query by a given label. Example: `labels.env:prod`
   *     - query by a given label's existence. Example: `labels.env:*`
   * * Use a free text query. Example: `prod`
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 7;</code>
   */
  @java.lang.Override
  public /* nullable */ java.lang.String getLabelsOrDefault(
      java.lang.String key,
      /* nullable */
      java.lang.String defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * Labels associated with this resource. See [Labelling and grouping Google
   * Cloud
   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
   * for more information. This field is available only when the resource's
   * Protobuf contains it.
   * To search against the `labels`:
   * * Use a field query:
   *     - query on any label's key or value. Example: `labels:prod`
   *     - query by a given label. Example: `labels.env:prod`
   *     - query by a given label's existence. Example: `labels.env:*`
   * * Use a free text query. Example: `prod`
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 7;</code>
   */
  @java.lang.Override
  public java.lang.String getLabelsOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int NETWORK_TAGS_FIELD_NUMBER = 8;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList networkTags_;
  /**
   *
   *
   * <pre>
   * Network tags associated with this resource. Like labels, network tags are a
   * type of annotations used to group Google Cloud resources. See [Labelling
   * Google Cloud
   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
   * for more information. This field is available only when the resource's
   * Protobuf contains it.
   * To search against the `network_tags`:
   * * Use a field query. Example: `networkTags:internal`
   * * Use a free text query. Example: `internal`
   * </pre>
   *
   * <code>repeated string network_tags = 8;</code>
   *
   * @return A list containing the networkTags.
   */
  public com.google.protobuf.ProtocolStringList getNetworkTagsList() {
    return networkTags_;
  }
  /**
   *
   *
   * <pre>
   * Network tags associated with this resource. Like labels, network tags are a
   * type of annotations used to group Google Cloud resources. See [Labelling
   * Google Cloud
   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
   * for more information. This field is available only when the resource's
   * Protobuf contains it.
   * To search against the `network_tags`:
   * * Use a field query. Example: `networkTags:internal`
   * * Use a free text query. Example: `internal`
   * </pre>
   *
   * <code>repeated string network_tags = 8;</code>
   *
   * @return The count of networkTags.
   */
  public int getNetworkTagsCount() {
    return networkTags_.size();
  }
  /**
   *
   *
   * <pre>
   * Network tags associated with this resource. Like labels, network tags are a
   * type of annotations used to group Google Cloud resources. See [Labelling
   * Google Cloud
   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
   * for more information. This field is available only when the resource's
   * Protobuf contains it.
   * To search against the `network_tags`:
   * * Use a field query. Example: `networkTags:internal`
   * * Use a free text query. Example: `internal`
   * </pre>
   *
   * <code>repeated string network_tags = 8;</code>
   *
   * @param index The index of the element to return.
   * @return The networkTags at the given index.
   */
  public java.lang.String getNetworkTags(int index) {
    return networkTags_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Network tags associated with this resource. Like labels, network tags are a
   * type of annotations used to group Google Cloud resources. See [Labelling
   * Google Cloud
   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
   * for more information. This field is available only when the resource's
   * Protobuf contains it.
   * To search against the `network_tags`:
   * * Use a field query. Example: `networkTags:internal`
   * * Use a free text query. Example: `internal`
   * </pre>
   *
   * <code>repeated string network_tags = 8;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the networkTags at the given index.
   */
  public com.google.protobuf.ByteString getNetworkTagsBytes(int index) {
    return networkTags_.getByteString(index);
  }

  public static final int KMS_KEY_FIELD_NUMBER = 10;

  @SuppressWarnings("serial")
  private volatile java.lang.Object kmsKey_ = "";
  /**
   *
   *
   * <pre>
   * The Cloud KMS
   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
   * name or
   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
   * name.
   * This field only presents for the purpose of backward compatibility. Please
   * use the `kms_keys` field to retrieve Cloud KMS key information. This field
   * is available only when the resource's Protobuf contains it and will only be
   * populated for [these resource
   * types](https://cloud.google.com/asset-inventory/docs/legacy-field-names#resource_types_with_the_to_be_deprecated_kmskey_field)
   * for backward compatible purposes.
   * To search against the `kms_key`:
   * * Use a field query. Example: `kmsKey:key`
   * * Use a free text query. Example: `key`
   * </pre>
   *
   * <code>string kms_key = 10 [deprecated = true];</code>
   *
   * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See
   *     google/cloud/asset/v1/assets.proto;l=437
   * @return The kmsKey.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public java.lang.String getKmsKey() {
    java.lang.Object ref = kmsKey_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      kmsKey_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The Cloud KMS
   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
   * name or
   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
   * name.
   * This field only presents for the purpose of backward compatibility. Please
   * use the `kms_keys` field to retrieve Cloud KMS key information. This field
   * is available only when the resource's Protobuf contains it and will only be
   * populated for [these resource
   * types](https://cloud.google.com/asset-inventory/docs/legacy-field-names#resource_types_with_the_to_be_deprecated_kmskey_field)
   * for backward compatible purposes.
   * To search against the `kms_key`:
   * * Use a field query. Example: `kmsKey:key`
   * * Use a free text query. Example: `key`
   * </pre>
   *
   * <code>string kms_key = 10 [deprecated = true];</code>
   *
   * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See
   *     google/cloud/asset/v1/assets.proto;l=437
   * @return The bytes for kmsKey.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public com.google.protobuf.ByteString getKmsKeyBytes() {
    java.lang.Object ref = kmsKey_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      kmsKey_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int KMS_KEYS_FIELD_NUMBER = 28;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList kmsKeys_;
  /**
   *
   *
   * <pre>
   * The Cloud KMS
   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
   * names or
   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
   * names. This field is available only when the resource's Protobuf contains
   * it.
   * To search against the `kms_keys`:
   * * Use a field query. Example: `kmsKeys:key`
   * * Use a free text query. Example: `key`
   * </pre>
   *
   * <code>repeated string kms_keys = 28;</code>
   *
   * @return A list containing the kmsKeys.
   */
  public com.google.protobuf.ProtocolStringList getKmsKeysList() {
    return kmsKeys_;
  }
  /**
   *
   *
   * <pre>
   * The Cloud KMS
   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
   * names or
   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
   * names. This field is available only when the resource's Protobuf contains
   * it.
   * To search against the `kms_keys`:
   * * Use a field query. Example: `kmsKeys:key`
   * * Use a free text query. Example: `key`
   * </pre>
   *
   * <code>repeated string kms_keys = 28;</code>
   *
   * @return The count of kmsKeys.
   */
  public int getKmsKeysCount() {
    return kmsKeys_.size();
  }
  /**
   *
   *
   * <pre>
   * The Cloud KMS
   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
   * names or
   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
   * names. This field is available only when the resource's Protobuf contains
   * it.
   * To search against the `kms_keys`:
   * * Use a field query. Example: `kmsKeys:key`
   * * Use a free text query. Example: `key`
   * </pre>
   *
   * <code>repeated string kms_keys = 28;</code>
   *
   * @param index The index of the element to return.
   * @return The kmsKeys at the given index.
   */
  public java.lang.String getKmsKeys(int index) {
    return kmsKeys_.get(index);
  }
  /**
   *
   *
   * <pre>
   * The Cloud KMS
   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
   * names or
   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
   * names. This field is available only when the resource's Protobuf contains
   * it.
   * To search against the `kms_keys`:
   * * Use a field query. Example: `kmsKeys:key`
   * * Use a free text query. Example: `key`
   * </pre>
   *
   * <code>repeated string kms_keys = 28;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the kmsKeys at the given index.
   */
  public com.google.protobuf.ByteString getKmsKeysBytes(int index) {
    return kmsKeys_.getByteString(index);
  }

  public static final int CREATE_TIME_FIELD_NUMBER = 11;
  private com.google.protobuf.Timestamp createTime_;
  /**
   *
   *
   * <pre>
   * The create timestamp of this resource, at which the resource was created.
   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
   * is available only when the resource's Protobuf contains it.
   * To search against `create_time`:
   * * Use a field query.
   *     - value in seconds since unix epoch. Example: `createTime &gt; 1609459200`
   *     - value in date string. Example: `createTime &gt; 2021-01-01`
   *     - value in date-time string (must be quoted). Example: `createTime &gt;
   *     "2021-01-01T00:00:00"`
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 11;</code>
   *
   * @return Whether the createTime field is set.
   */
  @java.lang.Override
  public boolean hasCreateTime() {
    return createTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * The create timestamp of this resource, at which the resource was created.
   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
   * is available only when the resource's Protobuf contains it.
   * To search against `create_time`:
   * * Use a field query.
   *     - value in seconds since unix epoch. Example: `createTime &gt; 1609459200`
   *     - value in date string. Example: `createTime &gt; 2021-01-01`
   *     - value in date-time string (must be quoted). Example: `createTime &gt;
   *     "2021-01-01T00:00:00"`
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 11;</code>
   *
   * @return The createTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getCreateTime() {
    return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
  }
  /**
   *
   *
   * <pre>
   * The create timestamp of this resource, at which the resource was created.
   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
   * is available only when the resource's Protobuf contains it.
   * To search against `create_time`:
   * * Use a field query.
   *     - value in seconds since unix epoch. Example: `createTime &gt; 1609459200`
   *     - value in date string. Example: `createTime &gt; 2021-01-01`
   *     - value in date-time string (must be quoted). Example: `createTime &gt;
   *     "2021-01-01T00:00:00"`
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 11;</code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
    return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
  }

  public static final int UPDATE_TIME_FIELD_NUMBER = 12;
  private com.google.protobuf.Timestamp updateTime_;
  /**
   *
   *
   * <pre>
   * The last update timestamp of this resource, at which the resource was last
   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
   * always be 0. This field is available only when the resource's Protobuf
   * contains it.
   * To search against `update_time`:
   * * Use a field query.
   *     - value in seconds since unix epoch. Example: `updateTime &lt; 1609459200`
   *     - value in date string. Example: `updateTime &lt; 2021-01-01`
   *     - value in date-time string (must be quoted). Example: `updateTime &lt;
   *     "2021-01-01T00:00:00"`
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 12;</code>
   *
   * @return Whether the updateTime field is set.
   */
  @java.lang.Override
  public boolean hasUpdateTime() {
    return updateTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * The last update timestamp of this resource, at which the resource was last
   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
   * always be 0. This field is available only when the resource's Protobuf
   * contains it.
   * To search against `update_time`:
   * * Use a field query.
   *     - value in seconds since unix epoch. Example: `updateTime &lt; 1609459200`
   *     - value in date string. Example: `updateTime &lt; 2021-01-01`
   *     - value in date-time string (must be quoted). Example: `updateTime &lt;
   *     "2021-01-01T00:00:00"`
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 12;</code>
   *
   * @return The updateTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getUpdateTime() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }
  /**
   *
   *
   * <pre>
   * The last update timestamp of this resource, at which the resource was last
   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
   * always be 0. This field is available only when the resource's Protobuf
   * contains it.
   * To search against `update_time`:
   * * Use a field query.
   *     - value in seconds since unix epoch. Example: `updateTime &lt; 1609459200`
   *     - value in date string. Example: `updateTime &lt; 2021-01-01`
   *     - value in date-time string (must be quoted). Example: `updateTime &lt;
   *     "2021-01-01T00:00:00"`
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 12;</code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }

  public static final int STATE_FIELD_NUMBER = 13;

  @SuppressWarnings("serial")
  private volatile java.lang.Object state_ = "";
  /**
   *
   *
   * <pre>
   * The state of this resource. Different resources types have different state
   * definitions that are mapped from various fields of different resource
   * types. This field is available only when the resource's Protobuf contains
   * it.
   * Example:
   * If the resource is an instance provided by Compute Engine,
   * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
   * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
   * in [API
   * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
   * If the resource is a project provided by Resource Manager, its state
   * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
   * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
   * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
   * To search against the `state`:
   * * Use a field query. Example: `state:RUNNING`
   * * Use a free text query. Example: `RUNNING`
   * </pre>
   *
   * <code>string state = 13;</code>
   *
   * @return The state.
   */
  @java.lang.Override
  public java.lang.String getState() {
    java.lang.Object ref = state_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      state_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The state of this resource. Different resources types have different state
   * definitions that are mapped from various fields of different resource
   * types. This field is available only when the resource's Protobuf contains
   * it.
   * Example:
   * If the resource is an instance provided by Compute Engine,
   * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
   * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
   * in [API
   * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
   * If the resource is a project provided by Resource Manager, its state
   * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
   * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
   * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
   * To search against the `state`:
   * * Use a field query. Example: `state:RUNNING`
   * * Use a free text query. Example: `RUNNING`
   * </pre>
   *
   * <code>string state = 13;</code>
   *
   * @return The bytes for state.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getStateBytes() {
    java.lang.Object ref = state_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      state_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ADDITIONAL_ATTRIBUTES_FIELD_NUMBER = 9;
  private com.google.protobuf.Struct additionalAttributes_;
  /**
   *
   *
   * <pre>
   * The additional searchable attributes of this resource. The attributes may
   * vary from one resource type to another. Examples: `projectId` for Project,
   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
   * metadata fields that are returned by the List or Get APIs provided by the
   * corresponding Google Cloud service (e.g., Compute Engine). see [API
   * references and supported searchable
   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
   * to see which fields are included.
   * You can search values of these fields through free text search. However,
   * you should not consume the field programically as the field names and
   * values may change as the Google Cloud service updates to a new incompatible
   * API version.
   * To search against the `additional_attributes`:
   * * Use a free text query to match the attributes values. Example: to search
   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
   *   `foobar`.
   * </pre>
   *
   * <code>.google.protobuf.Struct additional_attributes = 9;</code>
   *
   * @return Whether the additionalAttributes field is set.
   */
  @java.lang.Override
  public boolean hasAdditionalAttributes() {
    return additionalAttributes_ != null;
  }
  /**
   *
   *
   * <pre>
   * The additional searchable attributes of this resource. The attributes may
   * vary from one resource type to another. Examples: `projectId` for Project,
   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
   * metadata fields that are returned by the List or Get APIs provided by the
   * corresponding Google Cloud service (e.g., Compute Engine). see [API
   * references and supported searchable
   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
   * to see which fields are included.
   * You can search values of these fields through free text search. However,
   * you should not consume the field programically as the field names and
   * values may change as the Google Cloud service updates to a new incompatible
   * API version.
   * To search against the `additional_attributes`:
   * * Use a free text query to match the attributes values. Example: to search
   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
   *   `foobar`.
   * </pre>
   *
   * <code>.google.protobuf.Struct additional_attributes = 9;</code>
   *
   * @return The additionalAttributes.
   */
  @java.lang.Override
  public com.google.protobuf.Struct getAdditionalAttributes() {
    return additionalAttributes_ == null
        ? com.google.protobuf.Struct.getDefaultInstance()
        : additionalAttributes_;
  }
  /**
   *
   *
   * <pre>
   * The additional searchable attributes of this resource. The attributes may
   * vary from one resource type to another. Examples: `projectId` for Project,
   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
   * metadata fields that are returned by the List or Get APIs provided by the
   * corresponding Google Cloud service (e.g., Compute Engine). see [API
   * references and supported searchable
   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
   * to see which fields are included.
   * You can search values of these fields through free text search. However,
   * you should not consume the field programically as the field names and
   * values may change as the Google Cloud service updates to a new incompatible
   * API version.
   * To search against the `additional_attributes`:
   * * Use a free text query to match the attributes values. Example: to search
   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
   *   `foobar`.
   * </pre>
   *
   * <code>.google.protobuf.Struct additional_attributes = 9;</code>
   */
  @java.lang.Override
  public com.google.protobuf.StructOrBuilder getAdditionalAttributesOrBuilder() {
    return additionalAttributes_ == null
        ? com.google.protobuf.Struct.getDefaultInstance()
        : additionalAttributes_;
  }

  public static final int PARENT_FULL_RESOURCE_NAME_FIELD_NUMBER = 19;

  @SuppressWarnings("serial")
  private volatile java.lang.Object parentFullResourceName_ = "";
  /**
   *
   *
   * <pre>
   * The full resource name of this resource's parent, if it has one.
   * To search against the `parent_full_resource_name`:
   * * Use a field query. Example:
   * `parentFullResourceName:"project-name"`
   * * Use a free text query. Example:
   * `project-name`
   * </pre>
   *
   * <code>string parent_full_resource_name = 19;</code>
   *
   * @return The parentFullResourceName.
   */
  @java.lang.Override
  public java.lang.String getParentFullResourceName() {
    java.lang.Object ref = parentFullResourceName_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      parentFullResourceName_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The full resource name of this resource's parent, if it has one.
   * To search against the `parent_full_resource_name`:
   * * Use a field query. Example:
   * `parentFullResourceName:"project-name"`
   * * Use a free text query. Example:
   * `project-name`
   * </pre>
   *
   * <code>string parent_full_resource_name = 19;</code>
   *
   * @return The bytes for parentFullResourceName.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getParentFullResourceNameBytes() {
    java.lang.Object ref = parentFullResourceName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      parentFullResourceName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int VERSIONED_RESOURCES_FIELD_NUMBER = 16;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.asset.v1.VersionedResource> versionedResources_;
  /**
   *
   *
   * <pre>
   * Versioned resource representations of this resource. This is repeated
   * because there could be multiple versions of resource representations during
   * version migration.
   * This `versioned_resources` field is not searchable. Some attributes of the
   * resource representations are exposed in `additional_attributes` field, so
   * as to allow users to search on them.
   * </pre>
   *
   * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.asset.v1.VersionedResource> getVersionedResourcesList() {
    return versionedResources_;
  }
  /**
   *
   *
   * <pre>
   * Versioned resource representations of this resource. This is repeated
   * because there could be multiple versions of resource representations during
   * version migration.
   * This `versioned_resources` field is not searchable. Some attributes of the
   * resource representations are exposed in `additional_attributes` field, so
   * as to allow users to search on them.
   * </pre>
   *
   * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.cloud.asset.v1.VersionedResourceOrBuilder>
      getVersionedResourcesOrBuilderList() {
    return versionedResources_;
  }
  /**
   *
   *
   * <pre>
   * Versioned resource representations of this resource. This is repeated
   * because there could be multiple versions of resource representations during
   * version migration.
   * This `versioned_resources` field is not searchable. Some attributes of the
   * resource representations are exposed in `additional_attributes` field, so
   * as to allow users to search on them.
   * </pre>
   *
   * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
   */
  @java.lang.Override
  public int getVersionedResourcesCount() {
    return versionedResources_.size();
  }
  /**
   *
   *
   * <pre>
   * Versioned resource representations of this resource. This is repeated
   * because there could be multiple versions of resource representations during
   * version migration.
   * This `versioned_resources` field is not searchable. Some attributes of the
   * resource representations are exposed in `additional_attributes` field, so
   * as to allow users to search on them.
   * </pre>
   *
   * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.VersionedResource getVersionedResources(int index) {
    return versionedResources_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Versioned resource representations of this resource. This is repeated
   * because there could be multiple versions of resource representations during
   * version migration.
   * This `versioned_resources` field is not searchable. Some attributes of the
   * resource representations are exposed in `additional_attributes` field, so
   * as to allow users to search on them.
   * </pre>
   *
   * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.VersionedResourceOrBuilder getVersionedResourcesOrBuilder(
      int index) {
    return versionedResources_.get(index);
  }

  public static final int ATTACHED_RESOURCES_FIELD_NUMBER = 20;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.asset.v1.AttachedResource> attachedResources_;
  /**
   *
   *
   * <pre>
   * Attached resources of this resource. For example, an OSConfig
   * Inventory is an attached resource of a Compute Instance. This field is
   * repeated because a resource could have multiple attached resources.
   * This `attached_resources` field is not searchable. Some attributes
   * of the attached resources are exposed in `additional_attributes` field, so
   * as to allow users to search on them.
   * </pre>
   *
   * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.asset.v1.AttachedResource> getAttachedResourcesList() {
    return attachedResources_;
  }
  /**
   *
   *
   * <pre>
   * Attached resources of this resource. For example, an OSConfig
   * Inventory is an attached resource of a Compute Instance. This field is
   * repeated because a resource could have multiple attached resources.
   * This `attached_resources` field is not searchable. Some attributes
   * of the attached resources are exposed in `additional_attributes` field, so
   * as to allow users to search on them.
   * </pre>
   *
   * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.cloud.asset.v1.AttachedResourceOrBuilder>
      getAttachedResourcesOrBuilderList() {
    return attachedResources_;
  }
  /**
   *
   *
   * <pre>
   * Attached resources of this resource. For example, an OSConfig
   * Inventory is an attached resource of a Compute Instance. This field is
   * repeated because a resource could have multiple attached resources.
   * This `attached_resources` field is not searchable. Some attributes
   * of the attached resources are exposed in `additional_attributes` field, so
   * as to allow users to search on them.
   * </pre>
   *
   * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
   */
  @java.lang.Override
  public int getAttachedResourcesCount() {
    return attachedResources_.size();
  }
  /**
   *
   *
   * <pre>
   * Attached resources of this resource. For example, an OSConfig
   * Inventory is an attached resource of a Compute Instance. This field is
   * repeated because a resource could have multiple attached resources.
   * This `attached_resources` field is not searchable. Some attributes
   * of the attached resources are exposed in `additional_attributes` field, so
   * as to allow users to search on them.
   * </pre>
   *
   * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.AttachedResource getAttachedResources(int index) {
    return attachedResources_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Attached resources of this resource. For example, an OSConfig
   * Inventory is an attached resource of a Compute Instance. This field is
   * repeated because a resource could have multiple attached resources.
   * This `attached_resources` field is not searchable. Some attributes
   * of the attached resources are exposed in `additional_attributes` field, so
   * as to allow users to search on them.
   * </pre>
   *
   * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.AttachedResourceOrBuilder getAttachedResourcesOrBuilder(
      int index) {
    return attachedResources_.get(index);
  }

  public static final int RELATIONSHIPS_FIELD_NUMBER = 21;

  private static final class RelationshipsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
            java.lang.String, com.google.cloud.asset.v1.RelatedResources>
        defaultEntry =
            com.google.protobuf.MapEntry
                .<java.lang.String, com.google.cloud.asset.v1.RelatedResources>newDefaultInstance(
                    com.google.cloud.asset.v1.AssetProto
                        .internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_descriptor,
                    com.google.protobuf.WireFormat.FieldType.STRING,
                    "",
                    com.google.protobuf.WireFormat.FieldType.MESSAGE,
                    com.google.cloud.asset.v1.RelatedResources.getDefaultInstance());
  }

  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<java.lang.String, com.google.cloud.asset.v1.RelatedResources>
      relationships_;

  private com.google.protobuf.MapField<java.lang.String, com.google.cloud.asset.v1.RelatedResources>
      internalGetRelationships() {
    if (relationships_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          RelationshipsDefaultEntryHolder.defaultEntry);
    }
    return relationships_;
  }

  public int getRelationshipsCount() {
    return internalGetRelationships().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * A map of related resources of this resource, keyed by the
   * relationship type. A relationship type is in the format of
   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
   * See [supported relationship
   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
   * </pre>
   *
   * <code>map&lt;string, .google.cloud.asset.v1.RelatedResources&gt; relationships = 21;</code>
   */
  @java.lang.Override
  public boolean containsRelationships(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetRelationships().getMap().containsKey(key);
  }
  /** Use {@link #getRelationshipsMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, com.google.cloud.asset.v1.RelatedResources>
      getRelationships() {
    return getRelationshipsMap();
  }
  /**
   *
   *
   * <pre>
   * A map of related resources of this resource, keyed by the
   * relationship type. A relationship type is in the format of
   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
   * See [supported relationship
   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
   * </pre>
   *
   * <code>map&lt;string, .google.cloud.asset.v1.RelatedResources&gt; relationships = 21;</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, com.google.cloud.asset.v1.RelatedResources>
      getRelationshipsMap() {
    return internalGetRelationships().getMap();
  }
  /**
   *
   *
   * <pre>
   * A map of related resources of this resource, keyed by the
   * relationship type. A relationship type is in the format of
   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
   * See [supported relationship
   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
   * </pre>
   *
   * <code>map&lt;string, .google.cloud.asset.v1.RelatedResources&gt; relationships = 21;</code>
   */
  @java.lang.Override
  public /* nullable */ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault(
      java.lang.String key,
      /* nullable */
      com.google.cloud.asset.v1.RelatedResources defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, com.google.cloud.asset.v1.RelatedResources> map =
        internalGetRelationships().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * A map of related resources of this resource, keyed by the
   * relationship type. A relationship type is in the format of
   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
   * See [supported relationship
   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
   * </pre>
   *
   * <code>map&lt;string, .google.cloud.asset.v1.RelatedResources&gt; relationships = 21;</code>
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.RelatedResources getRelationshipsOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, com.google.cloud.asset.v1.RelatedResources> map =
        internalGetRelationships().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int TAG_KEYS_FIELD_NUMBER = 23;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList tagKeys_;
  /**
   *
   *
   * <pre>
   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
   * To search against the `tagKeys`:
   * * Use a field query. Example:
   *     - `tagKeys:"123456789/env*"`
   *     - `tagKeys="123456789/env"`
   *     - `tagKeys:"env"`
   * * Use a free text query. Example:
   *     - `env`
   * </pre>
   *
   * <code>repeated string tag_keys = 23;</code>
   *
   * @return A list containing the tagKeys.
   */
  public com.google.protobuf.ProtocolStringList getTagKeysList() {
    return tagKeys_;
  }
  /**
   *
   *
   * <pre>
   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
   * To search against the `tagKeys`:
   * * Use a field query. Example:
   *     - `tagKeys:"123456789/env*"`
   *     - `tagKeys="123456789/env"`
   *     - `tagKeys:"env"`
   * * Use a free text query. Example:
   *     - `env`
   * </pre>
   *
   * <code>repeated string tag_keys = 23;</code>
   *
   * @return The count of tagKeys.
   */
  public int getTagKeysCount() {
    return tagKeys_.size();
  }
  /**
   *
   *
   * <pre>
   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
   * To search against the `tagKeys`:
   * * Use a field query. Example:
   *     - `tagKeys:"123456789/env*"`
   *     - `tagKeys="123456789/env"`
   *     - `tagKeys:"env"`
   * * Use a free text query. Example:
   *     - `env`
   * </pre>
   *
   * <code>repeated string tag_keys = 23;</code>
   *
   * @param index The index of the element to return.
   * @return The tagKeys at the given index.
   */
  public java.lang.String getTagKeys(int index) {
    return tagKeys_.get(index);
  }
  /**
   *
   *
   * <pre>
   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
   * To search against the `tagKeys`:
   * * Use a field query. Example:
   *     - `tagKeys:"123456789/env*"`
   *     - `tagKeys="123456789/env"`
   *     - `tagKeys:"env"`
   * * Use a free text query. Example:
   *     - `env`
   * </pre>
   *
   * <code>repeated string tag_keys = 23;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the tagKeys at the given index.
   */
  public com.google.protobuf.ByteString getTagKeysBytes(int index) {
    return tagKeys_.getByteString(index);
  }

  public static final int TAG_VALUES_FIELD_NUMBER = 25;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList tagValues_;
  /**
   *
   *
   * <pre>
   * TagValue namespaced names, in the format of
   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
   * To search against the `tagValues`:
   * * Use a field query. Example:
   *     - `tagValues:"env"`
   *     - `tagValues:"env/prod"`
   *     - `tagValues:"123456789/env/prod*"`
   *     - `tagValues="123456789/env/prod"`
   * * Use a free text query. Example:
   *     - `prod`
   * </pre>
   *
   * <code>repeated string tag_values = 25;</code>
   *
   * @return A list containing the tagValues.
   */
  public com.google.protobuf.ProtocolStringList getTagValuesList() {
    return tagValues_;
  }
  /**
   *
   *
   * <pre>
   * TagValue namespaced names, in the format of
   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
   * To search against the `tagValues`:
   * * Use a field query. Example:
   *     - `tagValues:"env"`
   *     - `tagValues:"env/prod"`
   *     - `tagValues:"123456789/env/prod*"`
   *     - `tagValues="123456789/env/prod"`
   * * Use a free text query. Example:
   *     - `prod`
   * </pre>
   *
   * <code>repeated string tag_values = 25;</code>
   *
   * @return The count of tagValues.
   */
  public int getTagValuesCount() {
    return tagValues_.size();
  }
  /**
   *
   *
   * <pre>
   * TagValue namespaced names, in the format of
   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
   * To search against the `tagValues`:
   * * Use a field query. Example:
   *     - `tagValues:"env"`
   *     - `tagValues:"env/prod"`
   *     - `tagValues:"123456789/env/prod*"`
   *     - `tagValues="123456789/env/prod"`
   * * Use a free text query. Example:
   *     - `prod`
   * </pre>
   *
   * <code>repeated string tag_values = 25;</code>
   *
   * @param index The index of the element to return.
   * @return The tagValues at the given index.
   */
  public java.lang.String getTagValues(int index) {
    return tagValues_.get(index);
  }
  /**
   *
   *
   * <pre>
   * TagValue namespaced names, in the format of
   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
   * To search against the `tagValues`:
   * * Use a field query. Example:
   *     - `tagValues:"env"`
   *     - `tagValues:"env/prod"`
   *     - `tagValues:"123456789/env/prod*"`
   *     - `tagValues="123456789/env/prod"`
   * * Use a free text query. Example:
   *     - `prod`
   * </pre>
   *
   * <code>repeated string tag_values = 25;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the tagValues at the given index.
   */
  public com.google.protobuf.ByteString getTagValuesBytes(int index) {
    return tagValues_.getByteString(index);
  }

  public static final int TAG_VALUE_IDS_FIELD_NUMBER = 26;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList tagValueIds_;
  /**
   *
   *
   * <pre>
   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
   * To search against the `tagValueIds`:
   * * Use a field query. Example:
   *     - `tagValueIds:"456"`
   *     - `tagValueIds="tagValues/456"`
   * * Use a free text query. Example:
   *     - `456`
   * </pre>
   *
   * <code>repeated string tag_value_ids = 26;</code>
   *
   * @return A list containing the tagValueIds.
   */
  public com.google.protobuf.ProtocolStringList getTagValueIdsList() {
    return tagValueIds_;
  }
  /**
   *
   *
   * <pre>
   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
   * To search against the `tagValueIds`:
   * * Use a field query. Example:
   *     - `tagValueIds:"456"`
   *     - `tagValueIds="tagValues/456"`
   * * Use a free text query. Example:
   *     - `456`
   * </pre>
   *
   * <code>repeated string tag_value_ids = 26;</code>
   *
   * @return The count of tagValueIds.
   */
  public int getTagValueIdsCount() {
    return tagValueIds_.size();
  }
  /**
   *
   *
   * <pre>
   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
   * To search against the `tagValueIds`:
   * * Use a field query. Example:
   *     - `tagValueIds:"456"`
   *     - `tagValueIds="tagValues/456"`
   * * Use a free text query. Example:
   *     - `456`
   * </pre>
   *
   * <code>repeated string tag_value_ids = 26;</code>
   *
   * @param index The index of the element to return.
   * @return The tagValueIds at the given index.
   */
  public java.lang.String getTagValueIds(int index) {
    return tagValueIds_.get(index);
  }
  /**
   *
   *
   * <pre>
   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
   * To search against the `tagValueIds`:
   * * Use a field query. Example:
   *     - `tagValueIds:"456"`
   *     - `tagValueIds="tagValues/456"`
   * * Use a free text query. Example:
   *     - `456`
   * </pre>
   *
   * <code>repeated string tag_value_ids = 26;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the tagValueIds at the given index.
   */
  public com.google.protobuf.ByteString getTagValueIdsBytes(int index) {
    return tagValueIds_.getByteString(index);
  }

  public static final int PARENT_ASSET_TYPE_FIELD_NUMBER = 103;

  @SuppressWarnings("serial")
  private volatile java.lang.Object parentAssetType_ = "";
  /**
   *
   *
   * <pre>
   * The type of this resource's immediate parent, if there is one.
   * To search against the `parent_asset_type`:
   * * Use a field query. Example:
   * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
   * * Use a free text query. Example:
   * `cloudresourcemanager.googleapis.com/Project`
   * </pre>
   *
   * <code>string parent_asset_type = 103;</code>
   *
   * @return The parentAssetType.
   */
  @java.lang.Override
  public java.lang.String getParentAssetType() {
    java.lang.Object ref = parentAssetType_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      parentAssetType_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The type of this resource's immediate parent, if there is one.
   * To search against the `parent_asset_type`:
   * * Use a field query. Example:
   * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
   * * Use a free text query. Example:
   * `cloudresourcemanager.googleapis.com/Project`
   * </pre>
   *
   * <code>string parent_asset_type = 103;</code>
   *
   * @return The bytes for parentAssetType.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getParentAssetTypeBytes() {
    java.lang.Object ref = parentAssetType_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      parentAssetType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, project_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, location_);
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7);
    for (int i = 0; i < networkTags_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, networkTags_.getRaw(i));
    }
    if (additionalAttributes_ != null) {
      output.writeMessage(9, getAdditionalAttributes());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, kmsKey_);
    }
    if (createTime_ != null) {
      output.writeMessage(11, getCreateTime());
    }
    if (updateTime_ != null) {
      output.writeMessage(12, getUpdateTime());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 13, state_);
    }
    for (int i = 0; i < versionedResources_.size(); i++) {
      output.writeMessage(16, versionedResources_.get(i));
    }
    for (int i = 0; i < folders_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 17, folders_.getRaw(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 18, organization_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentFullResourceName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 19, parentFullResourceName_);
    }
    for (int i = 0; i < attachedResources_.size(); i++) {
      output.writeMessage(20, attachedResources_.get(i));
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetRelationships(), RelationshipsDefaultEntryHolder.defaultEntry, 21);
    for (int i = 0; i < tagKeys_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 23, tagKeys_.getRaw(i));
    }
    for (int i = 0; i < tagValues_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 25, tagValues_.getRaw(i));
    }
    for (int i = 0; i < tagValueIds_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 26, tagValueIds_.getRaw(i));
    }
    for (int i = 0; i < kmsKeys_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 28, kmsKeys_.getRaw(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentAssetType_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 103, parentAssetType_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, project_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, location_);
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetLabels().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
          LabelsDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, labels__);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < networkTags_.size(); i++) {
        dataSize += computeStringSizeNoTag(networkTags_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getNetworkTagsList().size();
    }
    if (additionalAttributes_ != null) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(9, getAdditionalAttributes());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, kmsKey_);
    }
    if (createTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getCreateTime());
    }
    if (updateTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getUpdateTime());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, state_);
    }
    for (int i = 0; i < versionedResources_.size(); i++) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(16, versionedResources_.get(i));
    }
    {
      int dataSize = 0;
      for (int i = 0; i < folders_.size(); i++) {
        dataSize += computeStringSizeNoTag(folders_.getRaw(i));
      }
      size += dataSize;
      size += 2 * getFoldersList().size();
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, organization_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentFullResourceName_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, parentFullResourceName_);
    }
    for (int i = 0; i < attachedResources_.size(); i++) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(20, attachedResources_.get(i));
    }
    for (java.util.Map.Entry<java.lang.String, com.google.cloud.asset.v1.RelatedResources> entry :
        internalGetRelationships().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, com.google.cloud.asset.v1.RelatedResources>
          relationships__ =
              RelationshipsDefaultEntryHolder.defaultEntry
                  .newBuilderForType()
                  .setKey(entry.getKey())
                  .setValue(entry.getValue())
                  .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, relationships__);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < tagKeys_.size(); i++) {
        dataSize += computeStringSizeNoTag(tagKeys_.getRaw(i));
      }
      size += dataSize;
      size += 2 * getTagKeysList().size();
    }
    {
      int dataSize = 0;
      for (int i = 0; i < tagValues_.size(); i++) {
        dataSize += computeStringSizeNoTag(tagValues_.getRaw(i));
      }
      size += dataSize;
      size += 2 * getTagValuesList().size();
    }
    {
      int dataSize = 0;
      for (int i = 0; i < tagValueIds_.size(); i++) {
        dataSize += computeStringSizeNoTag(tagValueIds_.getRaw(i));
      }
      size += dataSize;
      size += 2 * getTagValueIdsList().size();
    }
    {
      int dataSize = 0;
      for (int i = 0; i < kmsKeys_.size(); i++) {
        dataSize += computeStringSizeNoTag(kmsKeys_.getRaw(i));
      }
      size += dataSize;
      size += 2 * getKmsKeysList().size();
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentAssetType_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(103, parentAssetType_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.cloud.asset.v1.ResourceSearchResult)) {
      return super.equals(obj);
    }
    com.google.cloud.asset.v1.ResourceSearchResult other =
        (com.google.cloud.asset.v1.ResourceSearchResult) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getAssetType().equals(other.getAssetType())) return false;
    if (!getProject().equals(other.getProject())) return false;
    if (!getFoldersList().equals(other.getFoldersList())) return false;
    if (!getOrganization().equals(other.getOrganization())) return false;
    if (!getDisplayName().equals(other.getDisplayName())) return false;
    if (!getDescription().equals(other.getDescription())) return false;
    if (!getLocation().equals(other.getLocation())) return false;
    if (!internalGetLabels().equals(other.internalGetLabels())) return false;
    if (!getNetworkTagsList().equals(other.getNetworkTagsList())) return false;
    if (!getKmsKey().equals(other.getKmsKey())) return false;
    if (!getKmsKeysList().equals(other.getKmsKeysList())) return false;
    if (hasCreateTime() != other.hasCreateTime()) return false;
    if (hasCreateTime()) {
      if (!getCreateTime().equals(other.getCreateTime())) return false;
    }
    if (hasUpdateTime() != other.hasUpdateTime()) return false;
    if (hasUpdateTime()) {
      if (!getUpdateTime().equals(other.getUpdateTime())) return false;
    }
    if (!getState().equals(other.getState())) return false;
    if (hasAdditionalAttributes() != other.hasAdditionalAttributes()) return false;
    if (hasAdditionalAttributes()) {
      if (!getAdditionalAttributes().equals(other.getAdditionalAttributes())) return false;
    }
    if (!getParentFullResourceName().equals(other.getParentFullResourceName())) return false;
    if (!getVersionedResourcesList().equals(other.getVersionedResourcesList())) return false;
    if (!getAttachedResourcesList().equals(other.getAttachedResourcesList())) return false;
    if (!internalGetRelationships().equals(other.internalGetRelationships())) return false;
    if (!getTagKeysList().equals(other.getTagKeysList())) return false;
    if (!getTagValuesList().equals(other.getTagValuesList())) return false;
    if (!getTagValueIdsList().equals(other.getTagValueIdsList())) return false;
    if (!getParentAssetType().equals(other.getParentAssetType())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getAssetType().hashCode();
    hash = (37 * hash) + PROJECT_FIELD_NUMBER;
    hash = (53 * hash) + getProject().hashCode();
    if (getFoldersCount() > 0) {
      hash = (37 * hash) + FOLDERS_FIELD_NUMBER;
      hash = (53 * hash) + getFoldersList().hashCode();
    }
    hash = (37 * hash) + ORGANIZATION_FIELD_NUMBER;
    hash = (53 * hash) + getOrganization().hashCode();
    hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getDisplayName().hashCode();
    hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
    hash = (53 * hash) + getDescription().hashCode();
    hash = (37 * hash) + LOCATION_FIELD_NUMBER;
    hash = (53 * hash) + getLocation().hashCode();
    if (!internalGetLabels().getMap().isEmpty()) {
      hash = (37 * hash) + LABELS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetLabels().hashCode();
    }
    if (getNetworkTagsCount() > 0) {
      hash = (37 * hash) + NETWORK_TAGS_FIELD_NUMBER;
      hash = (53 * hash) + getNetworkTagsList().hashCode();
    }
    hash = (37 * hash) + KMS_KEY_FIELD_NUMBER;
    hash = (53 * hash) + getKmsKey().hashCode();
    if (getKmsKeysCount() > 0) {
      hash = (37 * hash) + KMS_KEYS_FIELD_NUMBER;
      hash = (53 * hash) + getKmsKeysList().hashCode();
    }
    if (hasCreateTime()) {
      hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getCreateTime().hashCode();
    }
    if (hasUpdateTime()) {
      hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getUpdateTime().hashCode();
    }
    hash = (37 * hash) + STATE_FIELD_NUMBER;
    hash = (53 * hash) + getState().hashCode();
    if (hasAdditionalAttributes()) {
      hash = (37 * hash) + ADDITIONAL_ATTRIBUTES_FIELD_NUMBER;
      hash = (53 * hash) + getAdditionalAttributes().hashCode();
    }
    hash = (37 * hash) + PARENT_FULL_RESOURCE_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getParentFullResourceName().hashCode();
    if (getVersionedResourcesCount() > 0) {
      hash = (37 * hash) + VERSIONED_RESOURCES_FIELD_NUMBER;
      hash = (53 * hash) + getVersionedResourcesList().hashCode();
    }
    if (getAttachedResourcesCount() > 0) {
      hash = (37 * hash) + ATTACHED_RESOURCES_FIELD_NUMBER;
      hash = (53 * hash) + getAttachedResourcesList().hashCode();
    }
    if (!internalGetRelationships().getMap().isEmpty()) {
      hash = (37 * hash) + RELATIONSHIPS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetRelationships().hashCode();
    }
    if (getTagKeysCount() > 0) {
      hash = (37 * hash) + TAG_KEYS_FIELD_NUMBER;
      hash = (53 * hash) + getTagKeysList().hashCode();
    }
    if (getTagValuesCount() > 0) {
      hash = (37 * hash) + TAG_VALUES_FIELD_NUMBER;
      hash = (53 * hash) + getTagValuesList().hashCode();
    }
    if (getTagValueIdsCount() > 0) {
      hash = (37 * hash) + TAG_VALUE_IDS_FIELD_NUMBER;
      hash = (53 * hash) + getTagValueIdsList().hashCode();
    }
    hash = (37 * hash) + PARENT_ASSET_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getParentAssetType().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.asset.v1.ResourceSearchResult parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.asset.v1.ResourceSearchResult parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(com.google.cloud.asset.v1.ResourceSearchResult prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * A result of Resource Search, containing information of a cloud resource.
   * Next ID: 32
   * </pre>
   *
   * Protobuf type {@code google.cloud.asset.v1.ResourceSearchResult}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ResourceSearchResult)
      com.google.cloud.asset.v1.ResourceSearchResultOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.asset.v1.AssetProto
          .internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(int number) {
      switch (number) {
        case 7:
          return internalGetLabels();
        case 21:
          return internalGetRelationships();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
      switch (number) {
        case 7:
          return internalGetMutableLabels();
        case 21:
          return internalGetMutableRelationships();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.asset.v1.AssetProto
          .internal_static_google_cloud_asset_v1_ResourceSearchResult_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.asset.v1.ResourceSearchResult.class,
              com.google.cloud.asset.v1.ResourceSearchResult.Builder.class);
    }

    // Construct using com.google.cloud.asset.v1.ResourceSearchResult.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      name_ = "";
      assetType_ = "";
      project_ = "";
      folders_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000008);
      organization_ = "";
      displayName_ = "";
      description_ = "";
      location_ = "";
      internalGetMutableLabels().clear();
      networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000200);
      kmsKey_ = "";
      kmsKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000800);
      createTime_ = null;
      if (createTimeBuilder_ != null) {
        createTimeBuilder_.dispose();
        createTimeBuilder_ = null;
      }
      updateTime_ = null;
      if (updateTimeBuilder_ != null) {
        updateTimeBuilder_.dispose();
        updateTimeBuilder_ = null;
      }
      state_ = "";
      additionalAttributes_ = null;
      if (additionalAttributesBuilder_ != null) {
        additionalAttributesBuilder_.dispose();
        additionalAttributesBuilder_ = null;
      }
      parentFullResourceName_ = "";
      if (versionedResourcesBuilder_ == null) {
        versionedResources_ = java.util.Collections.emptyList();
      } else {
        versionedResources_ = null;
        versionedResourcesBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00020000);
      if (attachedResourcesBuilder_ == null) {
        attachedResources_ = java.util.Collections.emptyList();
      } else {
        attachedResources_ = null;
        attachedResourcesBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00040000);
      internalGetMutableRelationships().clear();
      tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00100000);
      tagValues_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00200000);
      tagValueIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00400000);
      parentAssetType_ = "";
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.asset.v1.AssetProto
          .internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.asset.v1.ResourceSearchResult getDefaultInstanceForType() {
      return com.google.cloud.asset.v1.ResourceSearchResult.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.asset.v1.ResourceSearchResult build() {
      com.google.cloud.asset.v1.ResourceSearchResult result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.asset.v1.ResourceSearchResult buildPartial() {
      com.google.cloud.asset.v1.ResourceSearchResult result =
          new com.google.cloud.asset.v1.ResourceSearchResult(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(com.google.cloud.asset.v1.ResourceSearchResult result) {
      if (((bitField0_ & 0x00000008) != 0)) {
        folders_ = folders_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000008);
      }
      result.folders_ = folders_;
      if (((bitField0_ & 0x00000200) != 0)) {
        networkTags_ = networkTags_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000200);
      }
      result.networkTags_ = networkTags_;
      if (((bitField0_ & 0x00000800) != 0)) {
        kmsKeys_ = kmsKeys_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000800);
      }
      result.kmsKeys_ = kmsKeys_;
      if (versionedResourcesBuilder_ == null) {
        if (((bitField0_ & 0x00020000) != 0)) {
          versionedResources_ = java.util.Collections.unmodifiableList(versionedResources_);
          bitField0_ = (bitField0_ & ~0x00020000);
        }
        result.versionedResources_ = versionedResources_;
      } else {
        result.versionedResources_ = versionedResourcesBuilder_.build();
      }
      if (attachedResourcesBuilder_ == null) {
        if (((bitField0_ & 0x00040000) != 0)) {
          attachedResources_ = java.util.Collections.unmodifiableList(attachedResources_);
          bitField0_ = (bitField0_ & ~0x00040000);
        }
        result.attachedResources_ = attachedResources_;
      } else {
        result.attachedResources_ = attachedResourcesBuilder_.build();
      }
      if (((bitField0_ & 0x00100000) != 0)) {
        tagKeys_ = tagKeys_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00100000);
      }
      result.tagKeys_ = tagKeys_;
      if (((bitField0_ & 0x00200000) != 0)) {
        tagValues_ = tagValues_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00200000);
      }
      result.tagValues_ = tagValues_;
      if (((bitField0_ & 0x00400000) != 0)) {
        tagValueIds_ = tagValueIds_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00400000);
      }
      result.tagValueIds_ = tagValueIds_;
    }

    private void buildPartial0(com.google.cloud.asset.v1.ResourceSearchResult result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.assetType_ = assetType_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.project_ = project_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.organization_ = organization_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.displayName_ = displayName_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.description_ = description_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.location_ = location_;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.labels_ = internalGetLabels();
        result.labels_.makeImmutable();
      }
      if (((from_bitField0_ & 0x00000400) != 0)) {
        result.kmsKey_ = kmsKey_;
      }
      if (((from_bitField0_ & 0x00001000) != 0)) {
        result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00002000) != 0)) {
        result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00004000) != 0)) {
        result.state_ = state_;
      }
      if (((from_bitField0_ & 0x00008000) != 0)) {
        result.additionalAttributes_ =
            additionalAttributesBuilder_ == null
                ? additionalAttributes_
                : additionalAttributesBuilder_.build();
      }
      if (((from_bitField0_ & 0x00010000) != 0)) {
        result.parentFullResourceName_ = parentFullResourceName_;
      }
      if (((from_bitField0_ & 0x00080000) != 0)) {
        result.relationships_ = internalGetRelationships();
        result.relationships_.makeImmutable();
      }
      if (((from_bitField0_ & 0x00800000) != 0)) {
        result.parentAssetType_ = parentAssetType_;
      }
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.asset.v1.ResourceSearchResult) {
        return mergeFrom((com.google.cloud.asset.v1.ResourceSearchResult) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.asset.v1.ResourceSearchResult other) {
      if (other == com.google.cloud.asset.v1.ResourceSearchResult.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (!other.getAssetType().isEmpty()) {
        assetType_ = other.assetType_;
        bitField0_ |= 0x00000002;
        onChanged();
      }
      if (!other.getProject().isEmpty()) {
        project_ = other.project_;
        bitField0_ |= 0x00000004;
        onChanged();
      }
      if (!other.folders_.isEmpty()) {
        if (folders_.isEmpty()) {
          folders_ = other.folders_;
          bitField0_ = (bitField0_ & ~0x00000008);
        } else {
          ensureFoldersIsMutable();
          folders_.addAll(other.folders_);
        }
        onChanged();
      }
      if (!other.getOrganization().isEmpty()) {
        organization_ = other.organization_;
        bitField0_ |= 0x00000010;
        onChanged();
      }
      if (!other.getDisplayName().isEmpty()) {
        displayName_ = other.displayName_;
        bitField0_ |= 0x00000020;
        onChanged();
      }
      if (!other.getDescription().isEmpty()) {
        description_ = other.description_;
        bitField0_ |= 0x00000040;
        onChanged();
      }
      if (!other.getLocation().isEmpty()) {
        location_ = other.location_;
        bitField0_ |= 0x00000080;
        onChanged();
      }
      internalGetMutableLabels().mergeFrom(other.internalGetLabels());
      bitField0_ |= 0x00000100;
      if (!other.networkTags_.isEmpty()) {
        if (networkTags_.isEmpty()) {
          networkTags_ = other.networkTags_;
          bitField0_ = (bitField0_ & ~0x00000200);
        } else {
          ensureNetworkTagsIsMutable();
          networkTags_.addAll(other.networkTags_);
        }
        onChanged();
      }
      if (!other.getKmsKey().isEmpty()) {
        kmsKey_ = other.kmsKey_;
        bitField0_ |= 0x00000400;
        onChanged();
      }
      if (!other.kmsKeys_.isEmpty()) {
        if (kmsKeys_.isEmpty()) {
          kmsKeys_ = other.kmsKeys_;
          bitField0_ = (bitField0_ & ~0x00000800);
        } else {
          ensureKmsKeysIsMutable();
          kmsKeys_.addAll(other.kmsKeys_);
        }
        onChanged();
      }
      if (other.hasCreateTime()) {
        mergeCreateTime(other.getCreateTime());
      }
      if (other.hasUpdateTime()) {
        mergeUpdateTime(other.getUpdateTime());
      }
      if (!other.getState().isEmpty()) {
        state_ = other.state_;
        bitField0_ |= 0x00004000;
        onChanged();
      }
      if (other.hasAdditionalAttributes()) {
        mergeAdditionalAttributes(other.getAdditionalAttributes());
      }
      if (!other.getParentFullResourceName().isEmpty()) {
        parentFullResourceName_ = other.parentFullResourceName_;
        bitField0_ |= 0x00010000;
        onChanged();
      }
      if (versionedResourcesBuilder_ == null) {
        if (!other.versionedResources_.isEmpty()) {
          if (versionedResources_.isEmpty()) {
            versionedResources_ = other.versionedResources_;
            bitField0_ = (bitField0_ & ~0x00020000);
          } else {
            ensureVersionedResourcesIsMutable();
            versionedResources_.addAll(other.versionedResources_);
          }
          onChanged();
        }
      } else {
        if (!other.versionedResources_.isEmpty()) {
          if (versionedResourcesBuilder_.isEmpty()) {
            versionedResourcesBuilder_.dispose();
            versionedResourcesBuilder_ = null;
            versionedResources_ = other.versionedResources_;
            bitField0_ = (bitField0_ & ~0x00020000);
            versionedResourcesBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getVersionedResourcesFieldBuilder()
                    : null;
          } else {
            versionedResourcesBuilder_.addAllMessages(other.versionedResources_);
          }
        }
      }
      if (attachedResourcesBuilder_ == null) {
        if (!other.attachedResources_.isEmpty()) {
          if (attachedResources_.isEmpty()) {
            attachedResources_ = other.attachedResources_;
            bitField0_ = (bitField0_ & ~0x00040000);
          } else {
            ensureAttachedResourcesIsMutable();
            attachedResources_.addAll(other.attachedResources_);
          }
          onChanged();
        }
      } else {
        if (!other.attachedResources_.isEmpty()) {
          if (attachedResourcesBuilder_.isEmpty()) {
            attachedResourcesBuilder_.dispose();
            attachedResourcesBuilder_ = null;
            attachedResources_ = other.attachedResources_;
            bitField0_ = (bitField0_ & ~0x00040000);
            attachedResourcesBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getAttachedResourcesFieldBuilder()
                    : null;
          } else {
            attachedResourcesBuilder_.addAllMessages(other.attachedResources_);
          }
        }
      }
      internalGetMutableRelationships().mergeFrom(other.internalGetRelationships());
      bitField0_ |= 0x00080000;
      if (!other.tagKeys_.isEmpty()) {
        if (tagKeys_.isEmpty()) {
          tagKeys_ = other.tagKeys_;
          bitField0_ = (bitField0_ & ~0x00100000);
        } else {
          ensureTagKeysIsMutable();
          tagKeys_.addAll(other.tagKeys_);
        }
        onChanged();
      }
      if (!other.tagValues_.isEmpty()) {
        if (tagValues_.isEmpty()) {
          tagValues_ = other.tagValues_;
          bitField0_ = (bitField0_ & ~0x00200000);
        } else {
          ensureTagValuesIsMutable();
          tagValues_.addAll(other.tagValues_);
        }
        onChanged();
      }
      if (!other.tagValueIds_.isEmpty()) {
        if (tagValueIds_.isEmpty()) {
          tagValueIds_ = other.tagValueIds_;
          bitField0_ = (bitField0_ & ~0x00400000);
        } else {
          ensureTagValueIdsIsMutable();
          tagValueIds_.addAll(other.tagValueIds_);
        }
        onChanged();
      }
      if (!other.getParentAssetType().isEmpty()) {
        parentAssetType_ = other.parentAssetType_;
        bitField0_ |= 0x00800000;
        onChanged();
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                name_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 18:
              {
                assetType_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000002;
                break;
              } // case 18
            case 26:
              {
                project_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000004;
                break;
              } // case 26
            case 34:
              {
                displayName_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000020;
                break;
              } // case 34
            case 42:
              {
                description_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000040;
                break;
              } // case 42
            case 50:
              {
                location_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000080;
                break;
              } // case 50
            case 58:
              {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
                    input.readMessage(
                        LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
                        extensionRegistry);
                internalGetMutableLabels()
                    .getMutableMap()
                    .put(labels__.getKey(), labels__.getValue());
                bitField0_ |= 0x00000100;
                break;
              } // case 58
            case 66:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureNetworkTagsIsMutable();
                networkTags_.add(s);
                break;
              } // case 66
            case 74:
              {
                input.readMessage(
                    getAdditionalAttributesFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00008000;
                break;
              } // case 74
            case 82:
              {
                kmsKey_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000400;
                break;
              } // case 82
            case 90:
              {
                input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00001000;
                break;
              } // case 90
            case 98:
              {
                input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00002000;
                break;
              } // case 98
            case 106:
              {
                state_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00004000;
                break;
              } // case 106
            case 130:
              {
                com.google.cloud.asset.v1.VersionedResource m =
                    input.readMessage(
                        com.google.cloud.asset.v1.VersionedResource.parser(), extensionRegistry);
                if (versionedResourcesBuilder_ == null) {
                  ensureVersionedResourcesIsMutable();
                  versionedResources_.add(m);
                } else {
                  versionedResourcesBuilder_.addMessage(m);
                }
                break;
              } // case 130
            case 138:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureFoldersIsMutable();
                folders_.add(s);
                break;
              } // case 138
            case 146:
              {
                organization_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000010;
                break;
              } // case 146
            case 154:
              {
                parentFullResourceName_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00010000;
                break;
              } // case 154
            case 162:
              {
                com.google.cloud.asset.v1.AttachedResource m =
                    input.readMessage(
                        com.google.cloud.asset.v1.AttachedResource.parser(), extensionRegistry);
                if (attachedResourcesBuilder_ == null) {
                  ensureAttachedResourcesIsMutable();
                  attachedResources_.add(m);
                } else {
                  attachedResourcesBuilder_.addMessage(m);
                }
                break;
              } // case 162
            case 170:
              {
                com.google.protobuf.MapEntry<
                        java.lang.String, com.google.cloud.asset.v1.RelatedResources>
                    relationships__ =
                        input.readMessage(
                            RelationshipsDefaultEntryHolder.defaultEntry.getParserForType(),
                            extensionRegistry);
                internalGetMutableRelationships()
                    .getMutableMap()
                    .put(relationships__.getKey(), relationships__.getValue());
                bitField0_ |= 0x00080000;
                break;
              } // case 170
            case 186:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureTagKeysIsMutable();
                tagKeys_.add(s);
                break;
              } // case 186
            case 202:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureTagValuesIsMutable();
                tagValues_.add(s);
                break;
              } // case 202
            case 210:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureTagValueIdsIsMutable();
                tagValueIds_.add(s);
                break;
              } // case 210
            case 226:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureKmsKeysIsMutable();
                kmsKeys_.add(s);
                break;
              } // case 226
            case 826:
              {
                parentAssetType_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00800000;
                break;
              } // case 826
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.lang.Object name_ = "";
    /**
     *
     *
     * <pre>
     * The full resource name of this resource. Example:
     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
     * See [Cloud Asset Inventory Resource Name
     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * for more information.
     * To search against the `name`:
     * * Use a field query. Example: `name:instance1`
     * * Use a free text query. Example: `instance1`
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The full resource name of this resource. Example:
     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
     * See [Cloud Asset Inventory Resource Name
     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * for more information.
     * To search against the `name`:
     * * Use a field query. Example: `name:instance1`
     * * Use a free text query. Example: `instance1`
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The full resource name of this resource. Example:
     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
     * See [Cloud Asset Inventory Resource Name
     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * for more information.
     * To search against the `name`:
     * * Use a field query. Example: `name:instance1`
     * * Use a free text query. Example: `instance1`
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The full resource name of this resource. Example:
     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
     * See [Cloud Asset Inventory Resource Name
     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * for more information.
     * To search against the `name`:
     * * Use a field query. Example: `name:instance1`
     * * Use a free text query. Example: `instance1`
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The full resource name of this resource. Example:
     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
     * See [Cloud Asset Inventory Resource Name
     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * for more information.
     * To search against the `name`:
     * * Use a field query. Example: `name:instance1`
     * * Use a free text query. Example: `instance1`
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private java.lang.Object assetType_ = "";
    /**
     *
     *
     * <pre>
     * The type of this resource. Example: `compute.googleapis.com/Disk`.
     * To search against the `asset_type`:
     * * Specify the `asset_type` field in your search request.
     * </pre>
     *
     * <code>string asset_type = 2;</code>
     *
     * @return The assetType.
     */
    public java.lang.String getAssetType() {
      java.lang.Object ref = assetType_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        assetType_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The type of this resource. Example: `compute.googleapis.com/Disk`.
     * To search against the `asset_type`:
     * * Specify the `asset_type` field in your search request.
     * </pre>
     *
     * <code>string asset_type = 2;</code>
     *
     * @return The bytes for assetType.
     */
    public com.google.protobuf.ByteString getAssetTypeBytes() {
      java.lang.Object ref = assetType_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        assetType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The type of this resource. Example: `compute.googleapis.com/Disk`.
     * To search against the `asset_type`:
     * * Specify the `asset_type` field in your search request.
     * </pre>
     *
     * <code>string asset_type = 2;</code>
     *
     * @param value The assetType to set.
     * @return This builder for chaining.
     */
    public Builder setAssetType(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      assetType_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The type of this resource. Example: `compute.googleapis.com/Disk`.
     * To search against the `asset_type`:
     * * Specify the `asset_type` field in your search request.
     * </pre>
     *
     * <code>string asset_type = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearAssetType() {
      assetType_ = getDefaultInstance().getAssetType();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The type of this resource. Example: `compute.googleapis.com/Disk`.
     * To search against the `asset_type`:
     * * Specify the `asset_type` field in your search request.
     * </pre>
     *
     * <code>string asset_type = 2;</code>
     *
     * @param value The bytes for assetType to set.
     * @return This builder for chaining.
     */
    public Builder setAssetTypeBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      assetType_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    private java.lang.Object project_ = "";
    /**
     *
     *
     * <pre>
     * The project that this resource belongs to, in the form of
     * projects/{PROJECT_NUMBER}. This field is available when the resource
     * belongs to a project.
     * To search against `project`:
     * * Use a field query. Example: `project:12345`
     * * Use a free text query. Example: `12345`
     * * Specify the `scope` field as this project in your search request.
     * </pre>
     *
     * <code>string project = 3;</code>
     *
     * @return The project.
     */
    public java.lang.String getProject() {
      java.lang.Object ref = project_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        project_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The project that this resource belongs to, in the form of
     * projects/{PROJECT_NUMBER}. This field is available when the resource
     * belongs to a project.
     * To search against `project`:
     * * Use a field query. Example: `project:12345`
     * * Use a free text query. Example: `12345`
     * * Specify the `scope` field as this project in your search request.
     * </pre>
     *
     * <code>string project = 3;</code>
     *
     * @return The bytes for project.
     */
    public com.google.protobuf.ByteString getProjectBytes() {
      java.lang.Object ref = project_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        project_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The project that this resource belongs to, in the form of
     * projects/{PROJECT_NUMBER}. This field is available when the resource
     * belongs to a project.
     * To search against `project`:
     * * Use a field query. Example: `project:12345`
     * * Use a free text query. Example: `12345`
     * * Specify the `scope` field as this project in your search request.
     * </pre>
     *
     * <code>string project = 3;</code>
     *
     * @param value The project to set.
     * @return This builder for chaining.
     */
    public Builder setProject(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      project_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The project that this resource belongs to, in the form of
     * projects/{PROJECT_NUMBER}. This field is available when the resource
     * belongs to a project.
     * To search against `project`:
     * * Use a field query. Example: `project:12345`
     * * Use a free text query. Example: `12345`
     * * Specify the `scope` field as this project in your search request.
     * </pre>
     *
     * <code>string project = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearProject() {
      project_ = getDefaultInstance().getProject();
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The project that this resource belongs to, in the form of
     * projects/{PROJECT_NUMBER}. This field is available when the resource
     * belongs to a project.
     * To search against `project`:
     * * Use a field query. Example: `project:12345`
     * * Use a free text query. Example: `12345`
     * * Specify the `scope` field as this project in your search request.
     * </pre>
     *
     * <code>string project = 3;</code>
     *
     * @param value The bytes for project to set.
     * @return This builder for chaining.
     */
    public Builder setProjectBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      project_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList folders_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureFoldersIsMutable() {
      if (!((bitField0_ & 0x00000008) != 0)) {
        folders_ = new com.google.protobuf.LazyStringArrayList(folders_);
        bitField0_ |= 0x00000008;
      }
    }
    /**
     *
     *
     * <pre>
     * The folder(s) that this resource belongs to, in the form of
     * folders/{FOLDER_NUMBER}. This field is available when the resource
     * belongs to one or more folders.
     * To search against `folders`:
     * * Use a field query. Example: `folders:(123 OR 456)`
     * * Use a free text query. Example: `123`
     * * Specify the `scope` field as this folder in your search request.
     * </pre>
     *
     * <code>repeated string folders = 17;</code>
     *
     * @return A list containing the folders.
     */
    public com.google.protobuf.ProtocolStringList getFoldersList() {
      return folders_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * The folder(s) that this resource belongs to, in the form of
     * folders/{FOLDER_NUMBER}. This field is available when the resource
     * belongs to one or more folders.
     * To search against `folders`:
     * * Use a field query. Example: `folders:(123 OR 456)`
     * * Use a free text query. Example: `123`
     * * Specify the `scope` field as this folder in your search request.
     * </pre>
     *
     * <code>repeated string folders = 17;</code>
     *
     * @return The count of folders.
     */
    public int getFoldersCount() {
      return folders_.size();
    }
    /**
     *
     *
     * <pre>
     * The folder(s) that this resource belongs to, in the form of
     * folders/{FOLDER_NUMBER}. This field is available when the resource
     * belongs to one or more folders.
     * To search against `folders`:
     * * Use a field query. Example: `folders:(123 OR 456)`
     * * Use a free text query. Example: `123`
     * * Specify the `scope` field as this folder in your search request.
     * </pre>
     *
     * <code>repeated string folders = 17;</code>
     *
     * @param index The index of the element to return.
     * @return The folders at the given index.
     */
    public java.lang.String getFolders(int index) {
      return folders_.get(index);
    }
    /**
     *
     *
     * <pre>
     * The folder(s) that this resource belongs to, in the form of
     * folders/{FOLDER_NUMBER}. This field is available when the resource
     * belongs to one or more folders.
     * To search against `folders`:
     * * Use a field query. Example: `folders:(123 OR 456)`
     * * Use a free text query. Example: `123`
     * * Specify the `scope` field as this folder in your search request.
     * </pre>
     *
     * <code>repeated string folders = 17;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the folders at the given index.
     */
    public com.google.protobuf.ByteString getFoldersBytes(int index) {
      return folders_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * The folder(s) that this resource belongs to, in the form of
     * folders/{FOLDER_NUMBER}. This field is available when the resource
     * belongs to one or more folders.
     * To search against `folders`:
     * * Use a field query. Example: `folders:(123 OR 456)`
     * * Use a free text query. Example: `123`
     * * Specify the `scope` field as this folder in your search request.
     * </pre>
     *
     * <code>repeated string folders = 17;</code>
     *
     * @param index The index to set the value at.
     * @param value The folders to set.
     * @return This builder for chaining.
     */
    public Builder setFolders(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureFoldersIsMutable();
      folders_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The folder(s) that this resource belongs to, in the form of
     * folders/{FOLDER_NUMBER}. This field is available when the resource
     * belongs to one or more folders.
     * To search against `folders`:
     * * Use a field query. Example: `folders:(123 OR 456)`
     * * Use a free text query. Example: `123`
     * * Specify the `scope` field as this folder in your search request.
     * </pre>
     *
     * <code>repeated string folders = 17;</code>
     *
     * @param value The folders to add.
     * @return This builder for chaining.
     */
    public Builder addFolders(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureFoldersIsMutable();
      folders_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The folder(s) that this resource belongs to, in the form of
     * folders/{FOLDER_NUMBER}. This field is available when the resource
     * belongs to one or more folders.
     * To search against `folders`:
     * * Use a field query. Example: `folders:(123 OR 456)`
     * * Use a free text query. Example: `123`
     * * Specify the `scope` field as this folder in your search request.
     * </pre>
     *
     * <code>repeated string folders = 17;</code>
     *
     * @param values The folders to add.
     * @return This builder for chaining.
     */
    public Builder addAllFolders(java.lang.Iterable<java.lang.String> values) {
      ensureFoldersIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, folders_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The folder(s) that this resource belongs to, in the form of
     * folders/{FOLDER_NUMBER}. This field is available when the resource
     * belongs to one or more folders.
     * To search against `folders`:
     * * Use a field query. Example: `folders:(123 OR 456)`
     * * Use a free text query. Example: `123`
     * * Specify the `scope` field as this folder in your search request.
     * </pre>
     *
     * <code>repeated string folders = 17;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearFolders() {
      folders_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000008);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The folder(s) that this resource belongs to, in the form of
     * folders/{FOLDER_NUMBER}. This field is available when the resource
     * belongs to one or more folders.
     * To search against `folders`:
     * * Use a field query. Example: `folders:(123 OR 456)`
     * * Use a free text query. Example: `123`
     * * Specify the `scope` field as this folder in your search request.
     * </pre>
     *
     * <code>repeated string folders = 17;</code>
     *
     * @param value The bytes of the folders to add.
     * @return This builder for chaining.
     */
    public Builder addFoldersBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureFoldersIsMutable();
      folders_.add(value);
      onChanged();
      return this;
    }

    private java.lang.Object organization_ = "";
    /**
     *
     *
     * <pre>
     * The organization that this resource belongs to, in the form of
     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
     * resource belongs to an organization.
     * To search against `organization`:
     * * Use a field query. Example: `organization:123`
     * * Use a free text query. Example: `123`
     * * Specify the `scope` field as this organization in your search request.
     * </pre>
     *
     * <code>string organization = 18;</code>
     *
     * @return The organization.
     */
    public java.lang.String getOrganization() {
      java.lang.Object ref = organization_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        organization_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The organization that this resource belongs to, in the form of
     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
     * resource belongs to an organization.
     * To search against `organization`:
     * * Use a field query. Example: `organization:123`
     * * Use a free text query. Example: `123`
     * * Specify the `scope` field as this organization in your search request.
     * </pre>
     *
     * <code>string organization = 18;</code>
     *
     * @return The bytes for organization.
     */
    public com.google.protobuf.ByteString getOrganizationBytes() {
      java.lang.Object ref = organization_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        organization_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The organization that this resource belongs to, in the form of
     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
     * resource belongs to an organization.
     * To search against `organization`:
     * * Use a field query. Example: `organization:123`
     * * Use a free text query. Example: `123`
     * * Specify the `scope` field as this organization in your search request.
     * </pre>
     *
     * <code>string organization = 18;</code>
     *
     * @param value The organization to set.
     * @return This builder for chaining.
     */
    public Builder setOrganization(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      organization_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The organization that this resource belongs to, in the form of
     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
     * resource belongs to an organization.
     * To search against `organization`:
     * * Use a field query. Example: `organization:123`
     * * Use a free text query. Example: `123`
     * * Specify the `scope` field as this organization in your search request.
     * </pre>
     *
     * <code>string organization = 18;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearOrganization() {
      organization_ = getDefaultInstance().getOrganization();
      bitField0_ = (bitField0_ & ~0x00000010);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The organization that this resource belongs to, in the form of
     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
     * resource belongs to an organization.
     * To search against `organization`:
     * * Use a field query. Example: `organization:123`
     * * Use a free text query. Example: `123`
     * * Specify the `scope` field as this organization in your search request.
     * </pre>
     *
     * <code>string organization = 18;</code>
     *
     * @param value The bytes for organization to set.
     * @return This builder for chaining.
     */
    public Builder setOrganizationBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      organization_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }

    private java.lang.Object displayName_ = "";
    /**
     *
     *
     * <pre>
     * The display name of this resource. This field is available only when the
     * resource's Protobuf contains it.
     * To search against the `display_name`:
     * * Use a field query. Example: `displayName:"My Instance"`
     * * Use a free text query. Example: `"My Instance"`
     * </pre>
     *
     * <code>string display_name = 4;</code>
     *
     * @return The displayName.
     */
    public java.lang.String getDisplayName() {
      java.lang.Object ref = displayName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        displayName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The display name of this resource. This field is available only when the
     * resource's Protobuf contains it.
     * To search against the `display_name`:
     * * Use a field query. Example: `displayName:"My Instance"`
     * * Use a free text query. Example: `"My Instance"`
     * </pre>
     *
     * <code>string display_name = 4;</code>
     *
     * @return The bytes for displayName.
     */
    public com.google.protobuf.ByteString getDisplayNameBytes() {
      java.lang.Object ref = displayName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        displayName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The display name of this resource. This field is available only when the
     * resource's Protobuf contains it.
     * To search against the `display_name`:
     * * Use a field query. Example: `displayName:"My Instance"`
     * * Use a free text query. Example: `"My Instance"`
     * </pre>
     *
     * <code>string display_name = 4;</code>
     *
     * @param value The displayName to set.
     * @return This builder for chaining.
     */
    public Builder setDisplayName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      displayName_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The display name of this resource. This field is available only when the
     * resource's Protobuf contains it.
     * To search against the `display_name`:
     * * Use a field query. Example: `displayName:"My Instance"`
     * * Use a free text query. Example: `"My Instance"`
     * </pre>
     *
     * <code>string display_name = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDisplayName() {
      displayName_ = getDefaultInstance().getDisplayName();
      bitField0_ = (bitField0_ & ~0x00000020);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The display name of this resource. This field is available only when the
     * resource's Protobuf contains it.
     * To search against the `display_name`:
     * * Use a field query. Example: `displayName:"My Instance"`
     * * Use a free text query. Example: `"My Instance"`
     * </pre>
     *
     * <code>string display_name = 4;</code>
     *
     * @param value The bytes for displayName to set.
     * @return This builder for chaining.
     */
    public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      displayName_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }

    private java.lang.Object description_ = "";
    /**
     *
     *
     * <pre>
     * One or more paragraphs of text description of this resource. Maximum length
     * could be up to 1M bytes. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `description`:
     * * Use a field query. Example: `description:"important instance"`
     * * Use a free text query. Example: `"important instance"`
     * </pre>
     *
     * <code>string description = 5;</code>
     *
     * @return The description.
     */
    public java.lang.String getDescription() {
      java.lang.Object ref = description_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        description_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * One or more paragraphs of text description of this resource. Maximum length
     * could be up to 1M bytes. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `description`:
     * * Use a field query. Example: `description:"important instance"`
     * * Use a free text query. Example: `"important instance"`
     * </pre>
     *
     * <code>string description = 5;</code>
     *
     * @return The bytes for description.
     */
    public com.google.protobuf.ByteString getDescriptionBytes() {
      java.lang.Object ref = description_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        description_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * One or more paragraphs of text description of this resource. Maximum length
     * could be up to 1M bytes. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `description`:
     * * Use a field query. Example: `description:"important instance"`
     * * Use a free text query. Example: `"important instance"`
     * </pre>
     *
     * <code>string description = 5;</code>
     *
     * @param value The description to set.
     * @return This builder for chaining.
     */
    public Builder setDescription(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      description_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * One or more paragraphs of text description of this resource. Maximum length
     * could be up to 1M bytes. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `description`:
     * * Use a field query. Example: `description:"important instance"`
     * * Use a free text query. Example: `"important instance"`
     * </pre>
     *
     * <code>string description = 5;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDescription() {
      description_ = getDefaultInstance().getDescription();
      bitField0_ = (bitField0_ & ~0x00000040);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * One or more paragraphs of text description of this resource. Maximum length
     * could be up to 1M bytes. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `description`:
     * * Use a field query. Example: `description:"important instance"`
     * * Use a free text query. Example: `"important instance"`
     * </pre>
     *
     * <code>string description = 5;</code>
     *
     * @param value The bytes for description to set.
     * @return This builder for chaining.
     */
    public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      description_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }

    private java.lang.Object location_ = "";
    /**
     *
     *
     * <pre>
     * Location can be `global`, regional like `us-east1`, or zonal like
     * `us-west1-b`. This field is available only when the resource's Protobuf
     * contains it.
     * To search against the `location`:
     * * Use a field query. Example: `location:us-west*`
     * * Use a free text query. Example: `us-west*`
     * </pre>
     *
     * <code>string location = 6;</code>
     *
     * @return The location.
     */
    public java.lang.String getLocation() {
      java.lang.Object ref = location_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        location_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Location can be `global`, regional like `us-east1`, or zonal like
     * `us-west1-b`. This field is available only when the resource's Protobuf
     * contains it.
     * To search against the `location`:
     * * Use a field query. Example: `location:us-west*`
     * * Use a free text query. Example: `us-west*`
     * </pre>
     *
     * <code>string location = 6;</code>
     *
     * @return The bytes for location.
     */
    public com.google.protobuf.ByteString getLocationBytes() {
      java.lang.Object ref = location_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        location_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Location can be `global`, regional like `us-east1`, or zonal like
     * `us-west1-b`. This field is available only when the resource's Protobuf
     * contains it.
     * To search against the `location`:
     * * Use a field query. Example: `location:us-west*`
     * * Use a free text query. Example: `us-west*`
     * </pre>
     *
     * <code>string location = 6;</code>
     *
     * @param value The location to set.
     * @return This builder for chaining.
     */
    public Builder setLocation(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      location_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Location can be `global`, regional like `us-east1`, or zonal like
     * `us-west1-b`. This field is available only when the resource's Protobuf
     * contains it.
     * To search against the `location`:
     * * Use a field query. Example: `location:us-west*`
     * * Use a free text query. Example: `us-west*`
     * </pre>
     *
     * <code>string location = 6;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearLocation() {
      location_ = getDefaultInstance().getLocation();
      bitField0_ = (bitField0_ & ~0x00000080);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Location can be `global`, regional like `us-east1`, or zonal like
     * `us-west1-b`. This field is available only when the resource's Protobuf
     * contains it.
     * To search against the `location`:
     * * Use a field query. Example: `location:us-west*`
     * * Use a free text query. Example: `us-west*`
     * </pre>
     *
     * <code>string location = 6;</code>
     *
     * @param value The bytes for location to set.
     * @return This builder for chaining.
     */
    public Builder setLocationBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      location_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
      if (labels_ == null) {
        return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
      }
      return labels_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableLabels() {
      if (labels_ == null) {
        labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
      }
      if (!labels_.isMutable()) {
        labels_ = labels_.copy();
      }
      bitField0_ |= 0x00000100;
      onChanged();
      return labels_;
    }

    public int getLabelsCount() {
      return internalGetLabels().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * Labels associated with this resource. See [Labelling and grouping Google
     * Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `labels`:
     * * Use a field query:
     *     - query on any label's key or value. Example: `labels:prod`
     *     - query by a given label. Example: `labels.env:prod`
     *     - query by a given label's existence. Example: `labels.env:*`
     * * Use a free text query. Example: `prod`
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 7;</code>
     */
    @java.lang.Override
    public boolean containsLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetLabels().getMap().containsKey(key);
    }
    /** Use {@link #getLabelsMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getLabels() {
      return getLabelsMap();
    }
    /**
     *
     *
     * <pre>
     * Labels associated with this resource. See [Labelling and grouping Google
     * Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `labels`:
     * * Use a field query:
     *     - query on any label's key or value. Example: `labels:prod`
     *     - query by a given label. Example: `labels.env:prod`
     *     - query by a given label's existence. Example: `labels.env:*`
     * * Use a free text query. Example: `prod`
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 7;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
      return internalGetLabels().getMap();
    }
    /**
     *
     *
     * <pre>
     * Labels associated with this resource. See [Labelling and grouping Google
     * Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `labels`:
     * * Use a field query:
     *     - query on any label's key or value. Example: `labels:prod`
     *     - query by a given label. Example: `labels.env:prod`
     *     - query by a given label's existence. Example: `labels.env:*`
     * * Use a free text query. Example: `prod`
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 7;</code>
     */
    @java.lang.Override
    public /* nullable */ java.lang.String getLabelsOrDefault(
        java.lang.String key,
        /* nullable */
        java.lang.String defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * Labels associated with this resource. See [Labelling and grouping Google
     * Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `labels`:
     * * Use a field query:
     *     - query on any label's key or value. Example: `labels:prod`
     *     - query by a given label. Example: `labels.env:prod`
     *     - query by a given label's existence. Example: `labels.env:*`
     * * Use a free text query. Example: `prod`
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 7;</code>
     */
    @java.lang.Override
    public java.lang.String getLabelsOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearLabels() {
      bitField0_ = (bitField0_ & ~0x00000100);
      internalGetMutableLabels().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Labels associated with this resource. See [Labelling and grouping Google
     * Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `labels`:
     * * Use a field query:
     *     - query on any label's key or value. Example: `labels:prod`
     *     - query by a given label. Example: `labels.env:prod`
     *     - query by a given label's existence. Example: `labels.env:*`
     * * Use a free text query. Example: `prod`
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 7;</code>
     */
    public Builder removeLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableLabels().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() {
      bitField0_ |= 0x00000100;
      return internalGetMutableLabels().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Labels associated with this resource. See [Labelling and grouping Google
     * Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `labels`:
     * * Use a field query:
     *     - query on any label's key or value. Example: `labels:prod`
     *     - query by a given label. Example: `labels.env:prod`
     *     - query by a given label's existence. Example: `labels.env:*`
     * * Use a free text query. Example: `prod`
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 7;</code>
     */
    public Builder putLabels(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }
      internalGetMutableLabels().getMutableMap().put(key, value);
      bitField0_ |= 0x00000100;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Labels associated with this resource. See [Labelling and grouping Google
     * Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `labels`:
     * * Use a field query:
     *     - query on any label's key or value. Example: `labels:prod`
     *     - query by a given label. Example: `labels.env:prod`
     *     - query by a given label's existence. Example: `labels.env:*`
     * * Use a free text query. Example: `prod`
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 7;</code>
     */
    public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableLabels().getMutableMap().putAll(values);
      bitField0_ |= 0x00000100;
      return this;
    }

    private com.google.protobuf.LazyStringList networkTags_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureNetworkTagsIsMutable() {
      if (!((bitField0_ & 0x00000200) != 0)) {
        networkTags_ = new com.google.protobuf.LazyStringArrayList(networkTags_);
        bitField0_ |= 0x00000200;
      }
    }
    /**
     *
     *
     * <pre>
     * Network tags associated with this resource. Like labels, network tags are a
     * type of annotations used to group Google Cloud resources. See [Labelling
     * Google Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `network_tags`:
     * * Use a field query. Example: `networkTags:internal`
     * * Use a free text query. Example: `internal`
     * </pre>
     *
     * <code>repeated string network_tags = 8;</code>
     *
     * @return A list containing the networkTags.
     */
    public com.google.protobuf.ProtocolStringList getNetworkTagsList() {
      return networkTags_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * Network tags associated with this resource. Like labels, network tags are a
     * type of annotations used to group Google Cloud resources. See [Labelling
     * Google Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `network_tags`:
     * * Use a field query. Example: `networkTags:internal`
     * * Use a free text query. Example: `internal`
     * </pre>
     *
     * <code>repeated string network_tags = 8;</code>
     *
     * @return The count of networkTags.
     */
    public int getNetworkTagsCount() {
      return networkTags_.size();
    }
    /**
     *
     *
     * <pre>
     * Network tags associated with this resource. Like labels, network tags are a
     * type of annotations used to group Google Cloud resources. See [Labelling
     * Google Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `network_tags`:
     * * Use a field query. Example: `networkTags:internal`
     * * Use a free text query. Example: `internal`
     * </pre>
     *
     * <code>repeated string network_tags = 8;</code>
     *
     * @param index The index of the element to return.
     * @return The networkTags at the given index.
     */
    public java.lang.String getNetworkTags(int index) {
      return networkTags_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Network tags associated with this resource. Like labels, network tags are a
     * type of annotations used to group Google Cloud resources. See [Labelling
     * Google Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `network_tags`:
     * * Use a field query. Example: `networkTags:internal`
     * * Use a free text query. Example: `internal`
     * </pre>
     *
     * <code>repeated string network_tags = 8;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the networkTags at the given index.
     */
    public com.google.protobuf.ByteString getNetworkTagsBytes(int index) {
      return networkTags_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * Network tags associated with this resource. Like labels, network tags are a
     * type of annotations used to group Google Cloud resources. See [Labelling
     * Google Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `network_tags`:
     * * Use a field query. Example: `networkTags:internal`
     * * Use a free text query. Example: `internal`
     * </pre>
     *
     * <code>repeated string network_tags = 8;</code>
     *
     * @param index The index to set the value at.
     * @param value The networkTags to set.
     * @return This builder for chaining.
     */
    public Builder setNetworkTags(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureNetworkTagsIsMutable();
      networkTags_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Network tags associated with this resource. Like labels, network tags are a
     * type of annotations used to group Google Cloud resources. See [Labelling
     * Google Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `network_tags`:
     * * Use a field query. Example: `networkTags:internal`
     * * Use a free text query. Example: `internal`
     * </pre>
     *
     * <code>repeated string network_tags = 8;</code>
     *
     * @param value The networkTags to add.
     * @return This builder for chaining.
     */
    public Builder addNetworkTags(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureNetworkTagsIsMutable();
      networkTags_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Network tags associated with this resource. Like labels, network tags are a
     * type of annotations used to group Google Cloud resources. See [Labelling
     * Google Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `network_tags`:
     * * Use a field query. Example: `networkTags:internal`
     * * Use a free text query. Example: `internal`
     * </pre>
     *
     * <code>repeated string network_tags = 8;</code>
     *
     * @param values The networkTags to add.
     * @return This builder for chaining.
     */
    public Builder addAllNetworkTags(java.lang.Iterable<java.lang.String> values) {
      ensureNetworkTagsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networkTags_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Network tags associated with this resource. Like labels, network tags are a
     * type of annotations used to group Google Cloud resources. See [Labelling
     * Google Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `network_tags`:
     * * Use a field query. Example: `networkTags:internal`
     * * Use a free text query. Example: `internal`
     * </pre>
     *
     * <code>repeated string network_tags = 8;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearNetworkTags() {
      networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000200);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Network tags associated with this resource. Like labels, network tags are a
     * type of annotations used to group Google Cloud resources. See [Labelling
     * Google Cloud
     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
     * for more information. This field is available only when the resource's
     * Protobuf contains it.
     * To search against the `network_tags`:
     * * Use a field query. Example: `networkTags:internal`
     * * Use a free text query. Example: `internal`
     * </pre>
     *
     * <code>repeated string network_tags = 8;</code>
     *
     * @param value The bytes of the networkTags to add.
     * @return This builder for chaining.
     */
    public Builder addNetworkTagsBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureNetworkTagsIsMutable();
      networkTags_.add(value);
      onChanged();
      return this;
    }

    private java.lang.Object kmsKey_ = "";
    /**
     *
     *
     * <pre>
     * The Cloud KMS
     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
     * name or
     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
     * name.
     * This field only presents for the purpose of backward compatibility. Please
     * use the `kms_keys` field to retrieve Cloud KMS key information. This field
     * is available only when the resource's Protobuf contains it and will only be
     * populated for [these resource
     * types](https://cloud.google.com/asset-inventory/docs/legacy-field-names#resource_types_with_the_to_be_deprecated_kmskey_field)
     * for backward compatible purposes.
     * To search against the `kms_key`:
     * * Use a field query. Example: `kmsKey:key`
     * * Use a free text query. Example: `key`
     * </pre>
     *
     * <code>string kms_key = 10 [deprecated = true];</code>
     *
     * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See
     *     google/cloud/asset/v1/assets.proto;l=437
     * @return The kmsKey.
     */
    @java.lang.Deprecated
    public java.lang.String getKmsKey() {
      java.lang.Object ref = kmsKey_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        kmsKey_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Cloud KMS
     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
     * name or
     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
     * name.
     * This field only presents for the purpose of backward compatibility. Please
     * use the `kms_keys` field to retrieve Cloud KMS key information. This field
     * is available only when the resource's Protobuf contains it and will only be
     * populated for [these resource
     * types](https://cloud.google.com/asset-inventory/docs/legacy-field-names#resource_types_with_the_to_be_deprecated_kmskey_field)
     * for backward compatible purposes.
     * To search against the `kms_key`:
     * * Use a field query. Example: `kmsKey:key`
     * * Use a free text query. Example: `key`
     * </pre>
     *
     * <code>string kms_key = 10 [deprecated = true];</code>
     *
     * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See
     *     google/cloud/asset/v1/assets.proto;l=437
     * @return The bytes for kmsKey.
     */
    @java.lang.Deprecated
    public com.google.protobuf.ByteString getKmsKeyBytes() {
      java.lang.Object ref = kmsKey_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        kmsKey_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Cloud KMS
     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
     * name or
     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
     * name.
     * This field only presents for the purpose of backward compatibility. Please
     * use the `kms_keys` field to retrieve Cloud KMS key information. This field
     * is available only when the resource's Protobuf contains it and will only be
     * populated for [these resource
     * types](https://cloud.google.com/asset-inventory/docs/legacy-field-names#resource_types_with_the_to_be_deprecated_kmskey_field)
     * for backward compatible purposes.
     * To search against the `kms_key`:
     * * Use a field query. Example: `kmsKey:key`
     * * Use a free text query. Example: `key`
     * </pre>
     *
     * <code>string kms_key = 10 [deprecated = true];</code>
     *
     * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See
     *     google/cloud/asset/v1/assets.proto;l=437
     * @param value The kmsKey to set.
     * @return This builder for chaining.
     */
    @java.lang.Deprecated
    public Builder setKmsKey(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      kmsKey_ = value;
      bitField0_ |= 0x00000400;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Cloud KMS
     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
     * name or
     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
     * name.
     * This field only presents for the purpose of backward compatibility. Please
     * use the `kms_keys` field to retrieve Cloud KMS key information. This field
     * is available only when the resource's Protobuf contains it and will only be
     * populated for [these resource
     * types](https://cloud.google.com/asset-inventory/docs/legacy-field-names#resource_types_with_the_to_be_deprecated_kmskey_field)
     * for backward compatible purposes.
     * To search against the `kms_key`:
     * * Use a field query. Example: `kmsKey:key`
     * * Use a free text query. Example: `key`
     * </pre>
     *
     * <code>string kms_key = 10 [deprecated = true];</code>
     *
     * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See
     *     google/cloud/asset/v1/assets.proto;l=437
     * @return This builder for chaining.
     */
    @java.lang.Deprecated
    public Builder clearKmsKey() {
      kmsKey_ = getDefaultInstance().getKmsKey();
      bitField0_ = (bitField0_ & ~0x00000400);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Cloud KMS
     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
     * name or
     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
     * name.
     * This field only presents for the purpose of backward compatibility. Please
     * use the `kms_keys` field to retrieve Cloud KMS key information. This field
     * is available only when the resource's Protobuf contains it and will only be
     * populated for [these resource
     * types](https://cloud.google.com/asset-inventory/docs/legacy-field-names#resource_types_with_the_to_be_deprecated_kmskey_field)
     * for backward compatible purposes.
     * To search against the `kms_key`:
     * * Use a field query. Example: `kmsKey:key`
     * * Use a free text query. Example: `key`
     * </pre>
     *
     * <code>string kms_key = 10 [deprecated = true];</code>
     *
     * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See
     *     google/cloud/asset/v1/assets.proto;l=437
     * @param value The bytes for kmsKey to set.
     * @return This builder for chaining.
     */
    @java.lang.Deprecated
    public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      kmsKey_ = value;
      bitField0_ |= 0x00000400;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList kmsKeys_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureKmsKeysIsMutable() {
      if (!((bitField0_ & 0x00000800) != 0)) {
        kmsKeys_ = new com.google.protobuf.LazyStringArrayList(kmsKeys_);
        bitField0_ |= 0x00000800;
      }
    }
    /**
     *
     *
     * <pre>
     * The Cloud KMS
     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
     * names or
     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
     * names. This field is available only when the resource's Protobuf contains
     * it.
     * To search against the `kms_keys`:
     * * Use a field query. Example: `kmsKeys:key`
     * * Use a free text query. Example: `key`
     * </pre>
     *
     * <code>repeated string kms_keys = 28;</code>
     *
     * @return A list containing the kmsKeys.
     */
    public com.google.protobuf.ProtocolStringList getKmsKeysList() {
      return kmsKeys_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * The Cloud KMS
     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
     * names or
     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
     * names. This field is available only when the resource's Protobuf contains
     * it.
     * To search against the `kms_keys`:
     * * Use a field query. Example: `kmsKeys:key`
     * * Use a free text query. Example: `key`
     * </pre>
     *
     * <code>repeated string kms_keys = 28;</code>
     *
     * @return The count of kmsKeys.
     */
    public int getKmsKeysCount() {
      return kmsKeys_.size();
    }
    /**
     *
     *
     * <pre>
     * The Cloud KMS
     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
     * names or
     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
     * names. This field is available only when the resource's Protobuf contains
     * it.
     * To search against the `kms_keys`:
     * * Use a field query. Example: `kmsKeys:key`
     * * Use a free text query. Example: `key`
     * </pre>
     *
     * <code>repeated string kms_keys = 28;</code>
     *
     * @param index The index of the element to return.
     * @return The kmsKeys at the given index.
     */
    public java.lang.String getKmsKeys(int index) {
      return kmsKeys_.get(index);
    }
    /**
     *
     *
     * <pre>
     * The Cloud KMS
     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
     * names or
     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
     * names. This field is available only when the resource's Protobuf contains
     * it.
     * To search against the `kms_keys`:
     * * Use a field query. Example: `kmsKeys:key`
     * * Use a free text query. Example: `key`
     * </pre>
     *
     * <code>repeated string kms_keys = 28;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the kmsKeys at the given index.
     */
    public com.google.protobuf.ByteString getKmsKeysBytes(int index) {
      return kmsKeys_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * The Cloud KMS
     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
     * names or
     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
     * names. This field is available only when the resource's Protobuf contains
     * it.
     * To search against the `kms_keys`:
     * * Use a field query. Example: `kmsKeys:key`
     * * Use a free text query. Example: `key`
     * </pre>
     *
     * <code>repeated string kms_keys = 28;</code>
     *
     * @param index The index to set the value at.
     * @param value The kmsKeys to set.
     * @return This builder for chaining.
     */
    public Builder setKmsKeys(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureKmsKeysIsMutable();
      kmsKeys_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Cloud KMS
     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
     * names or
     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
     * names. This field is available only when the resource's Protobuf contains
     * it.
     * To search against the `kms_keys`:
     * * Use a field query. Example: `kmsKeys:key`
     * * Use a free text query. Example: `key`
     * </pre>
     *
     * <code>repeated string kms_keys = 28;</code>
     *
     * @param value The kmsKeys to add.
     * @return This builder for chaining.
     */
    public Builder addKmsKeys(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureKmsKeysIsMutable();
      kmsKeys_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Cloud KMS
     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
     * names or
     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
     * names. This field is available only when the resource's Protobuf contains
     * it.
     * To search against the `kms_keys`:
     * * Use a field query. Example: `kmsKeys:key`
     * * Use a free text query. Example: `key`
     * </pre>
     *
     * <code>repeated string kms_keys = 28;</code>
     *
     * @param values The kmsKeys to add.
     * @return This builder for chaining.
     */
    public Builder addAllKmsKeys(java.lang.Iterable<java.lang.String> values) {
      ensureKmsKeysIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, kmsKeys_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Cloud KMS
     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
     * names or
     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
     * names. This field is available only when the resource's Protobuf contains
     * it.
     * To search against the `kms_keys`:
     * * Use a field query. Example: `kmsKeys:key`
     * * Use a free text query. Example: `key`
     * </pre>
     *
     * <code>repeated string kms_keys = 28;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearKmsKeys() {
      kmsKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000800);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Cloud KMS
     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
     * names or
     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
     * names. This field is available only when the resource's Protobuf contains
     * it.
     * To search against the `kms_keys`:
     * * Use a field query. Example: `kmsKeys:key`
     * * Use a free text query. Example: `key`
     * </pre>
     *
     * <code>repeated string kms_keys = 28;</code>
     *
     * @param value The bytes of the kmsKeys to add.
     * @return This builder for chaining.
     */
    public Builder addKmsKeysBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureKmsKeysIsMutable();
      kmsKeys_.add(value);
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp createTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        createTimeBuilder_;
    /**
     *
     *
     * <pre>
     * The create timestamp of this resource, at which the resource was created.
     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
     * is available only when the resource's Protobuf contains it.
     * To search against `create_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `createTime &gt; 1609459200`
     *     - value in date string. Example: `createTime &gt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `createTime &gt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 11;</code>
     *
     * @return Whether the createTime field is set.
     */
    public boolean hasCreateTime() {
      return ((bitField0_ & 0x00001000) != 0);
    }
    /**
     *
     *
     * <pre>
     * The create timestamp of this resource, at which the resource was created.
     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
     * is available only when the resource's Protobuf contains it.
     * To search against `create_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `createTime &gt; 1609459200`
     *     - value in date string. Example: `createTime &gt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `createTime &gt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 11;</code>
     *
     * @return The createTime.
     */
    public com.google.protobuf.Timestamp getCreateTime() {
      if (createTimeBuilder_ == null) {
        return createTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : createTime_;
      } else {
        return createTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The create timestamp of this resource, at which the resource was created.
     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
     * is available only when the resource's Protobuf contains it.
     * To search against `create_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `createTime &gt; 1609459200`
     *     - value in date string. Example: `createTime &gt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `createTime &gt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 11;</code>
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        createTime_ = value;
      } else {
        createTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00001000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The create timestamp of this resource, at which the resource was created.
     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
     * is available only when the resource's Protobuf contains it.
     * To search against `create_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `createTime &gt; 1609459200`
     *     - value in date string. Example: `createTime &gt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `createTime &gt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 11;</code>
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (createTimeBuilder_ == null) {
        createTime_ = builderForValue.build();
      } else {
        createTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00001000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The create timestamp of this resource, at which the resource was created.
     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
     * is available only when the resource's Protobuf contains it.
     * To search against `create_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `createTime &gt; 1609459200`
     *     - value in date string. Example: `createTime &gt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `createTime &gt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 11;</code>
     */
    public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (((bitField0_ & 0x00001000) != 0)
            && createTime_ != null
            && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getCreateTimeBuilder().mergeFrom(value);
        } else {
          createTime_ = value;
        }
      } else {
        createTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00001000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The create timestamp of this resource, at which the resource was created.
     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
     * is available only when the resource's Protobuf contains it.
     * To search against `create_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `createTime &gt; 1609459200`
     *     - value in date string. Example: `createTime &gt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `createTime &gt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 11;</code>
     */
    public Builder clearCreateTime() {
      bitField0_ = (bitField0_ & ~0x00001000);
      createTime_ = null;
      if (createTimeBuilder_ != null) {
        createTimeBuilder_.dispose();
        createTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The create timestamp of this resource, at which the resource was created.
     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
     * is available only when the resource's Protobuf contains it.
     * To search against `create_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `createTime &gt; 1609459200`
     *     - value in date string. Example: `createTime &gt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `createTime &gt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 11;</code>
     */
    public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
      bitField0_ |= 0x00001000;
      onChanged();
      return getCreateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The create timestamp of this resource, at which the resource was created.
     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
     * is available only when the resource's Protobuf contains it.
     * To search against `create_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `createTime &gt; 1609459200`
     *     - value in date string. Example: `createTime &gt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `createTime &gt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 11;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
      if (createTimeBuilder_ != null) {
        return createTimeBuilder_.getMessageOrBuilder();
      } else {
        return createTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : createTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * The create timestamp of this resource, at which the resource was created.
     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
     * is available only when the resource's Protobuf contains it.
     * To search against `create_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `createTime &gt; 1609459200`
     *     - value in date string. Example: `createTime &gt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `createTime &gt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 11;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getCreateTimeFieldBuilder() {
      if (createTimeBuilder_ == null) {
        createTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getCreateTime(), getParentForChildren(), isClean());
        createTime_ = null;
      }
      return createTimeBuilder_;
    }

    private com.google.protobuf.Timestamp updateTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        updateTimeBuilder_;
    /**
     *
     *
     * <pre>
     * The last update timestamp of this resource, at which the resource was last
     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
     * always be 0. This field is available only when the resource's Protobuf
     * contains it.
     * To search against `update_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `updateTime &lt; 1609459200`
     *     - value in date string. Example: `updateTime &lt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `updateTime &lt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 12;</code>
     *
     * @return Whether the updateTime field is set.
     */
    public boolean hasUpdateTime() {
      return ((bitField0_ & 0x00002000) != 0);
    }
    /**
     *
     *
     * <pre>
     * The last update timestamp of this resource, at which the resource was last
     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
     * always be 0. This field is available only when the resource's Protobuf
     * contains it.
     * To search against `update_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `updateTime &lt; 1609459200`
     *     - value in date string. Example: `updateTime &lt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `updateTime &lt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 12;</code>
     *
     * @return The updateTime.
     */
    public com.google.protobuf.Timestamp getUpdateTime() {
      if (updateTimeBuilder_ == null) {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      } else {
        return updateTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The last update timestamp of this resource, at which the resource was last
     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
     * always be 0. This field is available only when the resource's Protobuf
     * contains it.
     * To search against `update_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `updateTime &lt; 1609459200`
     *     - value in date string. Example: `updateTime &lt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `updateTime &lt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 12;</code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        updateTime_ = value;
      } else {
        updateTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00002000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The last update timestamp of this resource, at which the resource was last
     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
     * always be 0. This field is available only when the resource's Protobuf
     * contains it.
     * To search against `update_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `updateTime &lt; 1609459200`
     *     - value in date string. Example: `updateTime &lt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `updateTime &lt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 12;</code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (updateTimeBuilder_ == null) {
        updateTime_ = builderForValue.build();
      } else {
        updateTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00002000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The last update timestamp of this resource, at which the resource was last
     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
     * always be 0. This field is available only when the resource's Protobuf
     * contains it.
     * To search against `update_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `updateTime &lt; 1609459200`
     *     - value in date string. Example: `updateTime &lt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `updateTime &lt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 12;</code>
     */
    public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (((bitField0_ & 0x00002000) != 0)
            && updateTime_ != null
            && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getUpdateTimeBuilder().mergeFrom(value);
        } else {
          updateTime_ = value;
        }
      } else {
        updateTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00002000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The last update timestamp of this resource, at which the resource was last
     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
     * always be 0. This field is available only when the resource's Protobuf
     * contains it.
     * To search against `update_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `updateTime &lt; 1609459200`
     *     - value in date string. Example: `updateTime &lt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `updateTime &lt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 12;</code>
     */
    public Builder clearUpdateTime() {
      bitField0_ = (bitField0_ & ~0x00002000);
      updateTime_ = null;
      if (updateTimeBuilder_ != null) {
        updateTimeBuilder_.dispose();
        updateTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The last update timestamp of this resource, at which the resource was last
     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
     * always be 0. This field is available only when the resource's Protobuf
     * contains it.
     * To search against `update_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `updateTime &lt; 1609459200`
     *     - value in date string. Example: `updateTime &lt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `updateTime &lt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 12;</code>
     */
    public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
      bitField0_ |= 0x00002000;
      onChanged();
      return getUpdateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The last update timestamp of this resource, at which the resource was last
     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
     * always be 0. This field is available only when the resource's Protobuf
     * contains it.
     * To search against `update_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `updateTime &lt; 1609459200`
     *     - value in date string. Example: `updateTime &lt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `updateTime &lt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 12;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
      if (updateTimeBuilder_ != null) {
        return updateTimeBuilder_.getMessageOrBuilder();
      } else {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * The last update timestamp of this resource, at which the resource was last
     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
     * always be 0. This field is available only when the resource's Protobuf
     * contains it.
     * To search against `update_time`:
     * * Use a field query.
     *     - value in seconds since unix epoch. Example: `updateTime &lt; 1609459200`
     *     - value in date string. Example: `updateTime &lt; 2021-01-01`
     *     - value in date-time string (must be quoted). Example: `updateTime &lt;
     *     "2021-01-01T00:00:00"`
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 12;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getUpdateTimeFieldBuilder() {
      if (updateTimeBuilder_ == null) {
        updateTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getUpdateTime(), getParentForChildren(), isClean());
        updateTime_ = null;
      }
      return updateTimeBuilder_;
    }

    private java.lang.Object state_ = "";
    /**
     *
     *
     * <pre>
     * The state of this resource. Different resources types have different state
     * definitions that are mapped from various fields of different resource
     * types. This field is available only when the resource's Protobuf contains
     * it.
     * Example:
     * If the resource is an instance provided by Compute Engine,
     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
     * in [API
     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
     * If the resource is a project provided by Resource Manager, its state
     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
     * To search against the `state`:
     * * Use a field query. Example: `state:RUNNING`
     * * Use a free text query. Example: `RUNNING`
     * </pre>
     *
     * <code>string state = 13;</code>
     *
     * @return The state.
     */
    public java.lang.String getState() {
      java.lang.Object ref = state_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        state_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The state of this resource. Different resources types have different state
     * definitions that are mapped from various fields of different resource
     * types. This field is available only when the resource's Protobuf contains
     * it.
     * Example:
     * If the resource is an instance provided by Compute Engine,
     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
     * in [API
     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
     * If the resource is a project provided by Resource Manager, its state
     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
     * To search against the `state`:
     * * Use a field query. Example: `state:RUNNING`
     * * Use a free text query. Example: `RUNNING`
     * </pre>
     *
     * <code>string state = 13;</code>
     *
     * @return The bytes for state.
     */
    public com.google.protobuf.ByteString getStateBytes() {
      java.lang.Object ref = state_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        state_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The state of this resource. Different resources types have different state
     * definitions that are mapped from various fields of different resource
     * types. This field is available only when the resource's Protobuf contains
     * it.
     * Example:
     * If the resource is an instance provided by Compute Engine,
     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
     * in [API
     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
     * If the resource is a project provided by Resource Manager, its state
     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
     * To search against the `state`:
     * * Use a field query. Example: `state:RUNNING`
     * * Use a free text query. Example: `RUNNING`
     * </pre>
     *
     * <code>string state = 13;</code>
     *
     * @param value The state to set.
     * @return This builder for chaining.
     */
    public Builder setState(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      state_ = value;
      bitField0_ |= 0x00004000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The state of this resource. Different resources types have different state
     * definitions that are mapped from various fields of different resource
     * types. This field is available only when the resource's Protobuf contains
     * it.
     * Example:
     * If the resource is an instance provided by Compute Engine,
     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
     * in [API
     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
     * If the resource is a project provided by Resource Manager, its state
     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
     * To search against the `state`:
     * * Use a field query. Example: `state:RUNNING`
     * * Use a free text query. Example: `RUNNING`
     * </pre>
     *
     * <code>string state = 13;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearState() {
      state_ = getDefaultInstance().getState();
      bitField0_ = (bitField0_ & ~0x00004000);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The state of this resource. Different resources types have different state
     * definitions that are mapped from various fields of different resource
     * types. This field is available only when the resource's Protobuf contains
     * it.
     * Example:
     * If the resource is an instance provided by Compute Engine,
     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
     * in [API
     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
     * If the resource is a project provided by Resource Manager, its state
     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
     * To search against the `state`:
     * * Use a field query. Example: `state:RUNNING`
     * * Use a free text query. Example: `RUNNING`
     * </pre>
     *
     * <code>string state = 13;</code>
     *
     * @param value The bytes for state to set.
     * @return This builder for chaining.
     */
    public Builder setStateBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      state_ = value;
      bitField0_ |= 0x00004000;
      onChanged();
      return this;
    }

    private com.google.protobuf.Struct additionalAttributes_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Struct,
            com.google.protobuf.Struct.Builder,
            com.google.protobuf.StructOrBuilder>
        additionalAttributesBuilder_;
    /**
     *
     *
     * <pre>
     * The additional searchable attributes of this resource. The attributes may
     * vary from one resource type to another. Examples: `projectId` for Project,
     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
     * metadata fields that are returned by the List or Get APIs provided by the
     * corresponding Google Cloud service (e.g., Compute Engine). see [API
     * references and supported searchable
     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
     * to see which fields are included.
     * You can search values of these fields through free text search. However,
     * you should not consume the field programically as the field names and
     * values may change as the Google Cloud service updates to a new incompatible
     * API version.
     * To search against the `additional_attributes`:
     * * Use a free text query to match the attributes values. Example: to search
     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
     *   `foobar`.
     * </pre>
     *
     * <code>.google.protobuf.Struct additional_attributes = 9;</code>
     *
     * @return Whether the additionalAttributes field is set.
     */
    public boolean hasAdditionalAttributes() {
      return ((bitField0_ & 0x00008000) != 0);
    }
    /**
     *
     *
     * <pre>
     * The additional searchable attributes of this resource. The attributes may
     * vary from one resource type to another. Examples: `projectId` for Project,
     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
     * metadata fields that are returned by the List or Get APIs provided by the
     * corresponding Google Cloud service (e.g., Compute Engine). see [API
     * references and supported searchable
     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
     * to see which fields are included.
     * You can search values of these fields through free text search. However,
     * you should not consume the field programically as the field names and
     * values may change as the Google Cloud service updates to a new incompatible
     * API version.
     * To search against the `additional_attributes`:
     * * Use a free text query to match the attributes values. Example: to search
     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
     *   `foobar`.
     * </pre>
     *
     * <code>.google.protobuf.Struct additional_attributes = 9;</code>
     *
     * @return The additionalAttributes.
     */
    public com.google.protobuf.Struct getAdditionalAttributes() {
      if (additionalAttributesBuilder_ == null) {
        return additionalAttributes_ == null
            ? com.google.protobuf.Struct.getDefaultInstance()
            : additionalAttributes_;
      } else {
        return additionalAttributesBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The additional searchable attributes of this resource. The attributes may
     * vary from one resource type to another. Examples: `projectId` for Project,
     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
     * metadata fields that are returned by the List or Get APIs provided by the
     * corresponding Google Cloud service (e.g., Compute Engine). see [API
     * references and supported searchable
     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
     * to see which fields are included.
     * You can search values of these fields through free text search. However,
     * you should not consume the field programically as the field names and
     * values may change as the Google Cloud service updates to a new incompatible
     * API version.
     * To search against the `additional_attributes`:
     * * Use a free text query to match the attributes values. Example: to search
     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
     *   `foobar`.
     * </pre>
     *
     * <code>.google.protobuf.Struct additional_attributes = 9;</code>
     */
    public Builder setAdditionalAttributes(com.google.protobuf.Struct value) {
      if (additionalAttributesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        additionalAttributes_ = value;
      } else {
        additionalAttributesBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00008000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The additional searchable attributes of this resource. The attributes may
     * vary from one resource type to another. Examples: `projectId` for Project,
     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
     * metadata fields that are returned by the List or Get APIs provided by the
     * corresponding Google Cloud service (e.g., Compute Engine). see [API
     * references and supported searchable
     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
     * to see which fields are included.
     * You can search values of these fields through free text search. However,
     * you should not consume the field programically as the field names and
     * values may change as the Google Cloud service updates to a new incompatible
     * API version.
     * To search against the `additional_attributes`:
     * * Use a free text query to match the attributes values. Example: to search
     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
     *   `foobar`.
     * </pre>
     *
     * <code>.google.protobuf.Struct additional_attributes = 9;</code>
     */
    public Builder setAdditionalAttributes(com.google.protobuf.Struct.Builder builderForValue) {
      if (additionalAttributesBuilder_ == null) {
        additionalAttributes_ = builderForValue.build();
      } else {
        additionalAttributesBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00008000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The additional searchable attributes of this resource. The attributes may
     * vary from one resource type to another. Examples: `projectId` for Project,
     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
     * metadata fields that are returned by the List or Get APIs provided by the
     * corresponding Google Cloud service (e.g., Compute Engine). see [API
     * references and supported searchable
     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
     * to see which fields are included.
     * You can search values of these fields through free text search. However,
     * you should not consume the field programically as the field names and
     * values may change as the Google Cloud service updates to a new incompatible
     * API version.
     * To search against the `additional_attributes`:
     * * Use a free text query to match the attributes values. Example: to search
     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
     *   `foobar`.
     * </pre>
     *
     * <code>.google.protobuf.Struct additional_attributes = 9;</code>
     */
    public Builder mergeAdditionalAttributes(com.google.protobuf.Struct value) {
      if (additionalAttributesBuilder_ == null) {
        if (((bitField0_ & 0x00008000) != 0)
            && additionalAttributes_ != null
            && additionalAttributes_ != com.google.protobuf.Struct.getDefaultInstance()) {
          getAdditionalAttributesBuilder().mergeFrom(value);
        } else {
          additionalAttributes_ = value;
        }
      } else {
        additionalAttributesBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00008000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The additional searchable attributes of this resource. The attributes may
     * vary from one resource type to another. Examples: `projectId` for Project,
     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
     * metadata fields that are returned by the List or Get APIs provided by the
     * corresponding Google Cloud service (e.g., Compute Engine). see [API
     * references and supported searchable
     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
     * to see which fields are included.
     * You can search values of these fields through free text search. However,
     * you should not consume the field programically as the field names and
     * values may change as the Google Cloud service updates to a new incompatible
     * API version.
     * To search against the `additional_attributes`:
     * * Use a free text query to match the attributes values. Example: to search
     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
     *   `foobar`.
     * </pre>
     *
     * <code>.google.protobuf.Struct additional_attributes = 9;</code>
     */
    public Builder clearAdditionalAttributes() {
      bitField0_ = (bitField0_ & ~0x00008000);
      additionalAttributes_ = null;
      if (additionalAttributesBuilder_ != null) {
        additionalAttributesBuilder_.dispose();
        additionalAttributesBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The additional searchable attributes of this resource. The attributes may
     * vary from one resource type to another. Examples: `projectId` for Project,
     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
     * metadata fields that are returned by the List or Get APIs provided by the
     * corresponding Google Cloud service (e.g., Compute Engine). see [API
     * references and supported searchable
     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
     * to see which fields are included.
     * You can search values of these fields through free text search. However,
     * you should not consume the field programically as the field names and
     * values may change as the Google Cloud service updates to a new incompatible
     * API version.
     * To search against the `additional_attributes`:
     * * Use a free text query to match the attributes values. Example: to search
     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
     *   `foobar`.
     * </pre>
     *
     * <code>.google.protobuf.Struct additional_attributes = 9;</code>
     */
    public com.google.protobuf.Struct.Builder getAdditionalAttributesBuilder() {
      bitField0_ |= 0x00008000;
      onChanged();
      return getAdditionalAttributesFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The additional searchable attributes of this resource. The attributes may
     * vary from one resource type to another. Examples: `projectId` for Project,
     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
     * metadata fields that are returned by the List or Get APIs provided by the
     * corresponding Google Cloud service (e.g., Compute Engine). see [API
     * references and supported searchable
     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
     * to see which fields are included.
     * You can search values of these fields through free text search. However,
     * you should not consume the field programically as the field names and
     * values may change as the Google Cloud service updates to a new incompatible
     * API version.
     * To search against the `additional_attributes`:
     * * Use a free text query to match the attributes values. Example: to search
     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
     *   `foobar`.
     * </pre>
     *
     * <code>.google.protobuf.Struct additional_attributes = 9;</code>
     */
    public com.google.protobuf.StructOrBuilder getAdditionalAttributesOrBuilder() {
      if (additionalAttributesBuilder_ != null) {
        return additionalAttributesBuilder_.getMessageOrBuilder();
      } else {
        return additionalAttributes_ == null
            ? com.google.protobuf.Struct.getDefaultInstance()
            : additionalAttributes_;
      }
    }
    /**
     *
     *
     * <pre>
     * The additional searchable attributes of this resource. The attributes may
     * vary from one resource type to another. Examples: `projectId` for Project,
     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
     * metadata fields that are returned by the List or Get APIs provided by the
     * corresponding Google Cloud service (e.g., Compute Engine). see [API
     * references and supported searchable
     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
     * to see which fields are included.
     * You can search values of these fields through free text search. However,
     * you should not consume the field programically as the field names and
     * values may change as the Google Cloud service updates to a new incompatible
     * API version.
     * To search against the `additional_attributes`:
     * * Use a free text query to match the attributes values. Example: to search
     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
     *   `foobar`.
     * </pre>
     *
     * <code>.google.protobuf.Struct additional_attributes = 9;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Struct,
            com.google.protobuf.Struct.Builder,
            com.google.protobuf.StructOrBuilder>
        getAdditionalAttributesFieldBuilder() {
      if (additionalAttributesBuilder_ == null) {
        additionalAttributesBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Struct,
                com.google.protobuf.Struct.Builder,
                com.google.protobuf.StructOrBuilder>(
                getAdditionalAttributes(), getParentForChildren(), isClean());
        additionalAttributes_ = null;
      }
      return additionalAttributesBuilder_;
    }

    private java.lang.Object parentFullResourceName_ = "";
    /**
     *
     *
     * <pre>
     * The full resource name of this resource's parent, if it has one.
     * To search against the `parent_full_resource_name`:
     * * Use a field query. Example:
     * `parentFullResourceName:"project-name"`
     * * Use a free text query. Example:
     * `project-name`
     * </pre>
     *
     * <code>string parent_full_resource_name = 19;</code>
     *
     * @return The parentFullResourceName.
     */
    public java.lang.String getParentFullResourceName() {
      java.lang.Object ref = parentFullResourceName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        parentFullResourceName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The full resource name of this resource's parent, if it has one.
     * To search against the `parent_full_resource_name`:
     * * Use a field query. Example:
     * `parentFullResourceName:"project-name"`
     * * Use a free text query. Example:
     * `project-name`
     * </pre>
     *
     * <code>string parent_full_resource_name = 19;</code>
     *
     * @return The bytes for parentFullResourceName.
     */
    public com.google.protobuf.ByteString getParentFullResourceNameBytes() {
      java.lang.Object ref = parentFullResourceName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        parentFullResourceName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The full resource name of this resource's parent, if it has one.
     * To search against the `parent_full_resource_name`:
     * * Use a field query. Example:
     * `parentFullResourceName:"project-name"`
     * * Use a free text query. Example:
     * `project-name`
     * </pre>
     *
     * <code>string parent_full_resource_name = 19;</code>
     *
     * @param value The parentFullResourceName to set.
     * @return This builder for chaining.
     */
    public Builder setParentFullResourceName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      parentFullResourceName_ = value;
      bitField0_ |= 0x00010000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The full resource name of this resource's parent, if it has one.
     * To search against the `parent_full_resource_name`:
     * * Use a field query. Example:
     * `parentFullResourceName:"project-name"`
     * * Use a free text query. Example:
     * `project-name`
     * </pre>
     *
     * <code>string parent_full_resource_name = 19;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearParentFullResourceName() {
      parentFullResourceName_ = getDefaultInstance().getParentFullResourceName();
      bitField0_ = (bitField0_ & ~0x00010000);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The full resource name of this resource's parent, if it has one.
     * To search against the `parent_full_resource_name`:
     * * Use a field query. Example:
     * `parentFullResourceName:"project-name"`
     * * Use a free text query. Example:
     * `project-name`
     * </pre>
     *
     * <code>string parent_full_resource_name = 19;</code>
     *
     * @param value The bytes for parentFullResourceName to set.
     * @return This builder for chaining.
     */
    public Builder setParentFullResourceNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      parentFullResourceName_ = value;
      bitField0_ |= 0x00010000;
      onChanged();
      return this;
    }

    private java.util.List<com.google.cloud.asset.v1.VersionedResource> versionedResources_ =
        java.util.Collections.emptyList();

    private void ensureVersionedResourcesIsMutable() {
      if (!((bitField0_ & 0x00020000) != 0)) {
        versionedResources_ =
            new java.util.ArrayList<com.google.cloud.asset.v1.VersionedResource>(
                versionedResources_);
        bitField0_ |= 0x00020000;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.asset.v1.VersionedResource,
            com.google.cloud.asset.v1.VersionedResource.Builder,
            com.google.cloud.asset.v1.VersionedResourceOrBuilder>
        versionedResourcesBuilder_;

    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public java.util.List<com.google.cloud.asset.v1.VersionedResource> getVersionedResourcesList() {
      if (versionedResourcesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(versionedResources_);
      } else {
        return versionedResourcesBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public int getVersionedResourcesCount() {
      if (versionedResourcesBuilder_ == null) {
        return versionedResources_.size();
      } else {
        return versionedResourcesBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public com.google.cloud.asset.v1.VersionedResource getVersionedResources(int index) {
      if (versionedResourcesBuilder_ == null) {
        return versionedResources_.get(index);
      } else {
        return versionedResourcesBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public Builder setVersionedResources(
        int index, com.google.cloud.asset.v1.VersionedResource value) {
      if (versionedResourcesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureVersionedResourcesIsMutable();
        versionedResources_.set(index, value);
        onChanged();
      } else {
        versionedResourcesBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public Builder setVersionedResources(
        int index, com.google.cloud.asset.v1.VersionedResource.Builder builderForValue) {
      if (versionedResourcesBuilder_ == null) {
        ensureVersionedResourcesIsMutable();
        versionedResources_.set(index, builderForValue.build());
        onChanged();
      } else {
        versionedResourcesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public Builder addVersionedResources(com.google.cloud.asset.v1.VersionedResource value) {
      if (versionedResourcesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureVersionedResourcesIsMutable();
        versionedResources_.add(value);
        onChanged();
      } else {
        versionedResourcesBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public Builder addVersionedResources(
        int index, com.google.cloud.asset.v1.VersionedResource value) {
      if (versionedResourcesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureVersionedResourcesIsMutable();
        versionedResources_.add(index, value);
        onChanged();
      } else {
        versionedResourcesBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public Builder addVersionedResources(
        com.google.cloud.asset.v1.VersionedResource.Builder builderForValue) {
      if (versionedResourcesBuilder_ == null) {
        ensureVersionedResourcesIsMutable();
        versionedResources_.add(builderForValue.build());
        onChanged();
      } else {
        versionedResourcesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public Builder addVersionedResources(
        int index, com.google.cloud.asset.v1.VersionedResource.Builder builderForValue) {
      if (versionedResourcesBuilder_ == null) {
        ensureVersionedResourcesIsMutable();
        versionedResources_.add(index, builderForValue.build());
        onChanged();
      } else {
        versionedResourcesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public Builder addAllVersionedResources(
        java.lang.Iterable<? extends com.google.cloud.asset.v1.VersionedResource> values) {
      if (versionedResourcesBuilder_ == null) {
        ensureVersionedResourcesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, versionedResources_);
        onChanged();
      } else {
        versionedResourcesBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public Builder clearVersionedResources() {
      if (versionedResourcesBuilder_ == null) {
        versionedResources_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00020000);
        onChanged();
      } else {
        versionedResourcesBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public Builder removeVersionedResources(int index) {
      if (versionedResourcesBuilder_ == null) {
        ensureVersionedResourcesIsMutable();
        versionedResources_.remove(index);
        onChanged();
      } else {
        versionedResourcesBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public com.google.cloud.asset.v1.VersionedResource.Builder getVersionedResourcesBuilder(
        int index) {
      return getVersionedResourcesFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public com.google.cloud.asset.v1.VersionedResourceOrBuilder getVersionedResourcesOrBuilder(
        int index) {
      if (versionedResourcesBuilder_ == null) {
        return versionedResources_.get(index);
      } else {
        return versionedResourcesBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public java.util.List<? extends com.google.cloud.asset.v1.VersionedResourceOrBuilder>
        getVersionedResourcesOrBuilderList() {
      if (versionedResourcesBuilder_ != null) {
        return versionedResourcesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(versionedResources_);
      }
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public com.google.cloud.asset.v1.VersionedResource.Builder addVersionedResourcesBuilder() {
      return getVersionedResourcesFieldBuilder()
          .addBuilder(com.google.cloud.asset.v1.VersionedResource.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public com.google.cloud.asset.v1.VersionedResource.Builder addVersionedResourcesBuilder(
        int index) {
      return getVersionedResourcesFieldBuilder()
          .addBuilder(index, com.google.cloud.asset.v1.VersionedResource.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Versioned resource representations of this resource. This is repeated
     * because there could be multiple versions of resource representations during
     * version migration.
     * This `versioned_resources` field is not searchable. Some attributes of the
     * resource representations are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16;</code>
     */
    public java.util.List<com.google.cloud.asset.v1.VersionedResource.Builder>
        getVersionedResourcesBuilderList() {
      return getVersionedResourcesFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.asset.v1.VersionedResource,
            com.google.cloud.asset.v1.VersionedResource.Builder,
            com.google.cloud.asset.v1.VersionedResourceOrBuilder>
        getVersionedResourcesFieldBuilder() {
      if (versionedResourcesBuilder_ == null) {
        versionedResourcesBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.asset.v1.VersionedResource,
                com.google.cloud.asset.v1.VersionedResource.Builder,
                com.google.cloud.asset.v1.VersionedResourceOrBuilder>(
                versionedResources_,
                ((bitField0_ & 0x00020000) != 0),
                getParentForChildren(),
                isClean());
        versionedResources_ = null;
      }
      return versionedResourcesBuilder_;
    }

    private java.util.List<com.google.cloud.asset.v1.AttachedResource> attachedResources_ =
        java.util.Collections.emptyList();

    private void ensureAttachedResourcesIsMutable() {
      if (!((bitField0_ & 0x00040000) != 0)) {
        attachedResources_ =
            new java.util.ArrayList<com.google.cloud.asset.v1.AttachedResource>(attachedResources_);
        bitField0_ |= 0x00040000;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.asset.v1.AttachedResource,
            com.google.cloud.asset.v1.AttachedResource.Builder,
            com.google.cloud.asset.v1.AttachedResourceOrBuilder>
        attachedResourcesBuilder_;

    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public java.util.List<com.google.cloud.asset.v1.AttachedResource> getAttachedResourcesList() {
      if (attachedResourcesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(attachedResources_);
      } else {
        return attachedResourcesBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public int getAttachedResourcesCount() {
      if (attachedResourcesBuilder_ == null) {
        return attachedResources_.size();
      } else {
        return attachedResourcesBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public com.google.cloud.asset.v1.AttachedResource getAttachedResources(int index) {
      if (attachedResourcesBuilder_ == null) {
        return attachedResources_.get(index);
      } else {
        return attachedResourcesBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public Builder setAttachedResources(
        int index, com.google.cloud.asset.v1.AttachedResource value) {
      if (attachedResourcesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAttachedResourcesIsMutable();
        attachedResources_.set(index, value);
        onChanged();
      } else {
        attachedResourcesBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public Builder setAttachedResources(
        int index, com.google.cloud.asset.v1.AttachedResource.Builder builderForValue) {
      if (attachedResourcesBuilder_ == null) {
        ensureAttachedResourcesIsMutable();
        attachedResources_.set(index, builderForValue.build());
        onChanged();
      } else {
        attachedResourcesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public Builder addAttachedResources(com.google.cloud.asset.v1.AttachedResource value) {
      if (attachedResourcesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAttachedResourcesIsMutable();
        attachedResources_.add(value);
        onChanged();
      } else {
        attachedResourcesBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public Builder addAttachedResources(
        int index, com.google.cloud.asset.v1.AttachedResource value) {
      if (attachedResourcesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAttachedResourcesIsMutable();
        attachedResources_.add(index, value);
        onChanged();
      } else {
        attachedResourcesBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public Builder addAttachedResources(
        com.google.cloud.asset.v1.AttachedResource.Builder builderForValue) {
      if (attachedResourcesBuilder_ == null) {
        ensureAttachedResourcesIsMutable();
        attachedResources_.add(builderForValue.build());
        onChanged();
      } else {
        attachedResourcesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public Builder addAttachedResources(
        int index, com.google.cloud.asset.v1.AttachedResource.Builder builderForValue) {
      if (attachedResourcesBuilder_ == null) {
        ensureAttachedResourcesIsMutable();
        attachedResources_.add(index, builderForValue.build());
        onChanged();
      } else {
        attachedResourcesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public Builder addAllAttachedResources(
        java.lang.Iterable<? extends com.google.cloud.asset.v1.AttachedResource> values) {
      if (attachedResourcesBuilder_ == null) {
        ensureAttachedResourcesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attachedResources_);
        onChanged();
      } else {
        attachedResourcesBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public Builder clearAttachedResources() {
      if (attachedResourcesBuilder_ == null) {
        attachedResources_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00040000);
        onChanged();
      } else {
        attachedResourcesBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public Builder removeAttachedResources(int index) {
      if (attachedResourcesBuilder_ == null) {
        ensureAttachedResourcesIsMutable();
        attachedResources_.remove(index);
        onChanged();
      } else {
        attachedResourcesBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public com.google.cloud.asset.v1.AttachedResource.Builder getAttachedResourcesBuilder(
        int index) {
      return getAttachedResourcesFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public com.google.cloud.asset.v1.AttachedResourceOrBuilder getAttachedResourcesOrBuilder(
        int index) {
      if (attachedResourcesBuilder_ == null) {
        return attachedResources_.get(index);
      } else {
        return attachedResourcesBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public java.util.List<? extends com.google.cloud.asset.v1.AttachedResourceOrBuilder>
        getAttachedResourcesOrBuilderList() {
      if (attachedResourcesBuilder_ != null) {
        return attachedResourcesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(attachedResources_);
      }
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public com.google.cloud.asset.v1.AttachedResource.Builder addAttachedResourcesBuilder() {
      return getAttachedResourcesFieldBuilder()
          .addBuilder(com.google.cloud.asset.v1.AttachedResource.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public com.google.cloud.asset.v1.AttachedResource.Builder addAttachedResourcesBuilder(
        int index) {
      return getAttachedResourcesFieldBuilder()
          .addBuilder(index, com.google.cloud.asset.v1.AttachedResource.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Attached resources of this resource. For example, an OSConfig
     * Inventory is an attached resource of a Compute Instance. This field is
     * repeated because a resource could have multiple attached resources.
     * This `attached_resources` field is not searchable. Some attributes
     * of the attached resources are exposed in `additional_attributes` field, so
     * as to allow users to search on them.
     * </pre>
     *
     * <code>repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20;</code>
     */
    public java.util.List<com.google.cloud.asset.v1.AttachedResource.Builder>
        getAttachedResourcesBuilderList() {
      return getAttachedResourcesFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.asset.v1.AttachedResource,
            com.google.cloud.asset.v1.AttachedResource.Builder,
            com.google.cloud.asset.v1.AttachedResourceOrBuilder>
        getAttachedResourcesFieldBuilder() {
      if (attachedResourcesBuilder_ == null) {
        attachedResourcesBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.asset.v1.AttachedResource,
                com.google.cloud.asset.v1.AttachedResource.Builder,
                com.google.cloud.asset.v1.AttachedResourceOrBuilder>(
                attachedResources_,
                ((bitField0_ & 0x00040000) != 0),
                getParentForChildren(),
                isClean());
        attachedResources_ = null;
      }
      return attachedResourcesBuilder_;
    }

    private com.google.protobuf.MapField<
            java.lang.String, com.google.cloud.asset.v1.RelatedResources>
        relationships_;

    private com.google.protobuf.MapField<
            java.lang.String, com.google.cloud.asset.v1.RelatedResources>
        internalGetRelationships() {
      if (relationships_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            RelationshipsDefaultEntryHolder.defaultEntry);
      }
      return relationships_;
    }

    private com.google.protobuf.MapField<
            java.lang.String, com.google.cloud.asset.v1.RelatedResources>
        internalGetMutableRelationships() {
      if (relationships_ == null) {
        relationships_ =
            com.google.protobuf.MapField.newMapField(RelationshipsDefaultEntryHolder.defaultEntry);
      }
      if (!relationships_.isMutable()) {
        relationships_ = relationships_.copy();
      }
      bitField0_ |= 0x00080000;
      onChanged();
      return relationships_;
    }

    public int getRelationshipsCount() {
      return internalGetRelationships().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * A map of related resources of this resource, keyed by the
     * relationship type. A relationship type is in the format of
     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
     * See [supported relationship
     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
     * </pre>
     *
     * <code>map&lt;string, .google.cloud.asset.v1.RelatedResources&gt; relationships = 21;</code>
     */
    @java.lang.Override
    public boolean containsRelationships(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetRelationships().getMap().containsKey(key);
    }
    /** Use {@link #getRelationshipsMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, com.google.cloud.asset.v1.RelatedResources>
        getRelationships() {
      return getRelationshipsMap();
    }
    /**
     *
     *
     * <pre>
     * A map of related resources of this resource, keyed by the
     * relationship type. A relationship type is in the format of
     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
     * See [supported relationship
     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
     * </pre>
     *
     * <code>map&lt;string, .google.cloud.asset.v1.RelatedResources&gt; relationships = 21;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, com.google.cloud.asset.v1.RelatedResources>
        getRelationshipsMap() {
      return internalGetRelationships().getMap();
    }
    /**
     *
     *
     * <pre>
     * A map of related resources of this resource, keyed by the
     * relationship type. A relationship type is in the format of
     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
     * See [supported relationship
     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
     * </pre>
     *
     * <code>map&lt;string, .google.cloud.asset.v1.RelatedResources&gt; relationships = 21;</code>
     */
    @java.lang.Override
    public /* nullable */ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault(
        java.lang.String key,
        /* nullable */
        com.google.cloud.asset.v1.RelatedResources defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, com.google.cloud.asset.v1.RelatedResources> map =
          internalGetRelationships().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * A map of related resources of this resource, keyed by the
     * relationship type. A relationship type is in the format of
     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
     * See [supported relationship
     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
     * </pre>
     *
     * <code>map&lt;string, .google.cloud.asset.v1.RelatedResources&gt; relationships = 21;</code>
     */
    @java.lang.Override
    public com.google.cloud.asset.v1.RelatedResources getRelationshipsOrThrow(
        java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, com.google.cloud.asset.v1.RelatedResources> map =
          internalGetRelationships().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearRelationships() {
      bitField0_ = (bitField0_ & ~0x00080000);
      internalGetMutableRelationships().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A map of related resources of this resource, keyed by the
     * relationship type. A relationship type is in the format of
     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
     * See [supported relationship
     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
     * </pre>
     *
     * <code>map&lt;string, .google.cloud.asset.v1.RelatedResources&gt; relationships = 21;</code>
     */
    public Builder removeRelationships(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableRelationships().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, com.google.cloud.asset.v1.RelatedResources>
        getMutableRelationships() {
      bitField0_ |= 0x00080000;
      return internalGetMutableRelationships().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * A map of related resources of this resource, keyed by the
     * relationship type. A relationship type is in the format of
     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
     * See [supported relationship
     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
     * </pre>
     *
     * <code>map&lt;string, .google.cloud.asset.v1.RelatedResources&gt; relationships = 21;</code>
     */
    public Builder putRelationships(
        java.lang.String key, com.google.cloud.asset.v1.RelatedResources value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }
      internalGetMutableRelationships().getMutableMap().put(key, value);
      bitField0_ |= 0x00080000;
      return this;
    }
    /**
     *
     *
     * <pre>
     * A map of related resources of this resource, keyed by the
     * relationship type. A relationship type is in the format of
     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
     * See [supported relationship
     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
     * </pre>
     *
     * <code>map&lt;string, .google.cloud.asset.v1.RelatedResources&gt; relationships = 21;</code>
     */
    public Builder putAllRelationships(
        java.util.Map<java.lang.String, com.google.cloud.asset.v1.RelatedResources> values) {
      internalGetMutableRelationships().getMutableMap().putAll(values);
      bitField0_ |= 0x00080000;
      return this;
    }

    private com.google.protobuf.LazyStringList tagKeys_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureTagKeysIsMutable() {
      if (!((bitField0_ & 0x00100000) != 0)) {
        tagKeys_ = new com.google.protobuf.LazyStringArrayList(tagKeys_);
        bitField0_ |= 0x00100000;
      }
    }
    /**
     *
     *
     * <pre>
     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
     * To search against the `tagKeys`:
     * * Use a field query. Example:
     *     - `tagKeys:"123456789/env*"`
     *     - `tagKeys="123456789/env"`
     *     - `tagKeys:"env"`
     * * Use a free text query. Example:
     *     - `env`
     * </pre>
     *
     * <code>repeated string tag_keys = 23;</code>
     *
     * @return A list containing the tagKeys.
     */
    public com.google.protobuf.ProtocolStringList getTagKeysList() {
      return tagKeys_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
     * To search against the `tagKeys`:
     * * Use a field query. Example:
     *     - `tagKeys:"123456789/env*"`
     *     - `tagKeys="123456789/env"`
     *     - `tagKeys:"env"`
     * * Use a free text query. Example:
     *     - `env`
     * </pre>
     *
     * <code>repeated string tag_keys = 23;</code>
     *
     * @return The count of tagKeys.
     */
    public int getTagKeysCount() {
      return tagKeys_.size();
    }
    /**
     *
     *
     * <pre>
     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
     * To search against the `tagKeys`:
     * * Use a field query. Example:
     *     - `tagKeys:"123456789/env*"`
     *     - `tagKeys="123456789/env"`
     *     - `tagKeys:"env"`
     * * Use a free text query. Example:
     *     - `env`
     * </pre>
     *
     * <code>repeated string tag_keys = 23;</code>
     *
     * @param index The index of the element to return.
     * @return The tagKeys at the given index.
     */
    public java.lang.String getTagKeys(int index) {
      return tagKeys_.get(index);
    }
    /**
     *
     *
     * <pre>
     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
     * To search against the `tagKeys`:
     * * Use a field query. Example:
     *     - `tagKeys:"123456789/env*"`
     *     - `tagKeys="123456789/env"`
     *     - `tagKeys:"env"`
     * * Use a free text query. Example:
     *     - `env`
     * </pre>
     *
     * <code>repeated string tag_keys = 23;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the tagKeys at the given index.
     */
    public com.google.protobuf.ByteString getTagKeysBytes(int index) {
      return tagKeys_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
     * To search against the `tagKeys`:
     * * Use a field query. Example:
     *     - `tagKeys:"123456789/env*"`
     *     - `tagKeys="123456789/env"`
     *     - `tagKeys:"env"`
     * * Use a free text query. Example:
     *     - `env`
     * </pre>
     *
     * <code>repeated string tag_keys = 23;</code>
     *
     * @param index The index to set the value at.
     * @param value The tagKeys to set.
     * @return This builder for chaining.
     */
    public Builder setTagKeys(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureTagKeysIsMutable();
      tagKeys_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
     * To search against the `tagKeys`:
     * * Use a field query. Example:
     *     - `tagKeys:"123456789/env*"`
     *     - `tagKeys="123456789/env"`
     *     - `tagKeys:"env"`
     * * Use a free text query. Example:
     *     - `env`
     * </pre>
     *
     * <code>repeated string tag_keys = 23;</code>
     *
     * @param value The tagKeys to add.
     * @return This builder for chaining.
     */
    public Builder addTagKeys(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureTagKeysIsMutable();
      tagKeys_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
     * To search against the `tagKeys`:
     * * Use a field query. Example:
     *     - `tagKeys:"123456789/env*"`
     *     - `tagKeys="123456789/env"`
     *     - `tagKeys:"env"`
     * * Use a free text query. Example:
     *     - `env`
     * </pre>
     *
     * <code>repeated string tag_keys = 23;</code>
     *
     * @param values The tagKeys to add.
     * @return This builder for chaining.
     */
    public Builder addAllTagKeys(java.lang.Iterable<java.lang.String> values) {
      ensureTagKeysIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tagKeys_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
     * To search against the `tagKeys`:
     * * Use a field query. Example:
     *     - `tagKeys:"123456789/env*"`
     *     - `tagKeys="123456789/env"`
     *     - `tagKeys:"env"`
     * * Use a free text query. Example:
     *     - `env`
     * </pre>
     *
     * <code>repeated string tag_keys = 23;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearTagKeys() {
      tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00100000);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
     * To search against the `tagKeys`:
     * * Use a field query. Example:
     *     - `tagKeys:"123456789/env*"`
     *     - `tagKeys="123456789/env"`
     *     - `tagKeys:"env"`
     * * Use a free text query. Example:
     *     - `env`
     * </pre>
     *
     * <code>repeated string tag_keys = 23;</code>
     *
     * @param value The bytes of the tagKeys to add.
     * @return This builder for chaining.
     */
    public Builder addTagKeysBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureTagKeysIsMutable();
      tagKeys_.add(value);
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList tagValues_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureTagValuesIsMutable() {
      if (!((bitField0_ & 0x00200000) != 0)) {
        tagValues_ = new com.google.protobuf.LazyStringArrayList(tagValues_);
        bitField0_ |= 0x00200000;
      }
    }
    /**
     *
     *
     * <pre>
     * TagValue namespaced names, in the format of
     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
     * To search against the `tagValues`:
     * * Use a field query. Example:
     *     - `tagValues:"env"`
     *     - `tagValues:"env/prod"`
     *     - `tagValues:"123456789/env/prod*"`
     *     - `tagValues="123456789/env/prod"`
     * * Use a free text query. Example:
     *     - `prod`
     * </pre>
     *
     * <code>repeated string tag_values = 25;</code>
     *
     * @return A list containing the tagValues.
     */
    public com.google.protobuf.ProtocolStringList getTagValuesList() {
      return tagValues_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * TagValue namespaced names, in the format of
     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
     * To search against the `tagValues`:
     * * Use a field query. Example:
     *     - `tagValues:"env"`
     *     - `tagValues:"env/prod"`
     *     - `tagValues:"123456789/env/prod*"`
     *     - `tagValues="123456789/env/prod"`
     * * Use a free text query. Example:
     *     - `prod`
     * </pre>
     *
     * <code>repeated string tag_values = 25;</code>
     *
     * @return The count of tagValues.
     */
    public int getTagValuesCount() {
      return tagValues_.size();
    }
    /**
     *
     *
     * <pre>
     * TagValue namespaced names, in the format of
     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
     * To search against the `tagValues`:
     * * Use a field query. Example:
     *     - `tagValues:"env"`
     *     - `tagValues:"env/prod"`
     *     - `tagValues:"123456789/env/prod*"`
     *     - `tagValues="123456789/env/prod"`
     * * Use a free text query. Example:
     *     - `prod`
     * </pre>
     *
     * <code>repeated string tag_values = 25;</code>
     *
     * @param index The index of the element to return.
     * @return The tagValues at the given index.
     */
    public java.lang.String getTagValues(int index) {
      return tagValues_.get(index);
    }
    /**
     *
     *
     * <pre>
     * TagValue namespaced names, in the format of
     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
     * To search against the `tagValues`:
     * * Use a field query. Example:
     *     - `tagValues:"env"`
     *     - `tagValues:"env/prod"`
     *     - `tagValues:"123456789/env/prod*"`
     *     - `tagValues="123456789/env/prod"`
     * * Use a free text query. Example:
     *     - `prod`
     * </pre>
     *
     * <code>repeated string tag_values = 25;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the tagValues at the given index.
     */
    public com.google.protobuf.ByteString getTagValuesBytes(int index) {
      return tagValues_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * TagValue namespaced names, in the format of
     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
     * To search against the `tagValues`:
     * * Use a field query. Example:
     *     - `tagValues:"env"`
     *     - `tagValues:"env/prod"`
     *     - `tagValues:"123456789/env/prod*"`
     *     - `tagValues="123456789/env/prod"`
     * * Use a free text query. Example:
     *     - `prod`
     * </pre>
     *
     * <code>repeated string tag_values = 25;</code>
     *
     * @param index The index to set the value at.
     * @param value The tagValues to set.
     * @return This builder for chaining.
     */
    public Builder setTagValues(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureTagValuesIsMutable();
      tagValues_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * TagValue namespaced names, in the format of
     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
     * To search against the `tagValues`:
     * * Use a field query. Example:
     *     - `tagValues:"env"`
     *     - `tagValues:"env/prod"`
     *     - `tagValues:"123456789/env/prod*"`
     *     - `tagValues="123456789/env/prod"`
     * * Use a free text query. Example:
     *     - `prod`
     * </pre>
     *
     * <code>repeated string tag_values = 25;</code>
     *
     * @param value The tagValues to add.
     * @return This builder for chaining.
     */
    public Builder addTagValues(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureTagValuesIsMutable();
      tagValues_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * TagValue namespaced names, in the format of
     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
     * To search against the `tagValues`:
     * * Use a field query. Example:
     *     - `tagValues:"env"`
     *     - `tagValues:"env/prod"`
     *     - `tagValues:"123456789/env/prod*"`
     *     - `tagValues="123456789/env/prod"`
     * * Use a free text query. Example:
     *     - `prod`
     * </pre>
     *
     * <code>repeated string tag_values = 25;</code>
     *
     * @param values The tagValues to add.
     * @return This builder for chaining.
     */
    public Builder addAllTagValues(java.lang.Iterable<java.lang.String> values) {
      ensureTagValuesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tagValues_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * TagValue namespaced names, in the format of
     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
     * To search against the `tagValues`:
     * * Use a field query. Example:
     *     - `tagValues:"env"`
     *     - `tagValues:"env/prod"`
     *     - `tagValues:"123456789/env/prod*"`
     *     - `tagValues="123456789/env/prod"`
     * * Use a free text query. Example:
     *     - `prod`
     * </pre>
     *
     * <code>repeated string tag_values = 25;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearTagValues() {
      tagValues_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00200000);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * TagValue namespaced names, in the format of
     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
     * To search against the `tagValues`:
     * * Use a field query. Example:
     *     - `tagValues:"env"`
     *     - `tagValues:"env/prod"`
     *     - `tagValues:"123456789/env/prod*"`
     *     - `tagValues="123456789/env/prod"`
     * * Use a free text query. Example:
     *     - `prod`
     * </pre>
     *
     * <code>repeated string tag_values = 25;</code>
     *
     * @param value The bytes of the tagValues to add.
     * @return This builder for chaining.
     */
    public Builder addTagValuesBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureTagValuesIsMutable();
      tagValues_.add(value);
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList tagValueIds_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureTagValueIdsIsMutable() {
      if (!((bitField0_ & 0x00400000) != 0)) {
        tagValueIds_ = new com.google.protobuf.LazyStringArrayList(tagValueIds_);
        bitField0_ |= 0x00400000;
      }
    }
    /**
     *
     *
     * <pre>
     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
     * To search against the `tagValueIds`:
     * * Use a field query. Example:
     *     - `tagValueIds:"456"`
     *     - `tagValueIds="tagValues/456"`
     * * Use a free text query. Example:
     *     - `456`
     * </pre>
     *
     * <code>repeated string tag_value_ids = 26;</code>
     *
     * @return A list containing the tagValueIds.
     */
    public com.google.protobuf.ProtocolStringList getTagValueIdsList() {
      return tagValueIds_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
     * To search against the `tagValueIds`:
     * * Use a field query. Example:
     *     - `tagValueIds:"456"`
     *     - `tagValueIds="tagValues/456"`
     * * Use a free text query. Example:
     *     - `456`
     * </pre>
     *
     * <code>repeated string tag_value_ids = 26;</code>
     *
     * @return The count of tagValueIds.
     */
    public int getTagValueIdsCount() {
      return tagValueIds_.size();
    }
    /**
     *
     *
     * <pre>
     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
     * To search against the `tagValueIds`:
     * * Use a field query. Example:
     *     - `tagValueIds:"456"`
     *     - `tagValueIds="tagValues/456"`
     * * Use a free text query. Example:
     *     - `456`
     * </pre>
     *
     * <code>repeated string tag_value_ids = 26;</code>
     *
     * @param index The index of the element to return.
     * @return The tagValueIds at the given index.
     */
    public java.lang.String getTagValueIds(int index) {
      return tagValueIds_.get(index);
    }
    /**
     *
     *
     * <pre>
     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
     * To search against the `tagValueIds`:
     * * Use a field query. Example:
     *     - `tagValueIds:"456"`
     *     - `tagValueIds="tagValues/456"`
     * * Use a free text query. Example:
     *     - `456`
     * </pre>
     *
     * <code>repeated string tag_value_ids = 26;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the tagValueIds at the given index.
     */
    public com.google.protobuf.ByteString getTagValueIdsBytes(int index) {
      return tagValueIds_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
     * To search against the `tagValueIds`:
     * * Use a field query. Example:
     *     - `tagValueIds:"456"`
     *     - `tagValueIds="tagValues/456"`
     * * Use a free text query. Example:
     *     - `456`
     * </pre>
     *
     * <code>repeated string tag_value_ids = 26;</code>
     *
     * @param index The index to set the value at.
     * @param value The tagValueIds to set.
     * @return This builder for chaining.
     */
    public Builder setTagValueIds(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureTagValueIdsIsMutable();
      tagValueIds_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
     * To search against the `tagValueIds`:
     * * Use a field query. Example:
     *     - `tagValueIds:"456"`
     *     - `tagValueIds="tagValues/456"`
     * * Use a free text query. Example:
     *     - `456`
     * </pre>
     *
     * <code>repeated string tag_value_ids = 26;</code>
     *
     * @param value The tagValueIds to add.
     * @return This builder for chaining.
     */
    public Builder addTagValueIds(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureTagValueIdsIsMutable();
      tagValueIds_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
     * To search against the `tagValueIds`:
     * * Use a field query. Example:
     *     - `tagValueIds:"456"`
     *     - `tagValueIds="tagValues/456"`
     * * Use a free text query. Example:
     *     - `456`
     * </pre>
     *
     * <code>repeated string tag_value_ids = 26;</code>
     *
     * @param values The tagValueIds to add.
     * @return This builder for chaining.
     */
    public Builder addAllTagValueIds(java.lang.Iterable<java.lang.String> values) {
      ensureTagValueIdsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tagValueIds_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
     * To search against the `tagValueIds`:
     * * Use a field query. Example:
     *     - `tagValueIds:"456"`
     *     - `tagValueIds="tagValues/456"`
     * * Use a free text query. Example:
     *     - `456`
     * </pre>
     *
     * <code>repeated string tag_value_ids = 26;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearTagValueIds() {
      tagValueIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00400000);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
     * To search against the `tagValueIds`:
     * * Use a field query. Example:
     *     - `tagValueIds:"456"`
     *     - `tagValueIds="tagValues/456"`
     * * Use a free text query. Example:
     *     - `456`
     * </pre>
     *
     * <code>repeated string tag_value_ids = 26;</code>
     *
     * @param value The bytes of the tagValueIds to add.
     * @return This builder for chaining.
     */
    public Builder addTagValueIdsBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureTagValueIdsIsMutable();
      tagValueIds_.add(value);
      onChanged();
      return this;
    }

    private java.lang.Object parentAssetType_ = "";
    /**
     *
     *
     * <pre>
     * The type of this resource's immediate parent, if there is one.
     * To search against the `parent_asset_type`:
     * * Use a field query. Example:
     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
     * * Use a free text query. Example:
     * `cloudresourcemanager.googleapis.com/Project`
     * </pre>
     *
     * <code>string parent_asset_type = 103;</code>
     *
     * @return The parentAssetType.
     */
    public java.lang.String getParentAssetType() {
      java.lang.Object ref = parentAssetType_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        parentAssetType_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The type of this resource's immediate parent, if there is one.
     * To search against the `parent_asset_type`:
     * * Use a field query. Example:
     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
     * * Use a free text query. Example:
     * `cloudresourcemanager.googleapis.com/Project`
     * </pre>
     *
     * <code>string parent_asset_type = 103;</code>
     *
     * @return The bytes for parentAssetType.
     */
    public com.google.protobuf.ByteString getParentAssetTypeBytes() {
      java.lang.Object ref = parentAssetType_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        parentAssetType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The type of this resource's immediate parent, if there is one.
     * To search against the `parent_asset_type`:
     * * Use a field query. Example:
     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
     * * Use a free text query. Example:
     * `cloudresourcemanager.googleapis.com/Project`
     * </pre>
     *
     * <code>string parent_asset_type = 103;</code>
     *
     * @param value The parentAssetType to set.
     * @return This builder for chaining.
     */
    public Builder setParentAssetType(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      parentAssetType_ = value;
      bitField0_ |= 0x00800000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The type of this resource's immediate parent, if there is one.
     * To search against the `parent_asset_type`:
     * * Use a field query. Example:
     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
     * * Use a free text query. Example:
     * `cloudresourcemanager.googleapis.com/Project`
     * </pre>
     *
     * <code>string parent_asset_type = 103;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearParentAssetType() {
      parentAssetType_ = getDefaultInstance().getParentAssetType();
      bitField0_ = (bitField0_ & ~0x00800000);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The type of this resource's immediate parent, if there is one.
     * To search against the `parent_asset_type`:
     * * Use a field query. Example:
     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
     * * Use a free text query. Example:
     * `cloudresourcemanager.googleapis.com/Project`
     * </pre>
     *
     * <code>string parent_asset_type = 103;</code>
     *
     * @param value The bytes for parentAssetType to set.
     * @return This builder for chaining.
     */
    public Builder setParentAssetTypeBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      parentAssetType_ = value;
      bitField0_ |= 0x00800000;
      onChanged();
      return this;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ResourceSearchResult)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ResourceSearchResult)
  private static final com.google.cloud.asset.v1.ResourceSearchResult DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ResourceSearchResult();
  }

  public static com.google.cloud.asset.v1.ResourceSearchResult getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ResourceSearchResult> PARSER =
      new com.google.protobuf.AbstractParser<ResourceSearchResult>() {
        @java.lang.Override
        public ResourceSearchResult parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

  public static com.google.protobuf.Parser<ResourceSearchResult> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<ResourceSearchResult> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.asset.v1.ResourceSearchResult getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
