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.Builder
addAllAncestors(Iterable<String> values)
Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names.Asset.Builder
addAncestors(String value)
Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names.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.Asset.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Asset
build()
Asset
buildPartial()
Asset.Builder
clear()
Asset.Builder
clearAncestors()
Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names.Asset.Builder
clearAssetType()
Type of the asset.Asset.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
Asset.Builder
clearIamPolicy()
Representation of the actual Cloud IAM policy set on a cloud resource.Asset.Builder
clearName()
The full name of the asset.Asset.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
Asset.Builder
clearResource()
Representation of the resource.Asset.Builder
clone()
String
getAncestors(int index)
Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names.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.int
getAncestorsCount()
Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names.com.google.protobuf.ProtocolStringList
getAncestorsList()
Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names.String
getAssetType()
Type of the asset.com.google.protobuf.ByteString
getAssetTypeBytes()
Type of the asset.Asset
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
com.google.iam.v1.Policy
getIamPolicy()
Representation of the actual Cloud IAM policy set on a cloud resource.com.google.iam.v1.Policy.Builder
getIamPolicyBuilder()
Representation of the actual Cloud IAM policy set on a cloud resource.com.google.iam.v1.PolicyOrBuilder
getIamPolicyOrBuilder()
Representation of the actual Cloud IAM policy set on a cloud resource.String
getName()
The full name of the asset.com.google.protobuf.ByteString
getNameBytes()
The full name of the asset.Resource
getResource()
Representation of the resource.Resource.Builder
getResourceBuilder()
Representation of the resource.ResourceOrBuilder
getResourceOrBuilder()
Representation of the resource.boolean
hasIamPolicy()
Representation of the actual Cloud IAM policy set on a cloud resource.boolean
hasResource()
Representation of the resource.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
Asset.Builder
mergeFrom(Asset other)
Asset.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Asset.Builder
mergeFrom(com.google.protobuf.Message other)
Asset.Builder
mergeIamPolicy(com.google.iam.v1.Policy value)
Representation of the actual Cloud IAM policy set on a cloud resource.Asset.Builder
mergeResource(Resource value)
Representation of the resource.Asset.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
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.Asset.Builder
setAssetType(String value)
Type of the asset.Asset.Builder
setAssetTypeBytes(com.google.protobuf.ByteString value)
Type of the asset.Asset.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Asset.Builder
setIamPolicy(com.google.iam.v1.Policy value)
Representation of the actual Cloud IAM policy set on a cloud resource.Asset.Builder
setIamPolicy(com.google.iam.v1.Policy.Builder builderForValue)
Representation of the actual Cloud IAM policy set on a cloud resource.Asset.Builder
setName(String value)
The full name of the asset.Asset.Builder
setNameBytes(com.google.protobuf.ByteString value)
The full name of the asset.Asset.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
Asset.Builder
setResource(Resource value)
Representation of the resource.Asset.Builder
setResource(Resource.Builder builderForValue)
Representation of the resource.Asset.Builder
setUnknownFields(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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
clear
public Asset.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
getDefaultInstanceForType
public Asset getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public Asset build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Asset buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Asset.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
setField
public Asset.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
clearField
public Asset.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
clearOneof
public Asset.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
setRepeatedField
public Asset.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
addRepeatedField
public Asset.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
mergeFrom
public Asset.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Asset.Builder>
-
mergeFrom
public Asset.Builder mergeFrom(Asset other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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:
getName
in 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:
getNameBytes
in 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:
getAssetType
in 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:
getAssetTypeBytes
in 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:
hasResource
in 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:
getResource
in 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:
getResourceOrBuilder
in 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:
hasIamPolicy
in 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:
getIamPolicy
in 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:
getIamPolicyOrBuilder
in 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:
getAncestorsList
in 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:
getAncestorsCount
in 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:
getAncestors
in 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:
getAncestorsBytes
in 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:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
mergeUnknownFields
public final Asset.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Asset.Builder>
-
-