/*
 * 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/asset_service.proto

package com.google.cloud.asset.v1;

/**
 *
 *
 * <pre>
 * An asset feed used to export asset updates to a destinations.
 * An asset feed filter controls what updates are exported.
 * The asset feed must be created within a project, organization, or
 * folder. Supported destinations are:
 * Pub/Sub topics.
 * </pre>
 *
 * Protobuf type {@code google.cloud.asset.v1.Feed}
 */
public final class Feed extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.Feed)
    FeedOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use Feed.newBuilder() to construct.
  private Feed(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private Feed() {
    name_ = "";
    assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    contentType_ = 0;
    relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
  }

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

  @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.AssetServiceProto
        .internal_static_google_cloud_asset_v1_Feed_descriptor;
  }

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

  public static final int NAME_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * Required. The format will be
   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
   * The client-assigned feed identifier must be unique within the parent
   * project/folder/organization.
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</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>
   * Required. The format will be
   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
   * The client-assigned feed identifier must be unique within the parent
   * project/folder/organization.
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</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_NAMES_FIELD_NUMBER = 2;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList assetNames_;
  /**
   *
   *
   * <pre>
   * A list of the full names of the assets to receive updates. You must specify
   * either or both of asset_names and asset_types. Only asset updates matching
   * specified asset_names or asset_types are exported to the feed.
   * Example:
   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
   * For a list of the full names for supported asset types, see [Resource
   * name format](/asset-inventory/docs/resource-name-format).
   * </pre>
   *
   * <code>repeated string asset_names = 2;</code>
   *
   * @return A list containing the assetNames.
   */
  public com.google.protobuf.ProtocolStringList getAssetNamesList() {
    return assetNames_;
  }
  /**
   *
   *
   * <pre>
   * A list of the full names of the assets to receive updates. You must specify
   * either or both of asset_names and asset_types. Only asset updates matching
   * specified asset_names or asset_types are exported to the feed.
   * Example:
   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
   * For a list of the full names for supported asset types, see [Resource
   * name format](/asset-inventory/docs/resource-name-format).
   * </pre>
   *
   * <code>repeated string asset_names = 2;</code>
   *
   * @return The count of assetNames.
   */
  public int getAssetNamesCount() {
    return assetNames_.size();
  }
  /**
   *
   *
   * <pre>
   * A list of the full names of the assets to receive updates. You must specify
   * either or both of asset_names and asset_types. Only asset updates matching
   * specified asset_names or asset_types are exported to the feed.
   * Example:
   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
   * For a list of the full names for supported asset types, see [Resource
   * name format](/asset-inventory/docs/resource-name-format).
   * </pre>
   *
   * <code>repeated string asset_names = 2;</code>
   *
   * @param index The index of the element to return.
   * @return The assetNames at the given index.
   */
  public java.lang.String getAssetNames(int index) {
    return assetNames_.get(index);
  }
  /**
   *
   *
   * <pre>
   * A list of the full names of the assets to receive updates. You must specify
   * either or both of asset_names and asset_types. Only asset updates matching
   * specified asset_names or asset_types are exported to the feed.
   * Example:
   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
   * For a list of the full names for supported asset types, see [Resource
   * name format](/asset-inventory/docs/resource-name-format).
   * </pre>
   *
   * <code>repeated string asset_names = 2;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the assetNames at the given index.
   */
  public com.google.protobuf.ByteString getAssetNamesBytes(int index) {
    return assetNames_.getByteString(index);
  }

  public static final int ASSET_TYPES_FIELD_NUMBER = 3;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList assetTypes_;
  /**
   *
   *
   * <pre>
   * A list of types of the assets to receive updates. You must specify either
   * or both of asset_names and asset_types. Only asset updates matching
   * specified asset_names or asset_types are exported to the feed.
   * Example: `"compute.googleapis.com/Disk"`
   * For a list of all supported asset types, see
   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
   * </pre>
   *
   * <code>repeated string asset_types = 3;</code>
   *
   * @return A list containing the assetTypes.
   */
  public com.google.protobuf.ProtocolStringList getAssetTypesList() {
    return assetTypes_;
  }
  /**
   *
   *
   * <pre>
   * A list of types of the assets to receive updates. You must specify either
   * or both of asset_names and asset_types. Only asset updates matching
   * specified asset_names or asset_types are exported to the feed.
   * Example: `"compute.googleapis.com/Disk"`
   * For a list of all supported asset types, see
   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
   * </pre>
   *
   * <code>repeated string asset_types = 3;</code>
   *
   * @return The count of assetTypes.
   */
  public int getAssetTypesCount() {
    return assetTypes_.size();
  }
  /**
   *
   *
   * <pre>
   * A list of types of the assets to receive updates. You must specify either
   * or both of asset_names and asset_types. Only asset updates matching
   * specified asset_names or asset_types are exported to the feed.
   * Example: `"compute.googleapis.com/Disk"`
   * For a list of all supported asset types, see
   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
   * </pre>
   *
   * <code>repeated string asset_types = 3;</code>
   *
   * @param index The index of the element to return.
   * @return The assetTypes at the given index.
   */
  public java.lang.String getAssetTypes(int index) {
    return assetTypes_.get(index);
  }
  /**
   *
   *
   * <pre>
   * A list of types of the assets to receive updates. You must specify either
   * or both of asset_names and asset_types. Only asset updates matching
   * specified asset_names or asset_types are exported to the feed.
   * Example: `"compute.googleapis.com/Disk"`
   * For a list of all supported asset types, see
   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
   * </pre>
   *
   * <code>repeated string asset_types = 3;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the assetTypes at the given index.
   */
  public com.google.protobuf.ByteString getAssetTypesBytes(int index) {
    return assetTypes_.getByteString(index);
  }

  public static final int CONTENT_TYPE_FIELD_NUMBER = 4;
  private int contentType_ = 0;
  /**
   *
   *
   * <pre>
   * Asset content type. If not specified, no content but the asset name and
   * type will be returned.
   * </pre>
   *
   * <code>.google.cloud.asset.v1.ContentType content_type = 4;</code>
   *
   * @return The enum numeric value on the wire for contentType.
   */
  @java.lang.Override
  public int getContentTypeValue() {
    return contentType_;
  }
  /**
   *
   *
   * <pre>
   * Asset content type. If not specified, no content but the asset name and
   * type will be returned.
   * </pre>
   *
   * <code>.google.cloud.asset.v1.ContentType content_type = 4;</code>
   *
   * @return The contentType.
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.ContentType getContentType() {
    com.google.cloud.asset.v1.ContentType result =
        com.google.cloud.asset.v1.ContentType.forNumber(contentType_);
    return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result;
  }

  public static final int FEED_OUTPUT_CONFIG_FIELD_NUMBER = 5;
  private com.google.cloud.asset.v1.FeedOutputConfig feedOutputConfig_;
  /**
   *
   *
   * <pre>
   * Required. Feed output configuration defining where the asset updates are
   * published to.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   *
   * @return Whether the feedOutputConfig field is set.
   */
  @java.lang.Override
  public boolean hasFeedOutputConfig() {
    return feedOutputConfig_ != null;
  }
  /**
   *
   *
   * <pre>
   * Required. Feed output configuration defining where the asset updates are
   * published to.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   *
   * @return The feedOutputConfig.
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.FeedOutputConfig getFeedOutputConfig() {
    return feedOutputConfig_ == null
        ? com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance()
        : feedOutputConfig_;
  }
  /**
   *
   *
   * <pre>
   * Required. Feed output configuration defining where the asset updates are
   * published to.
   * </pre>
   *
   * <code>
   * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.asset.v1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder() {
    return feedOutputConfig_ == null
        ? com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance()
        : feedOutputConfig_;
  }

  public static final int CONDITION_FIELD_NUMBER = 6;
  private com.google.type.Expr condition_;
  /**
   *
   *
   * <pre>
   * A condition which determines whether an asset update should be published.
   * If specified, an asset will be returned only when the expression evaluates
   * to true.
   * When set, `expression` field in the `Expr` must be a valid [CEL expression]
   * (https://github.com/google/cel-spec) on a TemporalAsset with name
   * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
   * == true") will only publish Asset deletions. Other fields of `Expr` are
   * optional.
   * See our [user
   * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
   * for detailed instructions.
   * </pre>
   *
   * <code>.google.type.Expr condition = 6;</code>
   *
   * @return Whether the condition field is set.
   */
  @java.lang.Override
  public boolean hasCondition() {
    return condition_ != null;
  }
  /**
   *
   *
   * <pre>
   * A condition which determines whether an asset update should be published.
   * If specified, an asset will be returned only when the expression evaluates
   * to true.
   * When set, `expression` field in the `Expr` must be a valid [CEL expression]
   * (https://github.com/google/cel-spec) on a TemporalAsset with name
   * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
   * == true") will only publish Asset deletions. Other fields of `Expr` are
   * optional.
   * See our [user
   * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
   * for detailed instructions.
   * </pre>
   *
   * <code>.google.type.Expr condition = 6;</code>
   *
   * @return The condition.
   */
  @java.lang.Override
  public com.google.type.Expr getCondition() {
    return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_;
  }
  /**
   *
   *
   * <pre>
   * A condition which determines whether an asset update should be published.
   * If specified, an asset will be returned only when the expression evaluates
   * to true.
   * When set, `expression` field in the `Expr` must be a valid [CEL expression]
   * (https://github.com/google/cel-spec) on a TemporalAsset with name
   * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
   * == true") will only publish Asset deletions. Other fields of `Expr` are
   * optional.
   * See our [user
   * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
   * for detailed instructions.
   * </pre>
   *
   * <code>.google.type.Expr condition = 6;</code>
   */
  @java.lang.Override
  public com.google.type.ExprOrBuilder getConditionOrBuilder() {
    return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_;
  }

  public static final int RELATIONSHIP_TYPES_FIELD_NUMBER = 7;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList relationshipTypes_;
  /**
   *
   *
   * <pre>
   * A list of relationship types to output, for example:
   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
   * content_type=RELATIONSHIP.
   * * If specified:
   * it outputs specified relationship updates on the [asset_names] or the
   * [asset_types]. It returns an error if any of the [relationship_types]
   * doesn't belong to the supported relationship types of the [asset_names] or
   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
   * belong to the source types of the [relationship_types].
   * * Otherwise:
   * it outputs the supported relationships of the types of [asset_names] and
   * [asset_types] or returns an error if any of the [asset_names] or the
   * [asset_types] has no replationship support.
   * See [Introduction to Cloud Asset
   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
   * for all supported asset types and relationship types.
   * </pre>
   *
   * <code>repeated string relationship_types = 7;</code>
   *
   * @return A list containing the relationshipTypes.
   */
  public com.google.protobuf.ProtocolStringList getRelationshipTypesList() {
    return relationshipTypes_;
  }
  /**
   *
   *
   * <pre>
   * A list of relationship types to output, for example:
   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
   * content_type=RELATIONSHIP.
   * * If specified:
   * it outputs specified relationship updates on the [asset_names] or the
   * [asset_types]. It returns an error if any of the [relationship_types]
   * doesn't belong to the supported relationship types of the [asset_names] or
   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
   * belong to the source types of the [relationship_types].
   * * Otherwise:
   * it outputs the supported relationships of the types of [asset_names] and
   * [asset_types] or returns an error if any of the [asset_names] or the
   * [asset_types] has no replationship support.
   * See [Introduction to Cloud Asset
   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
   * for all supported asset types and relationship types.
   * </pre>
   *
   * <code>repeated string relationship_types = 7;</code>
   *
   * @return The count of relationshipTypes.
   */
  public int getRelationshipTypesCount() {
    return relationshipTypes_.size();
  }
  /**
   *
   *
   * <pre>
   * A list of relationship types to output, for example:
   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
   * content_type=RELATIONSHIP.
   * * If specified:
   * it outputs specified relationship updates on the [asset_names] or the
   * [asset_types]. It returns an error if any of the [relationship_types]
   * doesn't belong to the supported relationship types of the [asset_names] or
   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
   * belong to the source types of the [relationship_types].
   * * Otherwise:
   * it outputs the supported relationships of the types of [asset_names] and
   * [asset_types] or returns an error if any of the [asset_names] or the
   * [asset_types] has no replationship support.
   * See [Introduction to Cloud Asset
   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
   * for all supported asset types and relationship types.
   * </pre>
   *
   * <code>repeated string relationship_types = 7;</code>
   *
   * @param index The index of the element to return.
   * @return The relationshipTypes at the given index.
   */
  public java.lang.String getRelationshipTypes(int index) {
    return relationshipTypes_.get(index);
  }
  /**
   *
   *
   * <pre>
   * A list of relationship types to output, for example:
   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
   * content_type=RELATIONSHIP.
   * * If specified:
   * it outputs specified relationship updates on the [asset_names] or the
   * [asset_types]. It returns an error if any of the [relationship_types]
   * doesn't belong to the supported relationship types of the [asset_names] or
   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
   * belong to the source types of the [relationship_types].
   * * Otherwise:
   * it outputs the supported relationships of the types of [asset_names] and
   * [asset_types] or returns an error if any of the [asset_names] or the
   * [asset_types] has no replationship support.
   * See [Introduction to Cloud Asset
   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
   * for all supported asset types and relationship types.
   * </pre>
   *
   * <code>repeated string relationship_types = 7;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the relationshipTypes at the given index.
   */
  public com.google.protobuf.ByteString getRelationshipTypesBytes(int index) {
    return relationshipTypes_.getByteString(index);
  }

  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_);
    }
    for (int i = 0; i < assetNames_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetNames_.getRaw(i));
    }
    for (int i = 0; i < assetTypes_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i));
    }
    if (contentType_
        != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) {
      output.writeEnum(4, contentType_);
    }
    if (feedOutputConfig_ != null) {
      output.writeMessage(5, getFeedOutputConfig());
    }
    if (condition_ != null) {
      output.writeMessage(6, getCondition());
    }
    for (int i = 0; i < relationshipTypes_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, relationshipTypes_.getRaw(i));
    }
    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_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < assetNames_.size(); i++) {
        dataSize += computeStringSizeNoTag(assetNames_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getAssetNamesList().size();
    }
    {
      int dataSize = 0;
      for (int i = 0; i < assetTypes_.size(); i++) {
        dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getAssetTypesList().size();
    }
    if (contentType_
        != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, contentType_);
    }
    if (feedOutputConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getFeedOutputConfig());
    }
    if (condition_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCondition());
    }
    {
      int dataSize = 0;
      for (int i = 0; i < relationshipTypes_.size(); i++) {
        dataSize += computeStringSizeNoTag(relationshipTypes_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getRelationshipTypesList().size();
    }
    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.Feed)) {
      return super.equals(obj);
    }
    com.google.cloud.asset.v1.Feed other = (com.google.cloud.asset.v1.Feed) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getAssetNamesList().equals(other.getAssetNamesList())) return false;
    if (!getAssetTypesList().equals(other.getAssetTypesList())) return false;
    if (contentType_ != other.contentType_) return false;
    if (hasFeedOutputConfig() != other.hasFeedOutputConfig()) return false;
    if (hasFeedOutputConfig()) {
      if (!getFeedOutputConfig().equals(other.getFeedOutputConfig())) return false;
    }
    if (hasCondition() != other.hasCondition()) return false;
    if (hasCondition()) {
      if (!getCondition().equals(other.getCondition())) return false;
    }
    if (!getRelationshipTypesList().equals(other.getRelationshipTypesList())) 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();
    if (getAssetNamesCount() > 0) {
      hash = (37 * hash) + ASSET_NAMES_FIELD_NUMBER;
      hash = (53 * hash) + getAssetNamesList().hashCode();
    }
    if (getAssetTypesCount() > 0) {
      hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER;
      hash = (53 * hash) + getAssetTypesList().hashCode();
    }
    hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + contentType_;
    if (hasFeedOutputConfig()) {
      hash = (37 * hash) + FEED_OUTPUT_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getFeedOutputConfig().hashCode();
    }
    if (hasCondition()) {
      hash = (37 * hash) + CONDITION_FIELD_NUMBER;
      hash = (53 * hash) + getCondition().hashCode();
    }
    if (getRelationshipTypesCount() > 0) {
      hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER;
      hash = (53 * hash) + getRelationshipTypesList().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public static com.google.cloud.asset.v1.Feed 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.Feed parseFrom(com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.asset.v1.Feed 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.Feed parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.asset.v1.Feed 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.Feed parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.asset.v1.Feed 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.Feed parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.asset.v1.Feed 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.Feed 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.Feed 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.Feed 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>
   * An asset feed used to export asset updates to a destinations.
   * An asset feed filter controls what updates are exported.
   * The asset feed must be created within a project, organization, or
   * folder. Supported destinations are:
   * Pub/Sub topics.
   * </pre>
   *
   * Protobuf type {@code google.cloud.asset.v1.Feed}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.Feed)
      com.google.cloud.asset.v1.FeedOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.asset.v1.AssetServiceProto
          .internal_static_google_cloud_asset_v1_Feed_descriptor;
    }

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

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

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      name_ = "";
      assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000002);
      assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000004);
      contentType_ = 0;
      feedOutputConfig_ = null;
      if (feedOutputConfigBuilder_ != null) {
        feedOutputConfigBuilder_.dispose();
        feedOutputConfigBuilder_ = null;
      }
      condition_ = null;
      if (conditionBuilder_ != null) {
        conditionBuilder_.dispose();
        conditionBuilder_ = null;
      }
      relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000040);
      return this;
    }

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

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

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

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

    private void buildPartialRepeatedFields(com.google.cloud.asset.v1.Feed result) {
      if (((bitField0_ & 0x00000002) != 0)) {
        assetNames_ = assetNames_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000002);
      }
      result.assetNames_ = assetNames_;
      if (((bitField0_ & 0x00000004) != 0)) {
        assetTypes_ = assetTypes_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000004);
      }
      result.assetTypes_ = assetTypes_;
      if (((bitField0_ & 0x00000040) != 0)) {
        relationshipTypes_ = relationshipTypes_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000040);
      }
      result.relationshipTypes_ = relationshipTypes_;
    }

    private void buildPartial0(com.google.cloud.asset.v1.Feed result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.contentType_ = contentType_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.feedOutputConfig_ =
            feedOutputConfigBuilder_ == null ? feedOutputConfig_ : feedOutputConfigBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build();
      }
    }

    @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.Feed) {
        return mergeFrom((com.google.cloud.asset.v1.Feed) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.asset.v1.Feed other) {
      if (other == com.google.cloud.asset.v1.Feed.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (!other.assetNames_.isEmpty()) {
        if (assetNames_.isEmpty()) {
          assetNames_ = other.assetNames_;
          bitField0_ = (bitField0_ & ~0x00000002);
        } else {
          ensureAssetNamesIsMutable();
          assetNames_.addAll(other.assetNames_);
        }
        onChanged();
      }
      if (!other.assetTypes_.isEmpty()) {
        if (assetTypes_.isEmpty()) {
          assetTypes_ = other.assetTypes_;
          bitField0_ = (bitField0_ & ~0x00000004);
        } else {
          ensureAssetTypesIsMutable();
          assetTypes_.addAll(other.assetTypes_);
        }
        onChanged();
      }
      if (other.contentType_ != 0) {
        setContentTypeValue(other.getContentTypeValue());
      }
      if (other.hasFeedOutputConfig()) {
        mergeFeedOutputConfig(other.getFeedOutputConfig());
      }
      if (other.hasCondition()) {
        mergeCondition(other.getCondition());
      }
      if (!other.relationshipTypes_.isEmpty()) {
        if (relationshipTypes_.isEmpty()) {
          relationshipTypes_ = other.relationshipTypes_;
          bitField0_ = (bitField0_ & ~0x00000040);
        } else {
          ensureRelationshipTypesIsMutable();
          relationshipTypes_.addAll(other.relationshipTypes_);
        }
        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:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureAssetNamesIsMutable();
                assetNames_.add(s);
                break;
              } // case 18
            case 26:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureAssetTypesIsMutable();
                assetTypes_.add(s);
                break;
              } // case 26
            case 32:
              {
                contentType_ = input.readEnum();
                bitField0_ |= 0x00000008;
                break;
              } // case 32
            case 42:
              {
                input.readMessage(
                    getFeedOutputConfigFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000010;
                break;
              } // case 42
            case 50:
              {
                input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000020;
                break;
              } // case 50
            case 58:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureRelationshipTypesIsMutable();
                relationshipTypes_.add(s);
                break;
              } // case 58
            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>
     * Required. The format will be
     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
     * The client-assigned feed identifier must be unique within the parent
     * project/folder/organization.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</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>
     * Required. The format will be
     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
     * The client-assigned feed identifier must be unique within the parent
     * project/folder/organization.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</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>
     * Required. The format will be
     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
     * The client-assigned feed identifier must be unique within the parent
     * project/folder/organization.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</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>
     * Required. The format will be
     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
     * The client-assigned feed identifier must be unique within the parent
     * project/folder/organization.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The format will be
     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
     * The client-assigned feed identifier must be unique within the parent
     * project/folder/organization.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</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 com.google.protobuf.LazyStringList assetNames_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureAssetNamesIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        assetNames_ = new com.google.protobuf.LazyStringArrayList(assetNames_);
        bitField0_ |= 0x00000002;
      }
    }
    /**
     *
     *
     * <pre>
     * A list of the full names of the assets to receive updates. You must specify
     * either or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example:
     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
     * For a list of the full names for supported asset types, see [Resource
     * name format](/asset-inventory/docs/resource-name-format).
     * </pre>
     *
     * <code>repeated string asset_names = 2;</code>
     *
     * @return A list containing the assetNames.
     */
    public com.google.protobuf.ProtocolStringList getAssetNamesList() {
      return assetNames_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * A list of the full names of the assets to receive updates. You must specify
     * either or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example:
     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
     * For a list of the full names for supported asset types, see [Resource
     * name format](/asset-inventory/docs/resource-name-format).
     * </pre>
     *
     * <code>repeated string asset_names = 2;</code>
     *
     * @return The count of assetNames.
     */
    public int getAssetNamesCount() {
      return assetNames_.size();
    }
    /**
     *
     *
     * <pre>
     * A list of the full names of the assets to receive updates. You must specify
     * either or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example:
     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
     * For a list of the full names for supported asset types, see [Resource
     * name format](/asset-inventory/docs/resource-name-format).
     * </pre>
     *
     * <code>repeated string asset_names = 2;</code>
     *
     * @param index The index of the element to return.
     * @return The assetNames at the given index.
     */
    public java.lang.String getAssetNames(int index) {
      return assetNames_.get(index);
    }
    /**
     *
     *
     * <pre>
     * A list of the full names of the assets to receive updates. You must specify
     * either or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example:
     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
     * For a list of the full names for supported asset types, see [Resource
     * name format](/asset-inventory/docs/resource-name-format).
     * </pre>
     *
     * <code>repeated string asset_names = 2;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the assetNames at the given index.
     */
    public com.google.protobuf.ByteString getAssetNamesBytes(int index) {
      return assetNames_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * A list of the full names of the assets to receive updates. You must specify
     * either or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example:
     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
     * For a list of the full names for supported asset types, see [Resource
     * name format](/asset-inventory/docs/resource-name-format).
     * </pre>
     *
     * <code>repeated string asset_names = 2;</code>
     *
     * @param index The index to set the value at.
     * @param value The assetNames to set.
     * @return This builder for chaining.
     */
    public Builder setAssetNames(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureAssetNamesIsMutable();
      assetNames_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of the full names of the assets to receive updates. You must specify
     * either or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example:
     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
     * For a list of the full names for supported asset types, see [Resource
     * name format](/asset-inventory/docs/resource-name-format).
     * </pre>
     *
     * <code>repeated string asset_names = 2;</code>
     *
     * @param value The assetNames to add.
     * @return This builder for chaining.
     */
    public Builder addAssetNames(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureAssetNamesIsMutable();
      assetNames_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of the full names of the assets to receive updates. You must specify
     * either or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example:
     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
     * For a list of the full names for supported asset types, see [Resource
     * name format](/asset-inventory/docs/resource-name-format).
     * </pre>
     *
     * <code>repeated string asset_names = 2;</code>
     *
     * @param values The assetNames to add.
     * @return This builder for chaining.
     */
    public Builder addAllAssetNames(java.lang.Iterable<java.lang.String> values) {
      ensureAssetNamesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assetNames_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of the full names of the assets to receive updates. You must specify
     * either or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example:
     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
     * For a list of the full names for supported asset types, see [Resource
     * name format](/asset-inventory/docs/resource-name-format).
     * </pre>
     *
     * <code>repeated string asset_names = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearAssetNames() {
      assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of the full names of the assets to receive updates. You must specify
     * either or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example:
     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
     * For a list of the full names for supported asset types, see [Resource
     * name format](/asset-inventory/docs/resource-name-format).
     * </pre>
     *
     * <code>repeated string asset_names = 2;</code>
     *
     * @param value The bytes of the assetNames to add.
     * @return This builder for chaining.
     */
    public Builder addAssetNamesBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureAssetNamesIsMutable();
      assetNames_.add(value);
      onChanged();
      return this;
    }

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

    private void ensureAssetTypesIsMutable() {
      if (!((bitField0_ & 0x00000004) != 0)) {
        assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_);
        bitField0_ |= 0x00000004;
      }
    }
    /**
     *
     *
     * <pre>
     * A list of types of the assets to receive updates. You must specify either
     * or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example: `"compute.googleapis.com/Disk"`
     * For a list of all supported asset types, see
     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
     * </pre>
     *
     * <code>repeated string asset_types = 3;</code>
     *
     * @return A list containing the assetTypes.
     */
    public com.google.protobuf.ProtocolStringList getAssetTypesList() {
      return assetTypes_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * A list of types of the assets to receive updates. You must specify either
     * or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example: `"compute.googleapis.com/Disk"`
     * For a list of all supported asset types, see
     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
     * </pre>
     *
     * <code>repeated string asset_types = 3;</code>
     *
     * @return The count of assetTypes.
     */
    public int getAssetTypesCount() {
      return assetTypes_.size();
    }
    /**
     *
     *
     * <pre>
     * A list of types of the assets to receive updates. You must specify either
     * or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example: `"compute.googleapis.com/Disk"`
     * For a list of all supported asset types, see
     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
     * </pre>
     *
     * <code>repeated string asset_types = 3;</code>
     *
     * @param index The index of the element to return.
     * @return The assetTypes at the given index.
     */
    public java.lang.String getAssetTypes(int index) {
      return assetTypes_.get(index);
    }
    /**
     *
     *
     * <pre>
     * A list of types of the assets to receive updates. You must specify either
     * or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example: `"compute.googleapis.com/Disk"`
     * For a list of all supported asset types, see
     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
     * </pre>
     *
     * <code>repeated string asset_types = 3;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the assetTypes at the given index.
     */
    public com.google.protobuf.ByteString getAssetTypesBytes(int index) {
      return assetTypes_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * A list of types of the assets to receive updates. You must specify either
     * or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example: `"compute.googleapis.com/Disk"`
     * For a list of all supported asset types, see
     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
     * </pre>
     *
     * <code>repeated string asset_types = 3;</code>
     *
     * @param index The index to set the value at.
     * @param value The assetTypes to set.
     * @return This builder for chaining.
     */
    public Builder setAssetTypes(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureAssetTypesIsMutable();
      assetTypes_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of types of the assets to receive updates. You must specify either
     * or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example: `"compute.googleapis.com/Disk"`
     * For a list of all supported asset types, see
     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
     * </pre>
     *
     * <code>repeated string asset_types = 3;</code>
     *
     * @param value The assetTypes to add.
     * @return This builder for chaining.
     */
    public Builder addAssetTypes(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureAssetTypesIsMutable();
      assetTypes_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of types of the assets to receive updates. You must specify either
     * or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example: `"compute.googleapis.com/Disk"`
     * For a list of all supported asset types, see
     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
     * </pre>
     *
     * <code>repeated string asset_types = 3;</code>
     *
     * @param values The assetTypes to add.
     * @return This builder for chaining.
     */
    public Builder addAllAssetTypes(java.lang.Iterable<java.lang.String> values) {
      ensureAssetTypesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assetTypes_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of types of the assets to receive updates. You must specify either
     * or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example: `"compute.googleapis.com/Disk"`
     * For a list of all supported asset types, see
     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
     * </pre>
     *
     * <code>repeated string asset_types = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearAssetTypes() {
      assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of types of the assets to receive updates. You must specify either
     * or both of asset_names and asset_types. Only asset updates matching
     * specified asset_names or asset_types are exported to the feed.
     * Example: `"compute.googleapis.com/Disk"`
     * For a list of all supported asset types, see
     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
     * </pre>
     *
     * <code>repeated string asset_types = 3;</code>
     *
     * @param value The bytes of the assetTypes to add.
     * @return This builder for chaining.
     */
    public Builder addAssetTypesBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureAssetTypesIsMutable();
      assetTypes_.add(value);
      onChanged();
      return this;
    }

    private int contentType_ = 0;
    /**
     *
     *
     * <pre>
     * Asset content type. If not specified, no content but the asset name and
     * type will be returned.
     * </pre>
     *
     * <code>.google.cloud.asset.v1.ContentType content_type = 4;</code>
     *
     * @return The enum numeric value on the wire for contentType.
     */
    @java.lang.Override
    public int getContentTypeValue() {
      return contentType_;
    }
    /**
     *
     *
     * <pre>
     * Asset content type. If not specified, no content but the asset name and
     * type will be returned.
     * </pre>
     *
     * <code>.google.cloud.asset.v1.ContentType content_type = 4;</code>
     *
     * @param value The enum numeric value on the wire for contentType to set.
     * @return This builder for chaining.
     */
    public Builder setContentTypeValue(int value) {
      contentType_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Asset content type. If not specified, no content but the asset name and
     * type will be returned.
     * </pre>
     *
     * <code>.google.cloud.asset.v1.ContentType content_type = 4;</code>
     *
     * @return The contentType.
     */
    @java.lang.Override
    public com.google.cloud.asset.v1.ContentType getContentType() {
      com.google.cloud.asset.v1.ContentType result =
          com.google.cloud.asset.v1.ContentType.forNumber(contentType_);
      return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * Asset content type. If not specified, no content but the asset name and
     * type will be returned.
     * </pre>
     *
     * <code>.google.cloud.asset.v1.ContentType content_type = 4;</code>
     *
     * @param value The contentType to set.
     * @return This builder for chaining.
     */
    public Builder setContentType(com.google.cloud.asset.v1.ContentType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000008;
      contentType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Asset content type. If not specified, no content but the asset name and
     * type will be returned.
     * </pre>
     *
     * <code>.google.cloud.asset.v1.ContentType content_type = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearContentType() {
      bitField0_ = (bitField0_ & ~0x00000008);
      contentType_ = 0;
      onChanged();
      return this;
    }

    private com.google.cloud.asset.v1.FeedOutputConfig feedOutputConfig_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.asset.v1.FeedOutputConfig,
            com.google.cloud.asset.v1.FeedOutputConfig.Builder,
            com.google.cloud.asset.v1.FeedOutputConfigOrBuilder>
        feedOutputConfigBuilder_;
    /**
     *
     *
     * <pre>
     * Required. Feed output configuration defining where the asset updates are
     * published to.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return Whether the feedOutputConfig field is set.
     */
    public boolean hasFeedOutputConfig() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     *
     *
     * <pre>
     * Required. Feed output configuration defining where the asset updates are
     * published to.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return The feedOutputConfig.
     */
    public com.google.cloud.asset.v1.FeedOutputConfig getFeedOutputConfig() {
      if (feedOutputConfigBuilder_ == null) {
        return feedOutputConfig_ == null
            ? com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance()
            : feedOutputConfig_;
      } else {
        return feedOutputConfigBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Feed output configuration defining where the asset updates are
     * published to.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder setFeedOutputConfig(com.google.cloud.asset.v1.FeedOutputConfig value) {
      if (feedOutputConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        feedOutputConfig_ = value;
      } else {
        feedOutputConfigBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Feed output configuration defining where the asset updates are
     * published to.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder setFeedOutputConfig(
        com.google.cloud.asset.v1.FeedOutputConfig.Builder builderForValue) {
      if (feedOutputConfigBuilder_ == null) {
        feedOutputConfig_ = builderForValue.build();
      } else {
        feedOutputConfigBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Feed output configuration defining where the asset updates are
     * published to.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder mergeFeedOutputConfig(com.google.cloud.asset.v1.FeedOutputConfig value) {
      if (feedOutputConfigBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0)
            && feedOutputConfig_ != null
            && feedOutputConfig_
                != com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance()) {
          getFeedOutputConfigBuilder().mergeFrom(value);
        } else {
          feedOutputConfig_ = value;
        }
      } else {
        feedOutputConfigBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Feed output configuration defining where the asset updates are
     * published to.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public Builder clearFeedOutputConfig() {
      bitField0_ = (bitField0_ & ~0x00000010);
      feedOutputConfig_ = null;
      if (feedOutputConfigBuilder_ != null) {
        feedOutputConfigBuilder_.dispose();
        feedOutputConfigBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Feed output configuration defining where the asset updates are
     * published to.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public com.google.cloud.asset.v1.FeedOutputConfig.Builder getFeedOutputConfigBuilder() {
      bitField0_ |= 0x00000010;
      onChanged();
      return getFeedOutputConfigFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Required. Feed output configuration defining where the asset updates are
     * published to.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    public com.google.cloud.asset.v1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder() {
      if (feedOutputConfigBuilder_ != null) {
        return feedOutputConfigBuilder_.getMessageOrBuilder();
      } else {
        return feedOutputConfig_ == null
            ? com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance()
            : feedOutputConfig_;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Feed output configuration defining where the asset updates are
     * published to.
     * </pre>
     *
     * <code>
     * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.asset.v1.FeedOutputConfig,
            com.google.cloud.asset.v1.FeedOutputConfig.Builder,
            com.google.cloud.asset.v1.FeedOutputConfigOrBuilder>
        getFeedOutputConfigFieldBuilder() {
      if (feedOutputConfigBuilder_ == null) {
        feedOutputConfigBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.asset.v1.FeedOutputConfig,
                com.google.cloud.asset.v1.FeedOutputConfig.Builder,
                com.google.cloud.asset.v1.FeedOutputConfigOrBuilder>(
                getFeedOutputConfig(), getParentForChildren(), isClean());
        feedOutputConfig_ = null;
      }
      return feedOutputConfigBuilder_;
    }

    private com.google.type.Expr condition_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>
        conditionBuilder_;
    /**
     *
     *
     * <pre>
     * A condition which determines whether an asset update should be published.
     * If specified, an asset will be returned only when the expression evaluates
     * to true.
     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
     * (https://github.com/google/cel-spec) on a TemporalAsset with name
     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
     * == true") will only publish Asset deletions. Other fields of `Expr` are
     * optional.
     * See our [user
     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
     * for detailed instructions.
     * </pre>
     *
     * <code>.google.type.Expr condition = 6;</code>
     *
     * @return Whether the condition field is set.
     */
    public boolean hasCondition() {
      return ((bitField0_ & 0x00000020) != 0);
    }
    /**
     *
     *
     * <pre>
     * A condition which determines whether an asset update should be published.
     * If specified, an asset will be returned only when the expression evaluates
     * to true.
     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
     * (https://github.com/google/cel-spec) on a TemporalAsset with name
     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
     * == true") will only publish Asset deletions. Other fields of `Expr` are
     * optional.
     * See our [user
     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
     * for detailed instructions.
     * </pre>
     *
     * <code>.google.type.Expr condition = 6;</code>
     *
     * @return The condition.
     */
    public com.google.type.Expr getCondition() {
      if (conditionBuilder_ == null) {
        return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_;
      } else {
        return conditionBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * A condition which determines whether an asset update should be published.
     * If specified, an asset will be returned only when the expression evaluates
     * to true.
     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
     * (https://github.com/google/cel-spec) on a TemporalAsset with name
     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
     * == true") will only publish Asset deletions. Other fields of `Expr` are
     * optional.
     * See our [user
     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
     * for detailed instructions.
     * </pre>
     *
     * <code>.google.type.Expr condition = 6;</code>
     */
    public Builder setCondition(com.google.type.Expr value) {
      if (conditionBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        condition_ = value;
      } else {
        conditionBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A condition which determines whether an asset update should be published.
     * If specified, an asset will be returned only when the expression evaluates
     * to true.
     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
     * (https://github.com/google/cel-spec) on a TemporalAsset with name
     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
     * == true") will only publish Asset deletions. Other fields of `Expr` are
     * optional.
     * See our [user
     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
     * for detailed instructions.
     * </pre>
     *
     * <code>.google.type.Expr condition = 6;</code>
     */
    public Builder setCondition(com.google.type.Expr.Builder builderForValue) {
      if (conditionBuilder_ == null) {
        condition_ = builderForValue.build();
      } else {
        conditionBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A condition which determines whether an asset update should be published.
     * If specified, an asset will be returned only when the expression evaluates
     * to true.
     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
     * (https://github.com/google/cel-spec) on a TemporalAsset with name
     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
     * == true") will only publish Asset deletions. Other fields of `Expr` are
     * optional.
     * See our [user
     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
     * for detailed instructions.
     * </pre>
     *
     * <code>.google.type.Expr condition = 6;</code>
     */
    public Builder mergeCondition(com.google.type.Expr value) {
      if (conditionBuilder_ == null) {
        if (((bitField0_ & 0x00000020) != 0)
            && condition_ != null
            && condition_ != com.google.type.Expr.getDefaultInstance()) {
          getConditionBuilder().mergeFrom(value);
        } else {
          condition_ = value;
        }
      } else {
        conditionBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A condition which determines whether an asset update should be published.
     * If specified, an asset will be returned only when the expression evaluates
     * to true.
     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
     * (https://github.com/google/cel-spec) on a TemporalAsset with name
     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
     * == true") will only publish Asset deletions. Other fields of `Expr` are
     * optional.
     * See our [user
     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
     * for detailed instructions.
     * </pre>
     *
     * <code>.google.type.Expr condition = 6;</code>
     */
    public Builder clearCondition() {
      bitField0_ = (bitField0_ & ~0x00000020);
      condition_ = null;
      if (conditionBuilder_ != null) {
        conditionBuilder_.dispose();
        conditionBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A condition which determines whether an asset update should be published.
     * If specified, an asset will be returned only when the expression evaluates
     * to true.
     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
     * (https://github.com/google/cel-spec) on a TemporalAsset with name
     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
     * == true") will only publish Asset deletions. Other fields of `Expr` are
     * optional.
     * See our [user
     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
     * for detailed instructions.
     * </pre>
     *
     * <code>.google.type.Expr condition = 6;</code>
     */
    public com.google.type.Expr.Builder getConditionBuilder() {
      bitField0_ |= 0x00000020;
      onChanged();
      return getConditionFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * A condition which determines whether an asset update should be published.
     * If specified, an asset will be returned only when the expression evaluates
     * to true.
     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
     * (https://github.com/google/cel-spec) on a TemporalAsset with name
     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
     * == true") will only publish Asset deletions. Other fields of `Expr` are
     * optional.
     * See our [user
     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
     * for detailed instructions.
     * </pre>
     *
     * <code>.google.type.Expr condition = 6;</code>
     */
    public com.google.type.ExprOrBuilder getConditionOrBuilder() {
      if (conditionBuilder_ != null) {
        return conditionBuilder_.getMessageOrBuilder();
      } else {
        return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_;
      }
    }
    /**
     *
     *
     * <pre>
     * A condition which determines whether an asset update should be published.
     * If specified, an asset will be returned only when the expression evaluates
     * to true.
     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
     * (https://github.com/google/cel-spec) on a TemporalAsset with name
     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
     * == true") will only publish Asset deletions. Other fields of `Expr` are
     * optional.
     * See our [user
     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
     * for detailed instructions.
     * </pre>
     *
     * <code>.google.type.Expr condition = 6;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>
        getConditionFieldBuilder() {
      if (conditionBuilder_ == null) {
        conditionBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>(
                getCondition(), getParentForChildren(), isClean());
        condition_ = null;
      }
      return conditionBuilder_;
    }

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

    private void ensureRelationshipTypesIsMutable() {
      if (!((bitField0_ & 0x00000040) != 0)) {
        relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(relationshipTypes_);
        bitField0_ |= 0x00000040;
      }
    }
    /**
     *
     *
     * <pre>
     * A list of relationship types to output, for example:
     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
     * content_type=RELATIONSHIP.
     * * If specified:
     * it outputs specified relationship updates on the [asset_names] or the
     * [asset_types]. It returns an error if any of the [relationship_types]
     * doesn't belong to the supported relationship types of the [asset_names] or
     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
     * belong to the source types of the [relationship_types].
     * * Otherwise:
     * it outputs the supported relationships of the types of [asset_names] and
     * [asset_types] or returns an error if any of the [asset_names] or the
     * [asset_types] has no replationship support.
     * See [Introduction to Cloud Asset
     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
     * for all supported asset types and relationship types.
     * </pre>
     *
     * <code>repeated string relationship_types = 7;</code>
     *
     * @return A list containing the relationshipTypes.
     */
    public com.google.protobuf.ProtocolStringList getRelationshipTypesList() {
      return relationshipTypes_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * A list of relationship types to output, for example:
     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
     * content_type=RELATIONSHIP.
     * * If specified:
     * it outputs specified relationship updates on the [asset_names] or the
     * [asset_types]. It returns an error if any of the [relationship_types]
     * doesn't belong to the supported relationship types of the [asset_names] or
     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
     * belong to the source types of the [relationship_types].
     * * Otherwise:
     * it outputs the supported relationships of the types of [asset_names] and
     * [asset_types] or returns an error if any of the [asset_names] or the
     * [asset_types] has no replationship support.
     * See [Introduction to Cloud Asset
     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
     * for all supported asset types and relationship types.
     * </pre>
     *
     * <code>repeated string relationship_types = 7;</code>
     *
     * @return The count of relationshipTypes.
     */
    public int getRelationshipTypesCount() {
      return relationshipTypes_.size();
    }
    /**
     *
     *
     * <pre>
     * A list of relationship types to output, for example:
     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
     * content_type=RELATIONSHIP.
     * * If specified:
     * it outputs specified relationship updates on the [asset_names] or the
     * [asset_types]. It returns an error if any of the [relationship_types]
     * doesn't belong to the supported relationship types of the [asset_names] or
     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
     * belong to the source types of the [relationship_types].
     * * Otherwise:
     * it outputs the supported relationships of the types of [asset_names] and
     * [asset_types] or returns an error if any of the [asset_names] or the
     * [asset_types] has no replationship support.
     * See [Introduction to Cloud Asset
     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
     * for all supported asset types and relationship types.
     * </pre>
     *
     * <code>repeated string relationship_types = 7;</code>
     *
     * @param index The index of the element to return.
     * @return The relationshipTypes at the given index.
     */
    public java.lang.String getRelationshipTypes(int index) {
      return relationshipTypes_.get(index);
    }
    /**
     *
     *
     * <pre>
     * A list of relationship types to output, for example:
     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
     * content_type=RELATIONSHIP.
     * * If specified:
     * it outputs specified relationship updates on the [asset_names] or the
     * [asset_types]. It returns an error if any of the [relationship_types]
     * doesn't belong to the supported relationship types of the [asset_names] or
     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
     * belong to the source types of the [relationship_types].
     * * Otherwise:
     * it outputs the supported relationships of the types of [asset_names] and
     * [asset_types] or returns an error if any of the [asset_names] or the
     * [asset_types] has no replationship support.
     * See [Introduction to Cloud Asset
     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
     * for all supported asset types and relationship types.
     * </pre>
     *
     * <code>repeated string relationship_types = 7;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the relationshipTypes at the given index.
     */
    public com.google.protobuf.ByteString getRelationshipTypesBytes(int index) {
      return relationshipTypes_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * A list of relationship types to output, for example:
     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
     * content_type=RELATIONSHIP.
     * * If specified:
     * it outputs specified relationship updates on the [asset_names] or the
     * [asset_types]. It returns an error if any of the [relationship_types]
     * doesn't belong to the supported relationship types of the [asset_names] or
     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
     * belong to the source types of the [relationship_types].
     * * Otherwise:
     * it outputs the supported relationships of the types of [asset_names] and
     * [asset_types] or returns an error if any of the [asset_names] or the
     * [asset_types] has no replationship support.
     * See [Introduction to Cloud Asset
     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
     * for all supported asset types and relationship types.
     * </pre>
     *
     * <code>repeated string relationship_types = 7;</code>
     *
     * @param index The index to set the value at.
     * @param value The relationshipTypes to set.
     * @return This builder for chaining.
     */
    public Builder setRelationshipTypes(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureRelationshipTypesIsMutable();
      relationshipTypes_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of relationship types to output, for example:
     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
     * content_type=RELATIONSHIP.
     * * If specified:
     * it outputs specified relationship updates on the [asset_names] or the
     * [asset_types]. It returns an error if any of the [relationship_types]
     * doesn't belong to the supported relationship types of the [asset_names] or
     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
     * belong to the source types of the [relationship_types].
     * * Otherwise:
     * it outputs the supported relationships of the types of [asset_names] and
     * [asset_types] or returns an error if any of the [asset_names] or the
     * [asset_types] has no replationship support.
     * See [Introduction to Cloud Asset
     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
     * for all supported asset types and relationship types.
     * </pre>
     *
     * <code>repeated string relationship_types = 7;</code>
     *
     * @param value The relationshipTypes to add.
     * @return This builder for chaining.
     */
    public Builder addRelationshipTypes(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureRelationshipTypesIsMutable();
      relationshipTypes_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of relationship types to output, for example:
     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
     * content_type=RELATIONSHIP.
     * * If specified:
     * it outputs specified relationship updates on the [asset_names] or the
     * [asset_types]. It returns an error if any of the [relationship_types]
     * doesn't belong to the supported relationship types of the [asset_names] or
     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
     * belong to the source types of the [relationship_types].
     * * Otherwise:
     * it outputs the supported relationships of the types of [asset_names] and
     * [asset_types] or returns an error if any of the [asset_names] or the
     * [asset_types] has no replationship support.
     * See [Introduction to Cloud Asset
     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
     * for all supported asset types and relationship types.
     * </pre>
     *
     * <code>repeated string relationship_types = 7;</code>
     *
     * @param values The relationshipTypes to add.
     * @return This builder for chaining.
     */
    public Builder addAllRelationshipTypes(java.lang.Iterable<java.lang.String> values) {
      ensureRelationshipTypesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relationshipTypes_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of relationship types to output, for example:
     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
     * content_type=RELATIONSHIP.
     * * If specified:
     * it outputs specified relationship updates on the [asset_names] or the
     * [asset_types]. It returns an error if any of the [relationship_types]
     * doesn't belong to the supported relationship types of the [asset_names] or
     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
     * belong to the source types of the [relationship_types].
     * * Otherwise:
     * it outputs the supported relationships of the types of [asset_names] and
     * [asset_types] or returns an error if any of the [asset_names] or the
     * [asset_types] has no replationship support.
     * See [Introduction to Cloud Asset
     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
     * for all supported asset types and relationship types.
     * </pre>
     *
     * <code>repeated string relationship_types = 7;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearRelationshipTypes() {
      relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000040);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of relationship types to output, for example:
     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
     * content_type=RELATIONSHIP.
     * * If specified:
     * it outputs specified relationship updates on the [asset_names] or the
     * [asset_types]. It returns an error if any of the [relationship_types]
     * doesn't belong to the supported relationship types of the [asset_names] or
     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
     * belong to the source types of the [relationship_types].
     * * Otherwise:
     * it outputs the supported relationships of the types of [asset_names] and
     * [asset_types] or returns an error if any of the [asset_names] or the
     * [asset_types] has no replationship support.
     * See [Introduction to Cloud Asset
     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
     * for all supported asset types and relationship types.
     * </pre>
     *
     * <code>repeated string relationship_types = 7;</code>
     *
     * @param value The bytes of the relationshipTypes to add.
     * @return This builder for chaining.
     */
    public Builder addRelationshipTypesBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureRelationshipTypesIsMutable();
      relationshipTypes_.add(value);
      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.Feed)
  }

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

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

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

  private static final com.google.protobuf.Parser<Feed> PARSER =
      new com.google.protobuf.AbstractParser<Feed>() {
        @java.lang.Override
        public Feed 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<Feed> parser() {
    return PARSER;
  }

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

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