Package com.google.cloud.asset.v1p2beta1
Class Asset.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
- com.google.cloud.asset.v1p2beta1.Asset.Builder
-
- All Implemented Interfaces:
AssetOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Asset
public static final class Asset.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder> implements AssetOrBuilder
Cloud asset. This includes all Google Cloud Platform resources, Cloud IAM policies, and other non-GCP assets.
Protobuf typegoogle.cloud.asset.v1p2beta1.Asset
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Asset.BuilderaddAllAncestors(Iterable<String> values)Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names.Asset.BuilderaddAncestors(String value)Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names.Asset.BuilderaddAncestorsBytes(com.google.protobuf.ByteString value)Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names.Asset.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Assetbuild()AssetbuildPartial()Asset.Builderclear()Asset.BuilderclearAncestors()Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names.Asset.BuilderclearAssetType()Type of the asset.Asset.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)Asset.BuilderclearIamPolicy()Representation of the actual Cloud IAM policy set on a cloud resource.Asset.BuilderclearName()The full name of the asset.Asset.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)Asset.BuilderclearResource()Representation of the resource.Asset.Builderclone()StringgetAncestors(int index)Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names.com.google.protobuf.ByteStringgetAncestorsBytes(int index)Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names.intgetAncestorsCount()Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names.com.google.protobuf.ProtocolStringListgetAncestorsList()Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names.StringgetAssetType()Type of the asset.com.google.protobuf.ByteStringgetAssetTypeBytes()Type of the asset.AssetgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()com.google.iam.v1.PolicygetIamPolicy()Representation of the actual Cloud IAM policy set on a cloud resource.com.google.iam.v1.Policy.BuildergetIamPolicyBuilder()Representation of the actual Cloud IAM policy set on a cloud resource.com.google.iam.v1.PolicyOrBuildergetIamPolicyOrBuilder()Representation of the actual Cloud IAM policy set on a cloud resource.StringgetName()The full name of the asset.com.google.protobuf.ByteStringgetNameBytes()The full name of the asset.ResourcegetResource()Representation of the resource.Resource.BuildergetResourceBuilder()Representation of the resource.ResourceOrBuildergetResourceOrBuilder()Representation of the resource.booleanhasIamPolicy()Representation of the actual Cloud IAM policy set on a cloud resource.booleanhasResource()Representation of the resource.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()Asset.BuildermergeFrom(Asset other)Asset.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)Asset.BuildermergeFrom(com.google.protobuf.Message other)Asset.BuildermergeIamPolicy(com.google.iam.v1.Policy value)Representation of the actual Cloud IAM policy set on a cloud resource.Asset.BuildermergeResource(Resource value)Representation of the resource.Asset.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)Asset.BuildersetAncestors(int index, String value)Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names.Asset.BuildersetAssetType(String value)Type of the asset.Asset.BuildersetAssetTypeBytes(com.google.protobuf.ByteString value)Type of the asset.Asset.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Asset.BuildersetIamPolicy(com.google.iam.v1.Policy value)Representation of the actual Cloud IAM policy set on a cloud resource.Asset.BuildersetIamPolicy(com.google.iam.v1.Policy.Builder builderForValue)Representation of the actual Cloud IAM policy set on a cloud resource.Asset.BuildersetName(String value)The full name of the asset.Asset.BuildersetNameBytes(com.google.protobuf.ByteString value)The full name of the asset.Asset.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)Asset.BuildersetResource(Resource value)Representation of the resource.Asset.BuildersetResource(Resource.Builder builderForValue)Representation of the resource.Asset.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<Asset.Builder>
-
clear
public Asset.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<Asset.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<Asset.Builder>
-
getDefaultInstanceForType
public Asset getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public Asset build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Asset buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Asset.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<Asset.Builder>
-
setField
public Asset.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<Asset.Builder>
-
clearField
public Asset.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
clearOneof
public Asset.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
setRepeatedField
public Asset.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<Asset.Builder>
-
addRepeatedField
public Asset.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<Asset.Builder>
-
mergeFrom
public Asset.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Asset.Builder>
-
mergeFrom
public Asset.Builder mergeFrom(Asset other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
mergeFrom
public Asset.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<Asset.Builder>- Throws:
IOException
-
getName
public String getName()
The full name of the asset. For 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 name = 1;- Specified by:
getNamein interfaceAssetOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
The full name of the asset. For 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 name = 1;- Specified by:
getNameBytesin interfaceAssetOrBuilder- Returns:
- The bytes for name.
-
setName
public Asset.Builder setName(String value)
The full name of the asset. For 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 name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
public Asset.Builder clearName()
The full name of the asset. For 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 name = 1;- Returns:
- This builder for chaining.
-
setNameBytes
public Asset.Builder setNameBytes(com.google.protobuf.ByteString value)
The full name of the asset. For 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 name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getAssetType
public String getAssetType()
Type of the asset. Example: "compute.googleapis.com/Disk".
string asset_type = 2;- Specified by:
getAssetTypein interfaceAssetOrBuilder- Returns:
- The assetType.
-
getAssetTypeBytes
public com.google.protobuf.ByteString getAssetTypeBytes()
Type of the asset. Example: "compute.googleapis.com/Disk".
string asset_type = 2;- Specified by:
getAssetTypeBytesin interfaceAssetOrBuilder- Returns:
- The bytes for assetType.
-
setAssetType
public Asset.Builder setAssetType(String value)
Type of the asset. Example: "compute.googleapis.com/Disk".
string asset_type = 2;- Parameters:
value- The assetType to set.- Returns:
- This builder for chaining.
-
clearAssetType
public Asset.Builder clearAssetType()
Type of the asset. Example: "compute.googleapis.com/Disk".
string asset_type = 2;- Returns:
- This builder for chaining.
-
setAssetTypeBytes
public Asset.Builder setAssetTypeBytes(com.google.protobuf.ByteString value)
Type of the asset. Example: "compute.googleapis.com/Disk".
string asset_type = 2;- Parameters:
value- The bytes for assetType to set.- Returns:
- This builder for chaining.
-
hasResource
public boolean hasResource()
Representation of the resource.
.google.cloud.asset.v1p2beta1.Resource resource = 3;- Specified by:
hasResourcein interfaceAssetOrBuilder- Returns:
- Whether the resource field is set.
-
getResource
public Resource getResource()
Representation of the resource.
.google.cloud.asset.v1p2beta1.Resource resource = 3;- Specified by:
getResourcein interfaceAssetOrBuilder- Returns:
- The resource.
-
setResource
public Asset.Builder setResource(Resource value)
Representation of the resource.
.google.cloud.asset.v1p2beta1.Resource resource = 3;
-
setResource
public Asset.Builder setResource(Resource.Builder builderForValue)
Representation of the resource.
.google.cloud.asset.v1p2beta1.Resource resource = 3;
-
mergeResource
public Asset.Builder mergeResource(Resource value)
Representation of the resource.
.google.cloud.asset.v1p2beta1.Resource resource = 3;
-
clearResource
public Asset.Builder clearResource()
Representation of the resource.
.google.cloud.asset.v1p2beta1.Resource resource = 3;
-
getResourceBuilder
public Resource.Builder getResourceBuilder()
Representation of the resource.
.google.cloud.asset.v1p2beta1.Resource resource = 3;
-
getResourceOrBuilder
public ResourceOrBuilder getResourceOrBuilder()
Representation of the resource.
.google.cloud.asset.v1p2beta1.Resource resource = 3;- Specified by:
getResourceOrBuilderin interfaceAssetOrBuilder
-
hasIamPolicy
public boolean hasIamPolicy()
Representation of the actual Cloud IAM policy set on a cloud resource. For each resource, there must be at most one Cloud IAM policy set on it.
.google.iam.v1.Policy iam_policy = 4;- Specified by:
hasIamPolicyin interfaceAssetOrBuilder- Returns:
- Whether the iamPolicy field is set.
-
getIamPolicy
public com.google.iam.v1.Policy getIamPolicy()
Representation of the actual Cloud IAM policy set on a cloud resource. For each resource, there must be at most one Cloud IAM policy set on it.
.google.iam.v1.Policy iam_policy = 4;- Specified by:
getIamPolicyin interfaceAssetOrBuilder- Returns:
- The iamPolicy.
-
setIamPolicy
public Asset.Builder setIamPolicy(com.google.iam.v1.Policy value)
Representation of the actual Cloud IAM policy set on a cloud resource. For each resource, there must be at most one Cloud IAM policy set on it.
.google.iam.v1.Policy iam_policy = 4;
-
setIamPolicy
public Asset.Builder setIamPolicy(com.google.iam.v1.Policy.Builder builderForValue)
Representation of the actual Cloud IAM policy set on a cloud resource. For each resource, there must be at most one Cloud IAM policy set on it.
.google.iam.v1.Policy iam_policy = 4;
-
mergeIamPolicy
public Asset.Builder mergeIamPolicy(com.google.iam.v1.Policy value)
Representation of the actual Cloud IAM policy set on a cloud resource. For each resource, there must be at most one Cloud IAM policy set on it.
.google.iam.v1.Policy iam_policy = 4;
-
clearIamPolicy
public Asset.Builder clearIamPolicy()
Representation of the actual Cloud IAM policy set on a cloud resource. For each resource, there must be at most one Cloud IAM policy set on it.
.google.iam.v1.Policy iam_policy = 4;
-
getIamPolicyBuilder
public com.google.iam.v1.Policy.Builder getIamPolicyBuilder()
Representation of the actual Cloud IAM policy set on a cloud resource. For each resource, there must be at most one Cloud IAM policy set on it.
.google.iam.v1.Policy iam_policy = 4;
-
getIamPolicyOrBuilder
public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder()
Representation of the actual Cloud IAM policy set on a cloud resource. For each resource, there must be at most one Cloud IAM policy set on it.
.google.iam.v1.Policy iam_policy = 4;- Specified by:
getIamPolicyOrBuilderin interfaceAssetOrBuilder
-
getAncestorsList
public com.google.protobuf.ProtocolStringList getAncestorsList()
Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names. Ancestry path starts with the closest CRM ancestor and ends at root. If the asset is a CRM project/folder/organization, this starts from the asset itself. Example: ["projects/123456789", "folders/5432", "organizations/1234"]
repeated string ancestors = 6;- Specified by:
getAncestorsListin interfaceAssetOrBuilder- Returns:
- A list containing the ancestors.
-
getAncestorsCount
public int getAncestorsCount()
Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names. Ancestry path starts with the closest CRM ancestor and ends at root. If the asset is a CRM project/folder/organization, this starts from the asset itself. Example: ["projects/123456789", "folders/5432", "organizations/1234"]
repeated string ancestors = 6;- Specified by:
getAncestorsCountin interfaceAssetOrBuilder- Returns:
- The count of ancestors.
-
getAncestors
public String getAncestors(int index)
Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names. Ancestry path starts with the closest CRM ancestor and ends at root. If the asset is a CRM project/folder/organization, this starts from the asset itself. Example: ["projects/123456789", "folders/5432", "organizations/1234"]
repeated string ancestors = 6;- Specified by:
getAncestorsin interfaceAssetOrBuilder- 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)
Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names. Ancestry path starts with the closest CRM ancestor and ends at root. If the asset is a CRM project/folder/organization, this starts from the asset itself. Example: ["projects/123456789", "folders/5432", "organizations/1234"]
repeated string ancestors = 6;- Specified by:
getAncestorsBytesin interfaceAssetOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the ancestors at the given index.
-
setAncestors
public Asset.Builder setAncestors(int index, String value)
Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names. Ancestry path starts with the closest CRM ancestor and ends at root. If the asset is a CRM project/folder/organization, this starts from the asset itself. Example: ["projects/123456789", "folders/5432", "organizations/1234"]
repeated string ancestors = 6;- Parameters:
index- The index to set the value at.value- The ancestors to set.- Returns:
- This builder for chaining.
-
addAncestors
public Asset.Builder addAncestors(String value)
Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names. Ancestry path starts with the closest CRM ancestor and ends at root. If the asset is a CRM project/folder/organization, this starts from the asset itself. Example: ["projects/123456789", "folders/5432", "organizations/1234"]
repeated string ancestors = 6;- Parameters:
value- The ancestors to add.- Returns:
- This builder for chaining.
-
addAllAncestors
public Asset.Builder addAllAncestors(Iterable<String> values)
Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names. Ancestry path starts with the closest CRM ancestor and ends at root. If the asset is a CRM project/folder/organization, this starts from the asset itself. Example: ["projects/123456789", "folders/5432", "organizations/1234"]
repeated string ancestors = 6;- Parameters:
values- The ancestors to add.- Returns:
- This builder for chaining.
-
clearAncestors
public Asset.Builder clearAncestors()
Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names. Ancestry path starts with the closest CRM ancestor and ends at root. If the asset is a CRM project/folder/organization, this starts from the asset itself. Example: ["projects/123456789", "folders/5432", "organizations/1234"]
repeated string ancestors = 6;- Returns:
- This builder for chaining.
-
addAncestorsBytes
public Asset.Builder addAncestorsBytes(com.google.protobuf.ByteString value)
Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names. Ancestry path starts with the closest CRM ancestor and ends at root. If the asset is a CRM project/folder/organization, this starts from the asset itself. Example: ["projects/123456789", "folders/5432", "organizations/1234"]
repeated string ancestors = 6;- Parameters:
value- The bytes of the ancestors to add.- Returns:
- This builder for chaining.
-
setUnknownFields
public final Asset.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
mergeUnknownFields
public final Asset.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
-