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 Type
    Method
    Description
    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 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.
     
     
     
    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.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.
    int
    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.ProtocolStringList
    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.
    com.google.protobuf.ByteString
    The full name of the asset.
    The type of the asset.
    com.google.protobuf.ByteString
    The type of the asset.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    The unique identifier of the relationship type.
    com.google.protobuf.ByteString
    The unique identifier of the relationship type.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    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.
    The type of the asset.
    setAssetTypeBytes(com.google.protobuf.ByteString value)
    The type of the asset.
    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, 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

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods 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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<RelatedAsset.Builder>
    • clear

      public RelatedAsset.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<RelatedAsset.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<RelatedAsset.Builder>
    • getDefaultInstanceForType

      public RelatedAsset getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public RelatedAsset build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public RelatedAsset buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public RelatedAsset.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<RelatedAsset.Builder>
    • mergeFrom

      public RelatedAsset.Builder mergeFrom(RelatedAsset other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      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<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:
      getAsset in interface RelatedAssetOrBuilder
      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:
      getAssetBytes in interface RelatedAssetOrBuilder
      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:
      getAssetType in interface RelatedAssetOrBuilder
      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:
      getAssetTypeBytes in interface RelatedAssetOrBuilder
      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:
      getAncestorsList in interface RelatedAssetOrBuilder
      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:
      getAncestorsCount in interface RelatedAssetOrBuilder
      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:
      getAncestors in interface RelatedAssetOrBuilder
      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:
      getAncestorsBytes in interface RelatedAssetOrBuilder
      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:
      getRelationshipType in interface RelatedAssetOrBuilder
      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:
      getRelationshipTypeBytes in interface RelatedAssetOrBuilder
      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.