Class Feed.Builder

  • All Implemented Interfaces:
    FeedOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Feed

    public static final class Feed.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Feed.Builder>
    implements FeedOrBuilder
     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:
     Cloud Pub/Sub topics.
     
    Protobuf type google.cloud.asset.v1p2beta1.Feed
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Feed.Builder>
      • clear

        public Feed.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Feed.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Feed.Builder>
      • getDefaultInstanceForType

        public Feed getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Feed build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Feed buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Feed.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Feed.Builder>
      • setField

        public Feed.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                     Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Feed.Builder>
      • clearField

        public Feed.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Feed.Builder>
      • clearOneof

        public Feed.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Feed.Builder>
      • setRepeatedField

        public Feed.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             int index,
                                             Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Feed.Builder>
      • addRepeatedField

        public Feed.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Feed.Builder>
      • mergeFrom

        public Feed.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Feed.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Feed.Builder>
      • mergeFrom

        public Feed.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                               throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Feed.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         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.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getName in interface FeedOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         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.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getNameBytes in interface FeedOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Feed.Builder setName​(String value)
         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.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Feed.Builder clearName()
         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.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setNameBytes

        public Feed.Builder setNameBytes​(com.google.protobuf.ByteString value)
         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.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getAssetNamesList

        public com.google.protobuf.ProtocolStringList getAssetNamesList()
         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 and asset_types are exported to the feed. For
         example:
         `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
         See [Resource
         Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
         for more info.
         
        repeated string asset_names = 2;
        Specified by:
        getAssetNamesList in interface FeedOrBuilder
        Returns:
        A list containing the assetNames.
      • getAssetNamesCount

        public int getAssetNamesCount()
         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 and asset_types are exported to the feed. For
         example:
         `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
         See [Resource
         Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
         for more info.
         
        repeated string asset_names = 2;
        Specified by:
        getAssetNamesCount in interface FeedOrBuilder
        Returns:
        The count of assetNames.
      • getAssetNames

        public String getAssetNames​(int index)
         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 and asset_types are exported to the feed. For
         example:
         `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
         See [Resource
         Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
         for more info.
         
        repeated string asset_names = 2;
        Specified by:
        getAssetNames in interface FeedOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The assetNames at the given index.
      • getAssetNamesBytes

        public com.google.protobuf.ByteString getAssetNamesBytes​(int index)
         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 and asset_types are exported to the feed. For
         example:
         `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
         See [Resource
         Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
         for more info.
         
        repeated string asset_names = 2;
        Specified by:
        getAssetNamesBytes in interface FeedOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the assetNames at the given index.
      • setAssetNames

        public Feed.Builder setAssetNames​(int index,
                                          String value)
         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 and asset_types are exported to the feed. For
         example:
         `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
         See [Resource
         Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
         for more info.
         
        repeated string asset_names = 2;
        Parameters:
        index - The index to set the value at.
        value - The assetNames to set.
        Returns:
        This builder for chaining.
      • addAssetNames

        public Feed.Builder addAssetNames​(String value)
         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 and asset_types are exported to the feed. For
         example:
         `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
         See [Resource
         Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
         for more info.
         
        repeated string asset_names = 2;
        Parameters:
        value - The assetNames to add.
        Returns:
        This builder for chaining.
      • addAllAssetNames

        public Feed.Builder addAllAssetNames​(Iterable<String> values)
         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 and asset_types are exported to the feed. For
         example:
         `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
         See [Resource
         Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
         for more info.
         
        repeated string asset_names = 2;
        Parameters:
        values - The assetNames to add.
        Returns:
        This builder for chaining.
      • clearAssetNames

        public Feed.Builder clearAssetNames()
         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 and asset_types are exported to the feed. For
         example:
         `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
         See [Resource
         Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
         for more info.
         
        repeated string asset_names = 2;
        Returns:
        This builder for chaining.
      • addAssetNamesBytes

        public Feed.Builder addAssetNamesBytes​(com.google.protobuf.ByteString value)
         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 and asset_types are exported to the feed. For
         example:
         `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
         See [Resource
         Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
         for more info.
         
        repeated string asset_names = 2;
        Parameters:
        value - The bytes of the assetNames to add.
        Returns:
        This builder for chaining.
      • getAssetTypesList

        public com.google.protobuf.ProtocolStringList getAssetTypesList()
         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 and asset_types are exported to the feed.
         For example:
         "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
         Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
         for all supported asset types.
         
        repeated string asset_types = 3;
        Specified by:
        getAssetTypesList in interface FeedOrBuilder
        Returns:
        A list containing the assetTypes.
      • getAssetTypesCount

        public int getAssetTypesCount()
         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 and asset_types are exported to the feed.
         For example:
         "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
         Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
         for all supported asset types.
         
        repeated string asset_types = 3;
        Specified by:
        getAssetTypesCount in interface FeedOrBuilder
        Returns:
        The count of assetTypes.
      • getAssetTypes

        public String getAssetTypes​(int index)
         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 and asset_types are exported to the feed.
         For example:
         "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
         Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
         for all supported asset types.
         
        repeated string asset_types = 3;
        Specified by:
        getAssetTypes in interface FeedOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The assetTypes at the given index.
      • getAssetTypesBytes

        public com.google.protobuf.ByteString getAssetTypesBytes​(int index)
         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 and asset_types are exported to the feed.
         For example:
         "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
         Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
         for all supported asset types.
         
        repeated string asset_types = 3;
        Specified by:
        getAssetTypesBytes in interface FeedOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the assetTypes at the given index.
      • setAssetTypes

        public Feed.Builder setAssetTypes​(int index,
                                          String value)
         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 and asset_types are exported to the feed.
         For example:
         "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
         Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
         for all supported asset types.
         
        repeated string asset_types = 3;
        Parameters:
        index - The index to set the value at.
        value - The assetTypes to set.
        Returns:
        This builder for chaining.
      • addAssetTypes

        public Feed.Builder addAssetTypes​(String value)
         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 and asset_types are exported to the feed.
         For example:
         "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
         Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
         for all supported asset types.
         
        repeated string asset_types = 3;
        Parameters:
        value - The assetTypes to add.
        Returns:
        This builder for chaining.
      • addAllAssetTypes

        public Feed.Builder addAllAssetTypes​(Iterable<String> values)
         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 and asset_types are exported to the feed.
         For example:
         "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
         Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
         for all supported asset types.
         
        repeated string asset_types = 3;
        Parameters:
        values - The assetTypes to add.
        Returns:
        This builder for chaining.
      • clearAssetTypes

        public Feed.Builder clearAssetTypes()
         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 and asset_types are exported to the feed.
         For example:
         "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
         Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
         for all supported asset types.
         
        repeated string asset_types = 3;
        Returns:
        This builder for chaining.
      • addAssetTypesBytes

        public Feed.Builder addAssetTypesBytes​(com.google.protobuf.ByteString value)
         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 and asset_types are exported to the feed.
         For example:
         "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
         Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
         for all supported asset types.
         
        repeated string asset_types = 3;
        Parameters:
        value - The bytes of the assetTypes to add.
        Returns:
        This builder for chaining.
      • getContentTypeValue

        public int getContentTypeValue()
         Asset content type. If not specified, no content but the asset name and
         type will be returned.
         
        .google.cloud.asset.v1p2beta1.ContentType content_type = 4;
        Specified by:
        getContentTypeValue in interface FeedOrBuilder
        Returns:
        The enum numeric value on the wire for contentType.
      • setContentTypeValue

        public Feed.Builder setContentTypeValue​(int value)
         Asset content type. If not specified, no content but the asset name and
         type will be returned.
         
        .google.cloud.asset.v1p2beta1.ContentType content_type = 4;
        Parameters:
        value - The enum numeric value on the wire for contentType to set.
        Returns:
        This builder for chaining.
      • getContentType

        public ContentType getContentType()
         Asset content type. If not specified, no content but the asset name and
         type will be returned.
         
        .google.cloud.asset.v1p2beta1.ContentType content_type = 4;
        Specified by:
        getContentType in interface FeedOrBuilder
        Returns:
        The contentType.
      • setContentType

        public Feed.Builder setContentType​(ContentType value)
         Asset content type. If not specified, no content but the asset name and
         type will be returned.
         
        .google.cloud.asset.v1p2beta1.ContentType content_type = 4;
        Parameters:
        value - The contentType to set.
        Returns:
        This builder for chaining.
      • clearContentType

        public Feed.Builder clearContentType()
         Asset content type. If not specified, no content but the asset name and
         type will be returned.
         
        .google.cloud.asset.v1p2beta1.ContentType content_type = 4;
        Returns:
        This builder for chaining.
      • hasFeedOutputConfig

        public boolean hasFeedOutputConfig()
         Required. Feed output configuration defining where the asset updates are
         published to.
         
        .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasFeedOutputConfig in interface FeedOrBuilder
        Returns:
        Whether the feedOutputConfig field is set.
      • getFeedOutputConfig

        public FeedOutputConfig getFeedOutputConfig()
         Required. Feed output configuration defining where the asset updates are
         published to.
         
        .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getFeedOutputConfig in interface FeedOrBuilder
        Returns:
        The feedOutputConfig.
      • setFeedOutputConfig

        public Feed.Builder setFeedOutputConfig​(FeedOutputConfig value)
         Required. Feed output configuration defining where the asset updates are
         published to.
         
        .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
      • setFeedOutputConfig

        public Feed.Builder setFeedOutputConfig​(FeedOutputConfig.Builder builderForValue)
         Required. Feed output configuration defining where the asset updates are
         published to.
         
        .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
      • mergeFeedOutputConfig

        public Feed.Builder mergeFeedOutputConfig​(FeedOutputConfig value)
         Required. Feed output configuration defining where the asset updates are
         published to.
         
        .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
      • clearFeedOutputConfig

        public Feed.Builder clearFeedOutputConfig()
         Required. Feed output configuration defining where the asset updates are
         published to.
         
        .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
      • getFeedOutputConfigBuilder

        public FeedOutputConfig.Builder getFeedOutputConfigBuilder()
         Required. Feed output configuration defining where the asset updates are
         published to.
         
        .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
      • getFeedOutputConfigOrBuilder

        public FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder()
         Required. Feed output configuration defining where the asset updates are
         published to.
         
        .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getFeedOutputConfigOrBuilder in interface FeedOrBuilder
      • setUnknownFields

        public final Feed.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Feed.Builder>
      • mergeUnknownFields

        public final Feed.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Feed.Builder>