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.GeneratedMessage.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.GeneratedMessage.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 type
google.cloud.asset.v1.RelatedAsset-
Method Summary
Modifier and TypeMethodDescriptionaddAllAncestors(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.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.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.build()clear()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.The full name of the asset.The type of the asset.The unique identifier of the relationship type.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.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.intThe 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.ProtocolStringListThe 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.getAsset()The full name of the asset.com.google.protobuf.ByteStringThe full name of the asset.The type of the asset.com.google.protobuf.ByteStringThe type of the asset.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe unique identifier of the relationship type.com.google.protobuf.ByteStringThe unique identifier of the relationship type.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(RelatedAsset other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) 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.The full name of the asset.setAssetBytes(com.google.protobuf.ByteString value) The full name of the asset.setAssetType(String value) The type of the asset.setAssetTypeBytes(com.google.protobuf.ByteString value) The type of the asset.setRelationshipType(String value) The unique identifier of the relationship type.setRelationshipTypeBytes(com.google.protobuf.ByteString value) The unique identifier of the relationship type.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<RelatedAsset.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.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.GeneratedMessage.Builder<RelatedAsset.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RelatedAsset.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
The unique identifier of the relationship type. Example: `INSTANCE_TO_INSTANCEGROUP`
string relationship_type = 4;- Returns:
- This builder for chaining.
-
setRelationshipTypeBytes
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.
-