Package com.google.cloud.asset.v1
Class RelatedAsset.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<RelatedAsset.Builder>
-
- com.google.cloud.asset.v1.RelatedAsset.Builder
-
- All Implemented Interfaces:
RelatedAssetOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- RelatedAsset
public static final class RelatedAsset.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<RelatedAsset.Builder> implements RelatedAssetOrBuilder
An asset identifier in Google Cloud which contains its name, type and ancestors. An asset can be any resource in the Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), a resource outside the Google Cloud resource hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy (e.g. IAM policy). See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information.
Protobuf typegoogle.cloud.asset.v1.RelatedAsset
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RelatedAsset.BuilderaddAllAncestors(Iterable<String> values)The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names.RelatedAsset.BuilderaddAncestors(String value)The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names.RelatedAsset.BuilderaddAncestorsBytes(com.google.protobuf.ByteString value)The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names.RelatedAsset.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)RelatedAssetbuild()RelatedAssetbuildPartial()RelatedAsset.Builderclear()RelatedAsset.BuilderclearAncestors()The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names.RelatedAsset.BuilderclearAsset()The full name of the asset.RelatedAsset.BuilderclearAssetType()The type of the asset.RelatedAsset.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)RelatedAsset.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)RelatedAsset.BuilderclearRelationshipType()The unique identifier of the relationship type.RelatedAsset.Builderclone()StringgetAncestors(int index)The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names.com.google.protobuf.ByteStringgetAncestorsBytes(int index)The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names.intgetAncestorsCount()The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names.com.google.protobuf.ProtocolStringListgetAncestorsList()The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names.StringgetAsset()The full name of the asset.com.google.protobuf.ByteStringgetAssetBytes()The full name of the asset.StringgetAssetType()The type of the asset.com.google.protobuf.ByteStringgetAssetTypeBytes()The type of the asset.RelatedAssetgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()StringgetRelationshipType()The unique identifier of the relationship type.com.google.protobuf.ByteStringgetRelationshipTypeBytes()The unique identifier of the relationship type.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()RelatedAsset.BuildermergeFrom(RelatedAsset other)RelatedAsset.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)RelatedAsset.BuildermergeFrom(com.google.protobuf.Message other)RelatedAsset.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)RelatedAsset.BuildersetAncestors(int index, String value)The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names.RelatedAsset.BuildersetAsset(String value)The full name of the asset.RelatedAsset.BuildersetAssetBytes(com.google.protobuf.ByteString value)The full name of the asset.RelatedAsset.BuildersetAssetType(String value)The type of the asset.RelatedAsset.BuildersetAssetTypeBytes(com.google.protobuf.ByteString value)The type of the asset.RelatedAsset.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)RelatedAsset.BuildersetRelationshipType(String value)The unique identifier of the relationship type.RelatedAsset.BuildersetRelationshipTypeBytes(com.google.protobuf.ByteString value)The unique identifier of the relationship type.RelatedAsset.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)RelatedAsset.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<RelatedAsset.Builder>
-
clear
public RelatedAsset.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<RelatedAsset.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<RelatedAsset.Builder>
-
getDefaultInstanceForType
public RelatedAsset getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public RelatedAsset build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public RelatedAsset buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public RelatedAsset.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<RelatedAsset.Builder>
-
setField
public RelatedAsset.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RelatedAsset.Builder>
-
clearField
public RelatedAsset.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RelatedAsset.Builder>
-
clearOneof
public RelatedAsset.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<RelatedAsset.Builder>
-
setRepeatedField
public RelatedAsset.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RelatedAsset.Builder>
-
addRepeatedField
public RelatedAsset.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RelatedAsset.Builder>
-
mergeFrom
public RelatedAsset.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RelatedAsset.Builder>
-
mergeFrom
public RelatedAsset.Builder mergeFrom(RelatedAsset other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<RelatedAsset.Builder>
-
mergeFrom
public RelatedAsset.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RelatedAsset.Builder>- Throws:
IOException
-
getAsset
public String getAsset()
The full name of the asset. 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 information.
string asset = 1 [(.google.api.resource_reference) = { ... }- Specified by:
getAssetin interfaceRelatedAssetOrBuilder- Returns:
- The asset.
-
getAssetBytes
public com.google.protobuf.ByteString getAssetBytes()
The full name of the asset. 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 information.
string asset = 1 [(.google.api.resource_reference) = { ... }- Specified by:
getAssetBytesin interfaceRelatedAssetOrBuilder- Returns:
- The bytes for asset.
-
setAsset
public RelatedAsset.Builder setAsset(String value)
The full name of the asset. 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 information.
string asset = 1 [(.google.api.resource_reference) = { ... }- Parameters:
value- The asset to set.- Returns:
- This builder for chaining.
-
clearAsset
public RelatedAsset.Builder clearAsset()
The full name of the asset. 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 information.
string asset = 1 [(.google.api.resource_reference) = { ... }- Returns:
- This builder for chaining.
-
setAssetBytes
public RelatedAsset.Builder setAssetBytes(com.google.protobuf.ByteString value)
The full name of the asset. 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 information.
string asset = 1 [(.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for asset to set.- Returns:
- This builder for chaining.
-
getAssetType
public String getAssetType()
The type of the asset. Example: `compute.googleapis.com/Disk` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information.
string asset_type = 2;- Specified by:
getAssetTypein interfaceRelatedAssetOrBuilder- Returns:
- The assetType.
-
getAssetTypeBytes
public com.google.protobuf.ByteString getAssetTypeBytes()
The type of the asset. Example: `compute.googleapis.com/Disk` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information.
string asset_type = 2;- Specified by:
getAssetTypeBytesin interfaceRelatedAssetOrBuilder- Returns:
- The bytes for assetType.
-
setAssetType
public RelatedAsset.Builder setAssetType(String value)
The type of the asset. Example: `compute.googleapis.com/Disk` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information.
string asset_type = 2;- Parameters:
value- The assetType to set.- Returns:
- This builder for chaining.
-
clearAssetType
public RelatedAsset.Builder clearAssetType()
The type of the asset. Example: `compute.googleapis.com/Disk` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information.
string asset_type = 2;- Returns:
- This builder for chaining.
-
setAssetTypeBytes
public RelatedAsset.Builder setAssetTypeBytes(com.google.protobuf.ByteString value)
The type of the asset. Example: `compute.googleapis.com/Disk` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information.
string asset_type = 2;- Parameters:
value- The bytes for assetType to set.- Returns:
- This builder for chaining.
-
getAncestorsList
public com.google.protobuf.ProtocolStringList getAncestorsList()
The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
repeated string ancestors = 3;- Specified by:
getAncestorsListin interfaceRelatedAssetOrBuilder- Returns:
- A list containing the ancestors.
-
getAncestorsCount
public int getAncestorsCount()
The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
repeated string ancestors = 3;- Specified by:
getAncestorsCountin interfaceRelatedAssetOrBuilder- Returns:
- The count of ancestors.
-
getAncestors
public String getAncestors(int index)
The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
repeated string ancestors = 3;- Specified by:
getAncestorsin interfaceRelatedAssetOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The ancestors at the given index.
-
getAncestorsBytes
public com.google.protobuf.ByteString getAncestorsBytes(int index)
The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
repeated string ancestors = 3;- Specified by:
getAncestorsBytesin interfaceRelatedAssetOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the ancestors at the given index.
-
setAncestors
public RelatedAsset.Builder setAncestors(int index, String value)
The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
repeated string ancestors = 3;- Parameters:
index- The index to set the value at.value- The ancestors to set.- Returns:
- This builder for chaining.
-
addAncestors
public RelatedAsset.Builder addAncestors(String value)
The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
repeated string ancestors = 3;- Parameters:
value- The ancestors to add.- Returns:
- This builder for chaining.
-
addAllAncestors
public RelatedAsset.Builder addAllAncestors(Iterable<String> values)
The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
repeated string ancestors = 3;- Parameters:
values- The ancestors to add.- Returns:
- This builder for chaining.
-
clearAncestors
public RelatedAsset.Builder clearAncestors()
The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
repeated string ancestors = 3;- Returns:
- This builder for chaining.
-
addAncestorsBytes
public RelatedAsset.Builder addAncestorsBytes(com.google.protobuf.ByteString value)
The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
repeated string ancestors = 3;- Parameters:
value- The bytes of the ancestors to add.- Returns:
- This builder for chaining.
-
getRelationshipType
public String getRelationshipType()
The unique identifier of the relationship type. Example: `INSTANCE_TO_INSTANCEGROUP`
string relationship_type = 4;- Specified by:
getRelationshipTypein interfaceRelatedAssetOrBuilder- Returns:
- The relationshipType.
-
getRelationshipTypeBytes
public com.google.protobuf.ByteString getRelationshipTypeBytes()
The unique identifier of the relationship type. Example: `INSTANCE_TO_INSTANCEGROUP`
string relationship_type = 4;- Specified by:
getRelationshipTypeBytesin interfaceRelatedAssetOrBuilder- Returns:
- The bytes for relationshipType.
-
setRelationshipType
public RelatedAsset.Builder setRelationshipType(String value)
The unique identifier of the relationship type. Example: `INSTANCE_TO_INSTANCEGROUP`
string relationship_type = 4;- Parameters:
value- The relationshipType to set.- Returns:
- This builder for chaining.
-
clearRelationshipType
public RelatedAsset.Builder clearRelationshipType()
The unique identifier of the relationship type. Example: `INSTANCE_TO_INSTANCEGROUP`
string relationship_type = 4;- Returns:
- This builder for chaining.
-
setRelationshipTypeBytes
public RelatedAsset.Builder setRelationshipTypeBytes(com.google.protobuf.ByteString value)
The unique identifier of the relationship type. Example: `INSTANCE_TO_INSTANCEGROUP`
string relationship_type = 4;- Parameters:
value- The bytes for relationshipType to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final RelatedAsset.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<RelatedAsset.Builder>
-
mergeUnknownFields
public final RelatedAsset.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<RelatedAsset.Builder>
-
-