Class SavedQuery.Builder

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

    public static final class SavedQuery.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<SavedQuery.Builder>
    implements SavedQueryOrBuilder
     A saved query which can be shared with others or used later.
     
    Protobuf type google.cloud.asset.v1.SavedQuery
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<SavedQuery.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<SavedQuery.Builder>
      • internalGetFieldAccessorTable

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

        public SavedQuery.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<SavedQuery.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<SavedQuery.Builder>
      • getDefaultInstanceForType

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

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

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

        public SavedQuery.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<SavedQuery.Builder>
      • setField

        public SavedQuery.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<SavedQuery.Builder>
      • clearField

        public SavedQuery.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<SavedQuery.Builder>
      • clearOneof

        public SavedQuery.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<SavedQuery.Builder>
      • setRepeatedField

        public SavedQuery.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<SavedQuery.Builder>
      • addRepeatedField

        public SavedQuery.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<SavedQuery.Builder>
      • mergeFrom

        public SavedQuery.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<SavedQuery.Builder>
      • isInitialized

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

        public SavedQuery.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<SavedQuery.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         The resource name of the saved query. The format must be:
        
         * projects/project_number/savedQueries/saved_query_id
         * folders/folder_number/savedQueries/saved_query_id
         * organizations/organization_number/savedQueries/saved_query_id
         
        string name = 1;
        Specified by:
        getName in interface SavedQueryOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The resource name of the saved query. The format must be:
        
         * projects/project_number/savedQueries/saved_query_id
         * folders/folder_number/savedQueries/saved_query_id
         * organizations/organization_number/savedQueries/saved_query_id
         
        string name = 1;
        Specified by:
        getNameBytes in interface SavedQueryOrBuilder
        Returns:
        The bytes for name.
      • setName

        public SavedQuery.Builder setName​(String value)
         The resource name of the saved query. The format must be:
        
         * projects/project_number/savedQueries/saved_query_id
         * folders/folder_number/savedQueries/saved_query_id
         * organizations/organization_number/savedQueries/saved_query_id
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public SavedQuery.Builder clearName()
         The resource name of the saved query. The format must be:
        
         * projects/project_number/savedQueries/saved_query_id
         * folders/folder_number/savedQueries/saved_query_id
         * organizations/organization_number/savedQueries/saved_query_id
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public SavedQuery.Builder setNameBytes​(com.google.protobuf.ByteString value)
         The resource name of the saved query. The format must be:
        
         * projects/project_number/savedQueries/saved_query_id
         * folders/folder_number/savedQueries/saved_query_id
         * organizations/organization_number/savedQueries/saved_query_id
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getDescription

        public String getDescription()
         The description of this saved query. This value should be fewer than 255
         characters.
         
        string description = 2;
        Specified by:
        getDescription in interface SavedQueryOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         The description of this saved query. This value should be fewer than 255
         characters.
         
        string description = 2;
        Specified by:
        getDescriptionBytes in interface SavedQueryOrBuilder
        Returns:
        The bytes for description.
      • setDescription

        public SavedQuery.Builder setDescription​(String value)
         The description of this saved query. This value should be fewer than 255
         characters.
         
        string description = 2;
        Parameters:
        value - The description to set.
        Returns:
        This builder for chaining.
      • clearDescription

        public SavedQuery.Builder clearDescription()
         The description of this saved query. This value should be fewer than 255
         characters.
         
        string description = 2;
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public SavedQuery.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
         The description of this saved query. This value should be fewer than 255
         characters.
         
        string description = 2;
        Parameters:
        value - The bytes for description to set.
        Returns:
        This builder for chaining.
      • hasCreateTime

        public boolean hasCreateTime()
         Output only. The create time of this saved query.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCreateTime in interface SavedQueryOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. The create time of this saved query.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTime in interface SavedQueryOrBuilder
        Returns:
        The createTime.
      • setCreateTime

        public SavedQuery.Builder setCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The create time of this saved query.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setCreateTime

        public SavedQuery.Builder setCreateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. The create time of this saved query.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeCreateTime

        public SavedQuery.Builder mergeCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The create time of this saved query.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearCreateTime

        public SavedQuery.Builder clearCreateTime()
         Output only. The create time of this saved query.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
         Output only. The create time of this saved query.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. The create time of this saved query.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTimeOrBuilder in interface SavedQueryOrBuilder
      • getCreator

        public String getCreator()
         Output only. The account's email address who has created this saved query.
         
        string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreator in interface SavedQueryOrBuilder
        Returns:
        The creator.
      • getCreatorBytes

        public com.google.protobuf.ByteString getCreatorBytes()
         Output only. The account's email address who has created this saved query.
         
        string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreatorBytes in interface SavedQueryOrBuilder
        Returns:
        The bytes for creator.
      • setCreator

        public SavedQuery.Builder setCreator​(String value)
         Output only. The account's email address who has created this saved query.
         
        string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The creator to set.
        Returns:
        This builder for chaining.
      • clearCreator

        public SavedQuery.Builder clearCreator()
         Output only. The account's email address who has created this saved query.
         
        string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setCreatorBytes

        public SavedQuery.Builder setCreatorBytes​(com.google.protobuf.ByteString value)
         Output only. The account's email address who has created this saved query.
         
        string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for creator to set.
        Returns:
        This builder for chaining.
      • hasLastUpdateTime

        public boolean hasLastUpdateTime()
         Output only. The last update time of this saved query.
         
        .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasLastUpdateTime in interface SavedQueryOrBuilder
        Returns:
        Whether the lastUpdateTime field is set.
      • getLastUpdateTime

        public com.google.protobuf.Timestamp getLastUpdateTime()
         Output only. The last update time of this saved query.
         
        .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLastUpdateTime in interface SavedQueryOrBuilder
        Returns:
        The lastUpdateTime.
      • setLastUpdateTime

        public SavedQuery.Builder setLastUpdateTime​(com.google.protobuf.Timestamp value)
         Output only. The last update time of this saved query.
         
        .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setLastUpdateTime

        public SavedQuery.Builder setLastUpdateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. The last update time of this saved query.
         
        .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeLastUpdateTime

        public SavedQuery.Builder mergeLastUpdateTime​(com.google.protobuf.Timestamp value)
         Output only. The last update time of this saved query.
         
        .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearLastUpdateTime

        public SavedQuery.Builder clearLastUpdateTime()
         Output only. The last update time of this saved query.
         
        .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getLastUpdateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getLastUpdateTimeBuilder()
         Output only. The last update time of this saved query.
         
        .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getLastUpdateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder()
         Output only. The last update time of this saved query.
         
        .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLastUpdateTimeOrBuilder in interface SavedQueryOrBuilder
      • getLastUpdater

        public String getLastUpdater()
         Output only. The account's email address who has updated this saved query
         most recently.
         
        string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLastUpdater in interface SavedQueryOrBuilder
        Returns:
        The lastUpdater.
      • getLastUpdaterBytes

        public com.google.protobuf.ByteString getLastUpdaterBytes()
         Output only. The account's email address who has updated this saved query
         most recently.
         
        string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLastUpdaterBytes in interface SavedQueryOrBuilder
        Returns:
        The bytes for lastUpdater.
      • setLastUpdater

        public SavedQuery.Builder setLastUpdater​(String value)
         Output only. The account's email address who has updated this saved query
         most recently.
         
        string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The lastUpdater to set.
        Returns:
        This builder for chaining.
      • clearLastUpdater

        public SavedQuery.Builder clearLastUpdater()
         Output only. The account's email address who has updated this saved query
         most recently.
         
        string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setLastUpdaterBytes

        public SavedQuery.Builder setLastUpdaterBytes​(com.google.protobuf.ByteString value)
         Output only. The account's email address who has updated this saved query
         most recently.
         
        string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for lastUpdater to set.
        Returns:
        This builder for chaining.
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: SavedQueryOrBuilder
         Labels applied on the resource.
         This value should not contain more than 10 entries. The key and value of
         each entry must be non-empty and fewer than 64 characters.
         
        map<string, string> labels = 7;
        Specified by:
        getLabelsCount in interface SavedQueryOrBuilder
      • containsLabels

        public boolean containsLabels​(String key)
         Labels applied on the resource.
         This value should not contain more than 10 entries. The key and value of
         each entry must be non-empty and fewer than 64 characters.
         
        map<string, string> labels = 7;
        Specified by:
        containsLabels in interface SavedQueryOrBuilder
      • getLabelsMap

        public Map<String,​String> getLabelsMap()
         Labels applied on the resource.
         This value should not contain more than 10 entries. The key and value of
         each entry must be non-empty and fewer than 64 characters.
         
        map<string, string> labels = 7;
        Specified by:
        getLabelsMap in interface SavedQueryOrBuilder
      • getLabelsOrDefault

        public String getLabelsOrDefault​(String key,
                                         String defaultValue)
         Labels applied on the resource.
         This value should not contain more than 10 entries. The key and value of
         each entry must be non-empty and fewer than 64 characters.
         
        map<string, string> labels = 7;
        Specified by:
        getLabelsOrDefault in interface SavedQueryOrBuilder
      • getLabelsOrThrow

        public String getLabelsOrThrow​(String key)
         Labels applied on the resource.
         This value should not contain more than 10 entries. The key and value of
         each entry must be non-empty and fewer than 64 characters.
         
        map<string, string> labels = 7;
        Specified by:
        getLabelsOrThrow in interface SavedQueryOrBuilder
      • removeLabels

        public SavedQuery.Builder removeLabels​(String key)
         Labels applied on the resource.
         This value should not contain more than 10 entries. The key and value of
         each entry must be non-empty and fewer than 64 characters.
         
        map<string, string> labels = 7;
      • getMutableLabels

        @Deprecated
        public Map<String,​String> getMutableLabels()
        Deprecated.
        Use alternate mutation accessors instead.
      • putLabels

        public SavedQuery.Builder putLabels​(String key,
                                            String value)
         Labels applied on the resource.
         This value should not contain more than 10 entries. The key and value of
         each entry must be non-empty and fewer than 64 characters.
         
        map<string, string> labels = 7;
      • putAllLabels

        public SavedQuery.Builder putAllLabels​(Map<String,​String> values)
         Labels applied on the resource.
         This value should not contain more than 10 entries. The key and value of
         each entry must be non-empty and fewer than 64 characters.
         
        map<string, string> labels = 7;
      • hasContent

        public boolean hasContent()
         The query content.
         
        .google.cloud.asset.v1.SavedQuery.QueryContent content = 8;
        Specified by:
        hasContent in interface SavedQueryOrBuilder
        Returns:
        Whether the content field is set.
      • clearContent

        public SavedQuery.Builder clearContent()
         The query content.
         
        .google.cloud.asset.v1.SavedQuery.QueryContent content = 8;
      • getContentBuilder

        public SavedQuery.QueryContent.Builder getContentBuilder()
         The query content.
         
        .google.cloud.asset.v1.SavedQuery.QueryContent content = 8;
      • setUnknownFields

        public final SavedQuery.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<SavedQuery.Builder>
      • mergeUnknownFields

        public final SavedQuery.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<SavedQuery.Builder>