Class SavedQuery.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SavedQuery.Builder>
com.google.cloud.asset.v1.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.GeneratedMessage.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 Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<SavedQuery.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<SavedQuery.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.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
    • 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>
    • mergeFrom

      public SavedQuery.Builder mergeFrom(SavedQuery other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.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
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels 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
    • clearLabels

      public SavedQuery.Builder clearLabels()
    • 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.
    • getContent

      public SavedQuery.QueryContent getContent()
       The query content.
       
      .google.cloud.asset.v1.SavedQuery.QueryContent content = 8;
      Specified by:
      getContent in interface SavedQueryOrBuilder
      Returns:
      The content.
    • setContent

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

      public SavedQuery.Builder setContent(SavedQuery.QueryContent.Builder builderForValue)
       The query content.
       
      .google.cloud.asset.v1.SavedQuery.QueryContent content = 8;
    • mergeContent

      public SavedQuery.Builder mergeContent(SavedQuery.QueryContent value)
       The query content.
       
      .google.cloud.asset.v1.SavedQuery.QueryContent content = 8;
    • 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;
    • getContentOrBuilder

      public SavedQuery.QueryContentOrBuilder getContentOrBuilder()
       The query content.
       
      .google.cloud.asset.v1.SavedQuery.QueryContent content = 8;
      Specified by:
      getContentOrBuilder in interface SavedQueryOrBuilder