Class StandardResourceMetadata.Builder (3.4.0)

public static final class StandardResourceMetadata.Builder extends GeneratedMessageV3.Builder<StandardResourceMetadata.Builder> implements StandardResourceMetadataOrBuilder

The standard metadata of a cloud resource.

Protobuf type google.cloud.asset.v1p1beta1.StandardResourceMetadata

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAdditionalAttributes(String value)

public StandardResourceMetadata.Builder addAdditionalAttributes(String value)

Additional searchable attributes of this resource. Informational only. The exact set of attributes is subject to change. For example: project id, DNS name etc.

repeated string additional_attributes = 10;

Parameter
NameDescription
valueString

The additionalAttributes to add.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

addAdditionalAttributesBytes(ByteString value)

public StandardResourceMetadata.Builder addAdditionalAttributesBytes(ByteString value)

Additional searchable attributes of this resource. Informational only. The exact set of attributes is subject to change. For example: project id, DNS name etc.

repeated string additional_attributes = 10;

Parameter
NameDescription
valueByteString

The bytes of the additionalAttributes to add.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

addAllAdditionalAttributes(Iterable<String> values)

public StandardResourceMetadata.Builder addAllAdditionalAttributes(Iterable<String> values)

Additional searchable attributes of this resource. Informational only. The exact set of attributes is subject to change. For example: project id, DNS name etc.

repeated string additional_attributes = 10;

Parameter
NameDescription
valuesIterable<String>

The additionalAttributes to add.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

addAllNetworkTags(Iterable<String> values)

public StandardResourceMetadata.Builder addAllNetworkTags(Iterable<String> values)

Network tags associated with this resource. Like labels, network tags are a type of annotations used to group GCP resources. See Labelling GCP resources for more information.

repeated string network_tags = 13;

Parameter
NameDescription
valuesIterable<String>

The networkTags to add.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

addNetworkTags(String value)

public StandardResourceMetadata.Builder addNetworkTags(String value)

Network tags associated with this resource. Like labels, network tags are a type of annotations used to group GCP resources. See Labelling GCP resources for more information.

repeated string network_tags = 13;

Parameter
NameDescription
valueString

The networkTags to add.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

addNetworkTagsBytes(ByteString value)

public StandardResourceMetadata.Builder addNetworkTagsBytes(ByteString value)

Network tags associated with this resource. Like labels, network tags are a type of annotations used to group GCP resources. See Labelling GCP resources for more information.

repeated string network_tags = 13;

Parameter
NameDescription
valueByteString

The bytes of the networkTags to add.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public StandardResourceMetadata.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
StandardResourceMetadata.Builder
Overrides

build()

public StandardResourceMetadata build()
Returns
TypeDescription
StandardResourceMetadata

buildPartial()

public StandardResourceMetadata buildPartial()
Returns
TypeDescription
StandardResourceMetadata

clear()

public StandardResourceMetadata.Builder clear()
Returns
TypeDescription
StandardResourceMetadata.Builder
Overrides

clearAdditionalAttributes()

public StandardResourceMetadata.Builder clearAdditionalAttributes()

Additional searchable attributes of this resource. Informational only. The exact set of attributes is subject to change. For example: project id, DNS name etc.

repeated string additional_attributes = 10;

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

clearAssetType()

public StandardResourceMetadata.Builder clearAssetType()

The type of this resource. For example: "compute.googleapis.com/Disk".

string asset_type = 2;

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

clearDescription()

public StandardResourceMetadata.Builder clearDescription()

One or more paragraphs of text description of this resource. Maximum length could be up to 1M bytes.

string description = 5;

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

clearDisplayName()

public StandardResourceMetadata.Builder clearDisplayName()

The display name of this resource.

string display_name = 4;

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public StandardResourceMetadata.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
StandardResourceMetadata.Builder
Overrides

clearLabels()

public StandardResourceMetadata.Builder clearLabels()
Returns
TypeDescription
StandardResourceMetadata.Builder

clearLocation()

public StandardResourceMetadata.Builder clearLocation()

Location can be "global", regional like "us-east1", or zonal like "us-west1-b".

string location = 11;

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

clearName()

public StandardResourceMetadata.Builder clearName()

The full resource name. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See Resource Names for more information.

string name = 1;

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

clearNetworkTags()

public StandardResourceMetadata.Builder clearNetworkTags()

Network tags associated with this resource. Like labels, network tags are a type of annotations used to group GCP resources. See Labelling GCP resources for more information.

repeated string network_tags = 13;

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public StandardResourceMetadata.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
StandardResourceMetadata.Builder
Overrides

clearProject()

public StandardResourceMetadata.Builder clearProject()

The project that this resource belongs to, in the form of projects/{project_number}.

string project = 3;

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

clone()

public StandardResourceMetadata.Builder clone()
Returns
TypeDescription
StandardResourceMetadata.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Labels associated with this resource. See Labelling and grouping GCP resources for more information.

map<string, string> labels = 12;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getAdditionalAttributes(int index)

public String getAdditionalAttributes(int index)

Additional searchable attributes of this resource. Informational only. The exact set of attributes is subject to change. For example: project id, DNS name etc.

repeated string additional_attributes = 10;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The additionalAttributes at the given index.

getAdditionalAttributesBytes(int index)

public ByteString getAdditionalAttributesBytes(int index)

Additional searchable attributes of this resource. Informational only. The exact set of attributes is subject to change. For example: project id, DNS name etc.

repeated string additional_attributes = 10;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the additionalAttributes at the given index.

getAdditionalAttributesCount()

public int getAdditionalAttributesCount()

Additional searchable attributes of this resource. Informational only. The exact set of attributes is subject to change. For example: project id, DNS name etc.

repeated string additional_attributes = 10;

Returns
TypeDescription
int

The count of additionalAttributes.

getAdditionalAttributesList()

public ProtocolStringList getAdditionalAttributesList()

Additional searchable attributes of this resource. Informational only. The exact set of attributes is subject to change. For example: project id, DNS name etc.

repeated string additional_attributes = 10;

Returns
TypeDescription
ProtocolStringList

A list containing the additionalAttributes.

getAssetType()

public String getAssetType()

The type of this resource. For example: "compute.googleapis.com/Disk".

string asset_type = 2;

Returns
TypeDescription
String

The assetType.

getAssetTypeBytes()

public ByteString getAssetTypeBytes()

The type of this resource. For example: "compute.googleapis.com/Disk".

string asset_type = 2;

Returns
TypeDescription
ByteString

The bytes for assetType.

getDefaultInstanceForType()

public StandardResourceMetadata getDefaultInstanceForType()
Returns
TypeDescription
StandardResourceMetadata

getDescription()

public String getDescription()

One or more paragraphs of text description of this resource. Maximum length could be up to 1M bytes.

string description = 5;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

One or more paragraphs of text description of this resource. Maximum length could be up to 1M bytes.

string description = 5;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

The display name of this resource.

string display_name = 4;

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

The display name of this resource.

string display_name = 4;

Returns
TypeDescription
ByteString

The bytes for displayName.

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Labels associated with this resource. See Labelling and grouping GCP resources for more information.

map<string, string> labels = 12;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Labels associated with this resource. See Labelling and grouping GCP resources for more information.

map<string, string> labels = 12;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Labels associated with this resource. See Labelling and grouping GCP resources for more information.

map<string, string> labels = 12;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Labels associated with this resource. See Labelling and grouping GCP resources for more information.

map<string, string> labels = 12;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getLocation()

public String getLocation()

Location can be "global", regional like "us-east1", or zonal like "us-west1-b".

string location = 11;

Returns
TypeDescription
String

The location.

getLocationBytes()

public ByteString getLocationBytes()

Location can be "global", regional like "us-east1", or zonal like "us-west1-b".

string location = 11;

Returns
TypeDescription
ByteString

The bytes for location.

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getName()

public String getName()

The full resource name. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See Resource Names for more information.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The full resource name. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See Resource Names for more information.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getNetworkTags(int index)

public String getNetworkTags(int index)

Network tags associated with this resource. Like labels, network tags are a type of annotations used to group GCP resources. See Labelling GCP resources for more information.

repeated string network_tags = 13;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The networkTags at the given index.

getNetworkTagsBytes(int index)

public ByteString getNetworkTagsBytes(int index)

Network tags associated with this resource. Like labels, network tags are a type of annotations used to group GCP resources. See Labelling GCP resources for more information.

repeated string network_tags = 13;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the networkTags at the given index.

getNetworkTagsCount()

public int getNetworkTagsCount()

Network tags associated with this resource. Like labels, network tags are a type of annotations used to group GCP resources. See Labelling GCP resources for more information.

repeated string network_tags = 13;

Returns
TypeDescription
int

The count of networkTags.

getNetworkTagsList()

public ProtocolStringList getNetworkTagsList()

Network tags associated with this resource. Like labels, network tags are a type of annotations used to group GCP resources. See Labelling GCP resources for more information.

repeated string network_tags = 13;

Returns
TypeDescription
ProtocolStringList

A list containing the networkTags.

getProject()

public String getProject()

The project that this resource belongs to, in the form of projects/{project_number}.

string project = 3;

Returns
TypeDescription
String

The project.

getProjectBytes()

public ByteString getProjectBytes()

The project that this resource belongs to, in the form of projects/{project_number}.

string project = 3;

Returns
TypeDescription
ByteString

The bytes for project.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(StandardResourceMetadata other)

public StandardResourceMetadata.Builder mergeFrom(StandardResourceMetadata other)
Parameter
NameDescription
otherStandardResourceMetadata
Returns
TypeDescription
StandardResourceMetadata.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public StandardResourceMetadata.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StandardResourceMetadata.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public StandardResourceMetadata.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
StandardResourceMetadata.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final StandardResourceMetadata.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
StandardResourceMetadata.Builder
Overrides

putAllLabels(Map<String,String> values)

public StandardResourceMetadata.Builder putAllLabels(Map<String,String> values)

Labels associated with this resource. See Labelling and grouping GCP resources for more information.

map<string, string> labels = 12;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
StandardResourceMetadata.Builder

putLabels(String key, String value)

public StandardResourceMetadata.Builder putLabels(String key, String value)

Labels associated with this resource. See Labelling and grouping GCP resources for more information.

map<string, string> labels = 12;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
StandardResourceMetadata.Builder

removeLabels(String key)

public StandardResourceMetadata.Builder removeLabels(String key)

Labels associated with this resource. See Labelling and grouping GCP resources for more information.

map<string, string> labels = 12;

Parameter
NameDescription
keyString
Returns
TypeDescription
StandardResourceMetadata.Builder

setAdditionalAttributes(int index, String value)

public StandardResourceMetadata.Builder setAdditionalAttributes(int index, String value)

Additional searchable attributes of this resource. Informational only. The exact set of attributes is subject to change. For example: project id, DNS name etc.

repeated string additional_attributes = 10;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The additionalAttributes to set.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

setAssetType(String value)

public StandardResourceMetadata.Builder setAssetType(String value)

The type of this resource. For example: "compute.googleapis.com/Disk".

string asset_type = 2;

Parameter
NameDescription
valueString

The assetType to set.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

setAssetTypeBytes(ByteString value)

public StandardResourceMetadata.Builder setAssetTypeBytes(ByteString value)

The type of this resource. For example: "compute.googleapis.com/Disk".

string asset_type = 2;

Parameter
NameDescription
valueByteString

The bytes for assetType to set.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

setDescription(String value)

public StandardResourceMetadata.Builder setDescription(String value)

One or more paragraphs of text description of this resource. Maximum length could be up to 1M bytes.

string description = 5;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public StandardResourceMetadata.Builder setDescriptionBytes(ByteString value)

One or more paragraphs of text description of this resource. Maximum length could be up to 1M bytes.

string description = 5;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

setDisplayName(String value)

public StandardResourceMetadata.Builder setDisplayName(String value)

The display name of this resource.

string display_name = 4;

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public StandardResourceMetadata.Builder setDisplayNameBytes(ByteString value)

The display name of this resource.

string display_name = 4;

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public StandardResourceMetadata.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
StandardResourceMetadata.Builder
Overrides

setLocation(String value)

public StandardResourceMetadata.Builder setLocation(String value)

Location can be "global", regional like "us-east1", or zonal like "us-west1-b".

string location = 11;

Parameter
NameDescription
valueString

The location to set.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

setLocationBytes(ByteString value)

public StandardResourceMetadata.Builder setLocationBytes(ByteString value)

Location can be "global", regional like "us-east1", or zonal like "us-west1-b".

string location = 11;

Parameter
NameDescription
valueByteString

The bytes for location to set.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

setName(String value)

public StandardResourceMetadata.Builder setName(String value)

The full resource name. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See Resource Names for more information.

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

setNameBytes(ByteString value)

public StandardResourceMetadata.Builder setNameBytes(ByteString value)

The full resource name. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See Resource Names for more information.

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

setNetworkTags(int index, String value)

public StandardResourceMetadata.Builder setNetworkTags(int index, String value)

Network tags associated with this resource. Like labels, network tags are a type of annotations used to group GCP resources. See Labelling GCP resources for more information.

repeated string network_tags = 13;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The networkTags to set.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

setProject(String value)

public StandardResourceMetadata.Builder setProject(String value)

The project that this resource belongs to, in the form of projects/{project_number}.

string project = 3;

Parameter
NameDescription
valueString

The project to set.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

setProjectBytes(ByteString value)

public StandardResourceMetadata.Builder setProjectBytes(ByteString value)

The project that this resource belongs to, in the form of projects/{project_number}.

string project = 3;

Parameter
NameDescription
valueByteString

The bytes for project to set.

Returns
TypeDescription
StandardResourceMetadata.Builder

This builder for chaining.

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

public StandardResourceMetadata.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
StandardResourceMetadata.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final StandardResourceMetadata.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
StandardResourceMetadata.Builder
Overrides