Class SavedQuery.Builder (3.46.0)

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

Implements

SavedQueryOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SavedQuery.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SavedQuery.Builder
Overrides

build()

public SavedQuery build()
Returns
Type Description
SavedQuery

buildPartial()

public SavedQuery buildPartial()
Returns
Type Description
SavedQuery

clear()

public SavedQuery.Builder clear()
Returns
Type Description
SavedQuery.Builder
Overrides

clearContent()

public SavedQuery.Builder clearContent()

The query content.

.google.cloud.asset.v1.SavedQuery.QueryContent content = 8;

Returns
Type Description
SavedQuery.Builder

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];

Returns
Type Description
SavedQuery.Builder

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
Type Description
SavedQuery.Builder

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
Type Description
SavedQuery.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public SavedQuery.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SavedQuery.Builder
Overrides

clearLabels()

public SavedQuery.Builder clearLabels()
Returns
Type Description
SavedQuery.Builder

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];

Returns
Type Description
SavedQuery.Builder

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
Type Description
SavedQuery.Builder

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
Type Description
SavedQuery.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SavedQuery.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SavedQuery.Builder
Overrides

clone()

public SavedQuery.Builder clone()
Returns
Type Description
SavedQuery.Builder
Overrides

containsLabels(String key)

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;

Parameter
Name Description
key String
Returns
Type Description
boolean

getContent()

public SavedQuery.QueryContent getContent()

The query content.

.google.cloud.asset.v1.SavedQuery.QueryContent content = 8;

Returns
Type Description
SavedQuery.QueryContent

The content.

getContentBuilder()

public SavedQuery.QueryContent.Builder getContentBuilder()

The query content.

.google.cloud.asset.v1.SavedQuery.QueryContent content = 8;

Returns
Type Description
SavedQuery.QueryContent.Builder

getContentOrBuilder()

public SavedQuery.QueryContentOrBuilder getContentOrBuilder()

The query content.

.google.cloud.asset.v1.SavedQuery.QueryContent content = 8;

Returns
Type Description
SavedQuery.QueryContentOrBuilder

getCreateTime()

public Timestamp getCreateTime()

Output only. The create time of this saved query.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The create time of this saved query.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The create time of this saved query.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

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];

Returns
Type Description
String

The creator.

getCreatorBytes()

public ByteString getCreatorBytes()

Output only. The account's email address who has created this saved query.

string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for creator.

getDefaultInstanceForType()

public SavedQuery getDefaultInstanceForType()
Returns
Type Description
SavedQuery

getDescription()

public String getDescription()

The description of this saved query. This value should be fewer than 255 characters.

string description = 2;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

The description of this saved query. This value should be fewer than 255 characters.

string description = 2;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

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;

Returns
Type Description
int

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;

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

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;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

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;

Parameter
Name Description
key String
Returns
Type Description
String

getLastUpdateTime()

public 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];

Returns
Type Description
Timestamp

The lastUpdateTime.

getLastUpdateTimeBuilder()

public 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];

Returns
Type Description
Builder

getLastUpdateTimeOrBuilder()

public 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];

Returns
Type Description
TimestampOrBuilder

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];

Returns
Type Description
String

The lastUpdater.

getLastUpdaterBytes()

public 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];

Returns
Type Description
ByteString

The bytes for lastUpdater.

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

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;

Returns
Type Description
String

The name.

getNameBytes()

public 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;

Returns
Type Description
ByteString

The bytes for name.

hasContent()

public boolean hasContent()

The query content.

.google.cloud.asset.v1.SavedQuery.QueryContent content = 8;

Returns
Type Description
boolean

Whether the content field is set.

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];

Returns
Type Description
boolean

Whether the createTime field is set.

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];

Returns
Type Description
boolean

Whether the lastUpdateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeContent(SavedQuery.QueryContent value)

public SavedQuery.Builder mergeContent(SavedQuery.QueryContent value)

The query content.

.google.cloud.asset.v1.SavedQuery.QueryContent content = 8;

Parameter
Name Description
value SavedQuery.QueryContent
Returns
Type Description
SavedQuery.Builder

mergeCreateTime(Timestamp value)

public SavedQuery.Builder mergeCreateTime(Timestamp value)

Output only. The create time of this saved query.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
SavedQuery.Builder

mergeFrom(SavedQuery other)

public SavedQuery.Builder mergeFrom(SavedQuery other)
Parameter
Name Description
other SavedQuery
Returns
Type Description
SavedQuery.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SavedQuery.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SavedQuery.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SavedQuery.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SavedQuery.Builder
Overrides

mergeLastUpdateTime(Timestamp value)

public SavedQuery.Builder mergeLastUpdateTime(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];

Parameter
Name Description
value Timestamp
Returns
Type Description
SavedQuery.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SavedQuery.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SavedQuery.Builder
Overrides

putAllLabels(Map<String,String> values)

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;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
SavedQuery.Builder

putLabels(String key, String value)

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;

Parameters
Name Description
key String
value String
Returns
Type Description
SavedQuery.Builder

removeLabels(String key)

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;

Parameter
Name Description
key String
Returns
Type Description
SavedQuery.Builder

setContent(SavedQuery.QueryContent value)

public SavedQuery.Builder setContent(SavedQuery.QueryContent value)

The query content.

.google.cloud.asset.v1.SavedQuery.QueryContent content = 8;

Parameter
Name Description
value SavedQuery.QueryContent
Returns
Type Description
SavedQuery.Builder

setContent(SavedQuery.QueryContent.Builder builderForValue)

public SavedQuery.Builder setContent(SavedQuery.QueryContent.Builder builderForValue)

The query content.

.google.cloud.asset.v1.SavedQuery.QueryContent content = 8;

Parameter
Name Description
builderForValue SavedQuery.QueryContent.Builder
Returns
Type Description
SavedQuery.Builder

setCreateTime(Timestamp value)

public SavedQuery.Builder setCreateTime(Timestamp value)

Output only. The create time of this saved query.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
SavedQuery.Builder

setCreateTime(Timestamp.Builder builderForValue)

public SavedQuery.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The create time of this saved query.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
SavedQuery.Builder

setCreator(String value)

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];

Parameter
Name Description
value String

The creator to set.

Returns
Type Description
SavedQuery.Builder

This builder for chaining.

setCreatorBytes(ByteString value)

public SavedQuery.Builder setCreatorBytes(ByteString value)

Output only. The account's email address who has created this saved query.

string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for creator to set.

Returns
Type Description
SavedQuery.Builder

This builder for chaining.

setDescription(String value)

public SavedQuery.Builder setDescription(String value)

The description of this saved query. This value should be fewer than 255 characters.

string description = 2;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
SavedQuery.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public SavedQuery.Builder setDescriptionBytes(ByteString value)

The description of this saved query. This value should be fewer than 255 characters.

string description = 2;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
SavedQuery.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public SavedQuery.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SavedQuery.Builder
Overrides

setLastUpdateTime(Timestamp value)

public SavedQuery.Builder setLastUpdateTime(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];

Parameter
Name Description
value Timestamp
Returns
Type Description
SavedQuery.Builder

setLastUpdateTime(Timestamp.Builder builderForValue)

public SavedQuery.Builder setLastUpdateTime(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];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
SavedQuery.Builder

setLastUpdater(String value)

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];

Parameter
Name Description
value String

The lastUpdater to set.

Returns
Type Description
SavedQuery.Builder

This builder for chaining.

setLastUpdaterBytes(ByteString value)

public SavedQuery.Builder setLastUpdaterBytes(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];

Parameter
Name Description
value ByteString

The bytes for lastUpdater to set.

Returns
Type Description
SavedQuery.Builder

This builder for chaining.

setName(String value)

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;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
SavedQuery.Builder

This builder for chaining.

setNameBytes(ByteString value)

public SavedQuery.Builder setNameBytes(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;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
SavedQuery.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SavedQuery.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SavedQuery.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SavedQuery.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SavedQuery.Builder
Overrides